-
Notifications
You must be signed in to change notification settings - Fork 381
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
OpenAPI 3 support #340
Comments
As far as I can see this won't be possible without breaking changes. In my opinion there are the following options to implement openApi 3.0 support:
I would prefer V1 and perform a breaking change once and try to refactor the SPI interface independent of the open Api version (must be validated if possible) @RobWin: Do you see any other options? Regards |
I've found a better way to convert a OAS3 swagger.yaml to a Documentation, using Swagger Editor. <html>
<head>
<title>Documentation</title>
<link rel="stylesheet" href="https://raw.githubusercontent.com/swagger-api/swagger-ui/master/dist/swagger-ui.css"/>
<script src="https://raw.githubusercontent.com/swagger-api/swagger-ui/master/dist/swagger-ui-bundle.js" type="text/javascript" ></script>
<script>
function render() {
var ui = SwaggerUIBundle({
url: "link/to/your/swagger.yaml",
dom_id: '#swagger-ui',
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIBundle.SwaggerUIStandalonePreset
]
});
}
</script>
</head>
<body onload="render()">
<div id="swagger-ui"></div>
</body>
</html> This works perfectly and results in a document like the right-hand side at Swagger Editor. |
Guess I found a better way:
|
I wanted to give your tool a try, but we are using OpenAPI v3, so I guess I will have to dig into the code first. There is a workaround. Some services offer v3 to v2 transformation (I am using https://www.apimatic.io/ but I guess there are other alternatives) What @rolandhaas is describing here is correct. If Swagger2Markup is updated to work with the OpenAPI v3 model (present in Swagger-Parser has different jars that can be used, depending on the use-case: doing only parsing of v3 or parsing+conversion of v2. It is just a matter of controlling what you put on the classpath. Since some rework of Swagger2Markdown is requested, you might also consider using the interfaces defined in Eclipse MicroProfile: <dependency>
<groupId>org.eclipse.microprofile.openapi</groupId>
<artifactId>microprofile-openapi-api</artifactId>
<version>2.0-MR1</version>
</dependency> The model is really similar to what Swagger-Core is providing, but following the JavaEE principle, there is a clear API with interfaces and different vendors can implement them. I have just released a bridge (EMPOA Swagger-Core) that implements the Eclipse MicroProfile interfaces by delegating to the Swagger-Core objects. This means that you can wrap the output of Swagger-Parser into objects that implements the Eclipse MicroProfile interfaces. Advantage of this approach: decoupling! I hope I will find time to work on OpenAPI v3 support in Swagger2Markup. I did not looked at the code of Swagger2Markup yet, so I can not guaranty if I will be able to do it or not. |
No updates on this? :( |
Please see #312 |
Hi, i would like to help on this. I can submit a PR for OpenAPI 3 support. What's the plan for OpenAPI 3 ? Are we going ahead with @rolandhaas comment using OpenAPI 3 convertor to convert swagger 2 to OpenAPI 3 ? |
already started work on branch https://github.com/Swagger2Markup/swagger2markup/tree/feature/open_api_v3_support |
@austek |
Plan is
For Swagger v2
|
* Use Asciidoc AST to create OpenApi v3 support * Add `Overview` information * Add `Servers` information * Fix document authors * Fix document authors * Add `Servers` information * Add `Servers` information * Add `Servers` information * Add `Servers` information * Add `Path Parameters` information * Add `Path Parameters` information * Add `Path Responses Links` information * Add `Tags` information * Add `Comonents.Schemas` information * Add `Comonents.Parameters` information * Add `External Docs` information * Add `Components Responses` information * Add `Components Headers` information * Add `Components Links` information * Delete unused test fixtures * Change asciidoctorJ dependency to asciidoctorj-api, to remove the the need for JRuby
Thanks a lot for your work. Any idea when there will be a first draft of the swagger2markup-maven-plugin using the openApi version to test ? |
* Use Asciidoc AST to create OpenApi v3 support * Add `Overview` information * Add `Servers` information * Fix document authors * Fix document authors * Add `Servers` information * Add `Servers` information * Add `Servers` information * Add `Servers` information * Add `Path Parameters` information * Add `Path Parameters` information * Add `Path Responses Links` information * Add `Tags` information * Add `Comonents.Schemas` information * Add `Comonents.Parameters` information * Add `External Docs` information * Add `Components Responses` information * Add `Components Headers` information * Add `Components Links` information * Delete unused test fixtures * Change asciidoctorJ dependency to asciidoctorj-api, to remove the the need for JRuby
Hi, thanks for your efforts. |
Will there be OpenAPI 3 support in near feature?
The text was updated successfully, but these errors were encountered: