You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently trying to set up a workflow where I create my OAS3 specification as a yaml file locally, and generate server code with Gradle. The reason for this is to make sure all changes to my API specification is done through pull requests, and all changes are tracked in git.
My idea is to use the swaggerhub CLI to keep my API documentation up to date as a task in my CI pipeline. The problem I'm facing is that I feel like the CLI is lacking some functionality. What I want is for the CLI to look at the version in my OAS3 spec and update the version in swaggerhub if a matching version already exists, or create a new version in swaggerhub if the version in the spec is incremented with no matching version in Swaggerhub. Today when I try to perform api:update with a version in my OAS spec that does'nt exist in Swaggerhub I receive an error message stating Error: Unknown API <Owner>/<API>/<Version from API spec>
As it is now, I have to try and create a "smart" pipeline that alternate between api:create and api:upgrade depending on what changed in my specification.
My suggestion would is to add a --create flag to the api:upgrade command, that tells the CLI to first attempt to upgrade the version of the API listed in the specification. If such a version does not exist in swaggerhub, it creates said version instead.
The text was updated successfully, but these errors were encountered:
I'm currently trying to set up a workflow where I create my OAS3 specification as a yaml file locally, and generate server code with Gradle. The reason for this is to make sure all changes to my API specification is done through pull requests, and all changes are tracked in git.
My idea is to use the swaggerhub CLI to keep my API documentation up to date as a task in my CI pipeline. The problem I'm facing is that I feel like the CLI is lacking some functionality. What I want is for the CLI to look at the version in my OAS3 spec and update the version in swaggerhub if a matching version already exists, or create a new version in swaggerhub if the version in the spec is incremented with no matching version in Swaggerhub. Today when I try to perform
api:update
with a version in my OAS spec that does'nt exist in Swaggerhub I receive an error message statingError: Unknown API <Owner>/<API>/<Version from API spec>
As it is now, I have to try and create a "smart" pipeline that alternate between
api:create
andapi:upgrade
depending on what changed in my specification.My suggestion would is to add a --create flag to the api:upgrade command, that tells the CLI to first attempt to upgrade the version of the API listed in the specification. If such a version does not exist in swaggerhub, it creates said version instead.
The text was updated successfully, but these errors were encountered: