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

Support model property descriptions #53

Merged
merged 2 commits into from
May 21, 2020

Conversation

bherbst
Copy link
Contributor

@bherbst bherbst commented May 21, 2020

This PR adds support for annotating model properties to provide a description (see #52).

Sample usage:

@Response("A String Response")
data class StringResponse(
    @Description("The string value") val str: String
)

Generated Swagger JSON:

 "StringResponse" : {
        "nullable" : false,
        "properties" : {
          "str" : {
            "description" : "The string value",
            "nullable" : false,
            "type" : "string"
          }
        },
        "required" : [ "str" ],
        "type" : "object"
      }

Swagger UI:
Screen Shot 2020-05-21 at 1 31 23 PM

@Wicpar Wicpar merged commit 6318961 into papsign:master May 21, 2020
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

Successfully merging this pull request may close these issues.

2 participants