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

Models: OpenAPI.path(..) should be OpenAPI.addPath(…) #247

Closed
jmini opened this issue Jul 25, 2018 · 6 comments
Closed

Models: OpenAPI.path(..) should be OpenAPI.addPath(…) #247

jmini opened this issue Jul 25, 2018 · 6 comments
Labels

Comments

@jmini
Copy link
Contributor

jmini commented Jul 25, 2018

For consistency with other patterns:

The method:

org.eclipse.microprofile.openapi.models.OpenAPI.path(String, PathItem)

Is the builder method to add an item into the OpenAPI.getPath() map. It should be:

org.eclipse.microprofile.openapi.models.OpenAPI.addPath(String, PathItem)
@arthurdm
Copy link
Member

agreed

@jmini
Copy link
Contributor Author

jmini commented Jul 30, 2018

Maybe it should be:

org.eclipse.microprofile.openapi.models.OpenAPI.addPathItem(String, PathItem)

But there is also already:

org.eclipse.microprofile.openapi.models.Paths.addPathItem(String, PathItem)

Which does the same?

Maybe OpenAPI.path(String, PathItem) is just wrong and should be removed (or marked as deprecated with 1.1 to indicate that getPahts().addPathItem(String, PathItem) should be used instead).

@EricWittmann
Copy link
Contributor

+1 to removing the OpenAPI.path(String, PathItem) method.

@arthurdm
Copy link
Member

Discussed in Sept 10 hangout. +1 to deprecate org.eclipse.microprofile.openapi.models.OpenAPI.addPathItem(String, PathItem) in 1.1 and remove it in 2.0, as that functionality is available from Paths.

@jmini
Copy link
Contributor Author

jmini commented Sep 11, 2018

Pull requests to fix this issue:

@jmini
Copy link
Contributor Author

jmini commented Oct 24, 2018

Both PR are merged, I am closing this issue.

@jmini jmini closed this as completed Oct 24, 2018
@arthurdm arthurdm added this to the MP OpenAPI 2.0 milestone Apr 14, 2020
@jmini jmini added the incompatible-changes This marks an API breaking change label Jul 12, 2020
Azquelt pushed a commit to Azquelt/microprofile-open-api that referenced this issue Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants