Skip to content

Introduce: Module for Swagger 2.x #117

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

Merged
merged 19 commits into from
Jun 27, 2020
Merged

Introduce: Module for Swagger 2.x #117

merged 19 commits into from
Jun 27, 2020

Conversation

CarstenWickner
Copy link
Member

In the scope of GH-76 and even independently of that, it'd be convenient for out-of-the-box support of Swagger 2.x (OpenAPI) via a new module.


For now this is a draft, including changes from @jochenberger and myself.

@CarstenWickner CarstenWickner added the enhancement New feature or request label Jun 20, 2020
}

@Schema(description = "the foo's person")
class PersonReference extends Reference<Person> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my real use-case, this would also be an interface, i.e. interface PersonReference extends IReference. That breaks the properties resolution because unfortunately the getter in the interface won't be detected as such.

@jochenberger
Copy link
Contributor

What's left to do for this to go in? Is there anything I can help with?

@CarstenWickner
Copy link
Member Author

CarstenWickner commented Jun 26, 2020

Hi @jochenberger,

I‘d say:

  • fix formatting
  • add some more tests
  • consider more aspects in forTypesInGeneral() as well
  • at least briefly investigate how to pick-up annotations from extended interfaces
  • allow to derive fields from methods (already working on this one)

I didn’t have much time recently. Maybe I’ll get to it over the upcoming weekend.

If you have the capacity, you could look into points 3 and 4.

@jochenberger
Copy link
Contributor

jochenberger commented Jun 26, 2020

1 should be done, at least checkstyle doesn't complain anymore.
I'm not sure if 4 is an issue at all, I think that it should work. If you're referring to #117 (comment), the problem is that the target implementation is an interface but there is no implementation. The interface is just there for documentary purposes. Specifically, it allows us to override the description of nested fields and to work around swagger-api/swagger-core#3290.
I could have a look at 3 in the next week, I need to figure out which attributes make sense on a type.

@CarstenWickner CarstenWickner marked this pull request as ready for review June 27, 2020 19:18
@CarstenWickner
Copy link
Member Author

Alright. Merging and releasing the initial version of the Swagger2Module as release 4.13.0 now

@CarstenWickner CarstenWickner merged commit 77af4d5 into master Jun 27, 2020
@CarstenWickner CarstenWickner deleted the swagger-2-module branch June 27, 2020 19:20
@CarstenWickner
Copy link
Member Author

Release v4.13.0 is complete and includes this new Swagger2Module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants