workflow-execution-service-schemas icon indicating copy to clipboard operation
workflow-execution-service-schemas copied to clipboard

Bump to OpenAPI 3.0

Open jaeddy opened this issue 6 years ago • 7 comments

With major substantive and structural changes happening to the spec en route to v1.0, I wonder if now would also be the best time to bite the bullet and convert to the latest OpenAPI spec. Not sure how much work would be involved, or whether the change would have any major impact on service/client implementors.

jaeddy avatar Jun 15 '18 16:06 jaeddy

The changes don't seem to be too huge. The biggest benefit would probably be that we could correctly specify an arbitrary number of files to upload for workflow_descriptor.

For me, the biggest drawback is that there seems to be less tooling for openapi 3. For example, AWS API Gateway doesn't appear to work with it.

mckinsel avatar Jun 16 '18 20:06 mckinsel

Same here, we've been poking around at OpenAPI 3, but swagger-codegen is almost but not quite ready for compatibility. https://github.com/swagger-api/swagger-codegen#compatibility

denis-yuen avatar Jun 18 '18 14:06 denis-yuen

See (and track) ga4gh/data-repository-service-schemas#230

jaeddy avatar Feb 11 '19 18:02 jaeddy

@denis-yuen See https://github.com/ga4gh/data-repository-service-schemas/issues/230#issuecomment-467230782, hope that helps, it worked for me with htsget and Rust:

openapi-generator generate -i spec/htsget-openapi.yaml -g rust -o src/htsget-client
openapi-generator generate -i spec/htsget-openapi.yaml -g rust-server -o src/htsget-server

(After brew install openapi-generator, that is).

brainstorm avatar Feb 25 '19 23:02 brainstorm

Thanks, @brainstorm! I'll check that out.

@wshands— can you provide some detail for the code-gen client failures you've observed for OpenAPI 2.0 and 3.0?

jaeddy avatar Feb 25 '19 23:02 jaeddy

The error I saw was that contents of the files in the workflow attachment are not included in a POST request and seems to occur in both the Swagger and OpenApi code generators. I submitted these two issues: https://github.com/swagger-api/swagger-codegen/issues/9195 https://github.com/OpenAPITools/openapi-generator/issues/2210

wshands avatar Feb 26 '19 15:02 wshands

@brainstorm thanks for the tip, in a different issue much later we found that swagger-codegen 3.0.4 also works https://github.com/ga4gh/data-repository-service-schemas/issues/230#issuecomment-461082972

denis-yuen avatar Feb 26 '19 16:02 denis-yuen

Closing this as it looks like our API spec is currently on v 3.0

patmagee avatar Sep 22 '22 09:09 patmagee