Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
guusdk opened this issue Jul 22, 2022 · 0 comments
Open

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

guusdk opened this issue Jul 22, 2022 · 0 comments

Comments

@guusdk
Copy link
Member

guusdk commented Jul 22, 2022

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; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant