swagger-to-graphql icon indicating copy to clipboard operation
swagger-to-graphql copied to clipboard

Support of oneOf

Open yarax opened this issue 6 years ago • 14 comments

yarax avatar Apr 09 '18 14:04 yarax

any progress? I got same issue, Don't know how to handle schema {"allOf".

wh00527 avatar Jan 09 '19 00:01 wh00527

Same issue over here.

Did you have the time to look upon it?

Thanks

alfirin avatar Jul 29 '19 14:07 alfirin

+1 can't convert schema with inheritance (allOf) :(

Error: RequestBody is formData, expected an object schema, got "{"allOf":[{"type":"object","properties":{

stacktrace..

 at Object.exports.getParamDetailsFromRequestBody ./node_modules/swagger-to-graphql/lib/swagger.js:122:19)
at ./node_modules/swagger-to-graphql/lib/swagger.js:177:27
at Array.forEach (<anonymous>)
at ./node_modules/swagger-to-graphql/lib/swagger.js:158:28
at Array.forEach (<anonymous>)
at Object.exports.getAllEndPoints (./node_modules/swagger-to-graphql/lib/swagger.js:156:31)

tot-ra avatar Nov 07 '19 12:11 tot-ra

+1 was not able to convert schema with allOf inheritance

constantinov avatar Nov 19 '19 09:11 constantinov

+1...

kargalskaya avatar Dec 11 '19 07:12 kargalskaya

+1

Any update ?

vitorcamachoo avatar Jan 20 '20 12:01 vitorcamachoo

+1

738 avatar Feb 24 '20 05:02 738

  • 1 allOf issue

evgenisokolov avatar Mar 20 '20 10:03 evgenisokolov

The question here for allOf, oneOf, anyOf from the OpenAPI spec is how strict to be from a validation POV. The other question is if we want to use GraphQL Unions or just merge the objects into a meta-object.

newbeb avatar Apr 21 '20 20:04 newbeb

+1

thees avatar Nov 16 '20 15:11 thees

Has some got a solution or a workaround ... We would like to automate the schema generation but we are currently writing our schema manually because of this. 😢

gablabelle avatar Mar 05 '21 13:03 gablabelle

+1

henrikrudstrom avatar Mar 08 '21 22:03 henrikrudstrom

Has some got a solution or a workaround ... We would like to automate the schema generation but we are currently writing our schema manually because of this. 😢

For those interested we are now using https://graphql-mesh.com/ in order to generate a schema file from our swagger files. Works like a charm.

gablabelle avatar Mar 08 '21 23:03 gablabelle

+1

michaelremes avatar May 12 '21 09:05 michaelremes