-
-
Notifications
You must be signed in to change notification settings - Fork 444
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 v2 to v3 conversion #113
Comments
I have a similar requirement. @eclipse1985 were you able to achieve this? :) |
Unfortunately no |
@eclipse1985 @dinusha92 - assuming you have read your v2 spec as func V2ToV3(v2Data []byte) ([]byte, error) {
v2Spec := &openapi2.Swagger{}
if err := json.Unmarshal(v2Data, v2Spec); err != nil {
return nil, err
}
v3Spec, err := openapi2conv.ToV3Swagger(v2Spec)
if err != nil {
return nil, err
}
return json.Marshal(v3Spec)
} |
Yes, I just tried, and you are right. We can close this issue. |
Could this be a CLI command? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the README is stated that
openapi2
package supportsOpenAPI 2 files, including serialization, deserialization, and validation
But I can't find a way to read a swagger v2 file.
I need to convert a swagger v2 file to swagger v3. Is that possible in any way with
kin-openapi
?The text was updated successfully, but these errors were encountered: