Skip to content

For all entities, add schema annotation to all (XML) elements #133

@guusdk

Description

@guusdk

We should add an io.swagger.v3.oas.annotations.media.Schema (or equivalent, such as @ArraySchema) annotation to each property of an entity (typically, those are the getter methods that are already annotated with @XmlElement).

This will allow for the auto-generated documentation to be enriched with a description of the property. Many of these descriptions are already available. They have been painstakingly added manually in the readme.md file. The can mostly be copied from there.

For example, a method like this:

/**
 * Gets whether this is a shared group
 *
 * @return whether it's a shared group
 */
@XmlElement(name = "shared")
public Boolean getShared(){ return shared; }

Should be annotated as follows:

/**
 * Gets whether this is a shared group
 *
 * @return whether it's a shared group
 */
@XmlElement(name = "shared")
@Schema(description = "Whether the group should automatically appear in the rosters of the users", example = "false")
public Boolean getShared(){ return shared; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions