question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dockstore build to autogenerate openapi that is Smart API compliant

See original GitHub issue

Smart-api compliance

Current implementations of the swagger code generator and the transformer to openapi schemas is incompatible with smart-api standards. The issue seems to be an additional tag in swagger called position, which according to swagger docs was deprecated after 1.5.x Smart-Api: http://smart-api.info/

NOTES:

  • Currently openapi.yml schemas gets build by swagger2openapi tool.
  • More tags need to be added to openapi.yml for it to be smart-api compliant.

Problems:

  • ‘swagger2open’ does not generate correct format due to a not supported position tag/parameter.

Solutions:

  • Using sed to remove position tag from openapi.yml while maven builds project.
  • Manually modify openapi.yml file to include required tags, as well as removing the position generated by translator swagger2open tool.
  • Additional -NIHdatacommons tag need to be added to the list of tags in the schemas document.
    • Not generated when modifying Descriptions.java under dockstore-webservice dependency.
  • Additional -termsOfService tag need to be added to the list of tags in the schemas document.
    • Generated by modifying Descriptions.java
  • Additional -x-role tag need to be added to the list of tags in the schemas document.
    • Not compatible with SwaggerDefinitions can not be included in swagger generator.
  • Additional -x-url tag need to be added to the list of tags in the schemas document.
    • Not compatible with SwaggerDefinitions can not be included in swagger generator.
  • Additional -x-type tag need to be added to the list of tags in the schemas document.
    • Not compatible with SwaggerDefinitions can not be included in swagger generator.

┆Issue is synchronized with this Jira Story ┆Issue Number: DOCK-16 ┆Sprint: Lighthouse Sprint 28 Blue Gum ┆Issue Type: Story

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
coverbeckcommented, Jun 13, 2018

@denis-yuen The current approach is sufficient for Smart API. But @achave11 was pretty close to implementing an approach from this ticket, so he is wrapping it up and will submit a PR today or tomorrow. Although we don’t need it for Smart API, it might be useful to have the generated openapi.yaml being valid for some future use.

Do you want to take a look at Abraham’s PR and decide then whether to accept it or not, and then close this bug accordingly?

0reactions
cricketsloancommented, Feb 14, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Swagger UI
This describes the dockstore API, a webservice that manages pairs of Docker images and associated metadata such as CWL documents and Dockerfiles used...
Read more >
OpenAPITools/openapi-generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI ...
Read more >
Using OpenAPI and Swagger UI
This guide explains how your Quarkus application can expose its API description through an OpenAPI specification and how you can test it via...
Read more >
Using OpenAPI to Build Smart APIs for Dumb Machines
This article discusses how to build, manage and maintain APIs with OpenAPI, including some of the most notable features in v. 3.0.
Read more >
OpenAPI.Tools
Restish - A CLI for REST-ish APIs with HTTP/2, built-in auth, content negotiation, caching, and more that understands and can discover OpenAPI descriptions....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found