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

Swagger 3 support #118

Merged
merged 12 commits into from
Feb 22, 2019
Merged

Swagger 3 support #118

merged 12 commits into from
Feb 22, 2019

Conversation

yonaskolb
Copy link
Owner

@yonaskolb yonaskolb commented Feb 21, 2019

This updates from Swagger 2.0 to OpenAPI/Swagger 3.0 https://swagger.io/specification
Resolves #47

This includes updating the:

  • Swagger parser
  • SwagGen generator
  • Swift template

Note that this initial PR doesn't include all the new Swagger 3 features, but just updates everything to get it working.

Proper support for the following is still missing:

Note also that this drops compatibility for Swagger 2.0

@yonaskolb yonaskolb mentioned this pull request Feb 21, 2019
@cooksimo
Copy link

I've just tried to use this and SPM is reporting unresolvable dependencies for me.

@yonaskolb
Copy link
Owner Author

yonaskolb commented Feb 21, 2019

@cooksimo are you using this package as a dependency or trying to build this on its own? Does it say which dependencies are unresolvable?

@cooksimo
Copy link

cooksimo commented Feb 21, 2019

Was attempting to use it as a dependency.

Package.swift contents:

dependencies: [
        // Dependencies declare other packages that this package depends on.
        .package(url: "https://github.com/yonaskolb/SwagGen.git", .branch("swagger_3")),
    ],

swift package generate-xcodeproj output:

Updating https://github.com/onevcat/Rainbow.git
Updating https://github.com/yonaskolb/SwagGen.git
Updating https://github.com/yonaskolb/JSONUtilities.git
Updating https://github.com/kylef/Spectre.git
Updating https://github.com/yonaskolb/Stencil.git
Updating https://github.com/jpsim/Yams.git
Updating https://github.com/kylef/Commander.git
Updating https://github.com/kylef/PathKit.git
Updating https://github.com/SwiftGen/StencilSwiftKit.git
Updating https://github.com/jakeheis/SwiftCLI
error: dependency graph is unresolvable; found these conflicting requirements:

Dependencies:
    https://github.com/yonaskolb/SwagGen.git @ swagger_3
warning: PackageDescription API v3 is deprecated and will be removed in the future; used by package(s): JSONUtilities, Stencil

EDIT
Ignore me, I ran swift package reset and then deleted the Package.resolved and now it seems to be working again. Will try it out!

@azimin
Copy link

azimin commented Feb 22, 2019

Checked with my small spec migration, works fine. Will report if we would face anything.
Thanks @yonaskolb

@yonaskolb yonaskolb merged commit afb7ad1 into master Feb 22, 2019
@yonaskolb yonaskolb deleted the swagger_3 branch February 22, 2019 22:12
@yonaskolb
Copy link
Owner Author

Merging this into master. Followup PR's will add more features

@yonaskolb yonaskolb mentioned this pull request Feb 25, 2019
5 tasks
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.

3 participants