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

swaggerhubUpload task doesn't download resolved yaml/json #15

Closed
rakeshprajapati1982 opened this issue Nov 15, 2021 · 0 comments · Fixed by #27
Closed

swaggerhubUpload task doesn't download resolved yaml/json #15

rakeshprajapati1982 opened this issue Nov 15, 2021 · 0 comments · Fixed by #27

Comments

@rakeshprajapati1982
Copy link

I have written api spec on swaggerhub which refers some common domains defined within myorg. See example below.

components:
  headers:
    x-correlation-id:
      description: Unique correlation ID auto generated for server for each api call.
      required: true
      schema:
        $ref: 'https://api.swaggerhub.com/domains/myorg/CommonComponents/1.0.0#/components/schemas/x-correlation-id'    

When I download the api spec yaml using swaggerhubDownload gradle task, it doesn't resolve the reference. It just downloads it as is which is not in good to feed to next task in my workflow for codegen.

Suggestion
I looked up swaggerhub documentation and there is option to download resolved api spec by passing a query parameter resolved=true. Reference https://support.smartbear.com/swaggerhub/docs/apis/downloading-swagger-definition.html

I tried using this query param in postman and it works.

Can we add resolved as a parameter to the swaggerhubDownload task?

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 a pull request may close this issue.

1 participant