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

Swagger annotations overrides mvc parsing rules #264

Closed
glockbender opened this issue Dec 13, 2019 · 2 comments
Closed

Swagger annotations overrides mvc parsing rules #264

glockbender opened this issue Dec 13, 2019 · 2 comments

Comments

@glockbender
Copy link

Continuing #252:
@springdoc Its really correct behaviour. But why @parameter annotation data ignored? As i understood, swagger-annotations used for implicit declaration or overriding default parser behaviour. If this concept ignored, the usefulness of this library tends to zero. As you see in my code snippet, used my own parameter annotations. This an important case to override default request parameter handling.

@glockbender
Copy link
Author

glockbender commented Dec 13, 2019

Another case, when calc parameter needs be overriden by swagger-annotation.

In my dto i try mark required field:
Снимок экрана 2019-12-13 в 20 12 34

But schema looks like:
Снимок экрана 2019-12-13 в 20 12 58

@springdoc
Copy link
Collaborator

Hi,

The sample you are providing is not correct. @ApiModelProperty is a swagger-core 1.5 which produces Swagger/OpenAPI 2.0 definitions.

You should use: swagger-core 2.X that produces OpenAPI 3.0

Please don't open many issues on the same topic. You can add your comments on the previous issue and we follow all the comments and we will reopen when its relevant.

If you have more questions, please provide more information in order to go further:

  • The sample (java) code to reproduce your issue.
  • The result you have got in OpenAPI format
  • The expected Result

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