Skip to content

Swagger annotations #59

@clemi2408

Description

@clemi2408

https://github.com/victools/jsonschema-generator/wiki#41-features
the page states:

Set a field/method's "description" as per @ApiModelProperty(value = ...)

but properties are annotated like this:
@ApiModelProperty(notes = "Email of the user", name = "email", value = "john@doe.com")

notes element of the annotation holds a description,
and value an example for the range of that property.

the current implementation creates out of:
@ApiModelProperty(notes = "Email of the user", name = "email", value = "john@doe.com")

the following schema:
.. "email" : { "type" : "string", "description" : "john@doe.com", "pattern" : ".{0,0}|\\w+([-]\\w+)*( (\\w)+)+" } ..
so the value is mapped to description instead of using the notes field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions