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

JAX-RS: make Reader more easy to extend #4431

Closed
wants to merge 2 commits into from

Conversation

bamthomas
Copy link
Contributor

We wanted to make a parser to generate openapi specification file for fluent-http. It is a bit different from JAX-RS but we can reuse annotations (@parameter, @operation, ....).

We've seen that some methods, class attributes of Reader are protected that may indicate that the class is extensible.

Unfortunately there are some inconsistencies : for example the private components property is used in utility methods that are private. So even if the field is duplicated in a daughter class, it won't be populated.

This pull request is trying to fix this.

This PR does the following in the JAW-RS Reader class :

  • add a protected constructor with components, paths, openApiTags to be able to share instance with children classes
  • add protected getters for the previous fields
  • change the visibility of the setOperationObjectFromApiOperationAnnotationto be able to call it from children classes

Tell us if you have suggestions to do differently (because we'd have misused the intended API) or examples for other framework adaptations.

Thank you

@frantuma
Copy link
Member

Thanks! Included and replaced by #4434

@frantuma frantuma closed this Jun 23, 2023
bamthomas added a commit to ICIJ/fluent-swagger-apigen that referenced this pull request Jun 26, 2023
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