Closed eokoneyo closed 2 years ago
@eokoneyo Thank you so much for the follow up! I will take a closer look at this later today and try to get it in. This is looking great so far!
Okay, I have reviewed this and I generally like what I see! I have a few comments, however, which I will try to address. All in all, I think we can merge this in!
@eokoneyo It's in! Thanks so much again! I know this fix and the old PR has been getting really stale. This was a really great change! Thank you once again!
Hi, following our discussion in https://github.com/IBM/openapi-to-graphql/pull/426 , I decided to open a different PR to tackle couple of issues I found pertaining to how the definitions from an OAS might be processed.
Here's a couple of issues the PR addresses;
style
andexplode
properties for endpoint parameters didn't adhere to the Open API Spec. Given the partial definition;where
SomeSchemaInput
has properties offilter
andlimit
for example, I found that the http request made for the generated GraphQL resolver is of the format;http://{baseUrl}/api/path?parameters[limit]=10¶meters[offset]=10
when the http request url should rather behttp://{baseUrl}/api/path?limit=10&offset=10
considering the provided values for style and explode, as defined in Open API specification. Relates to https://github.com/IBM/openapi-to-graphql/pull/312 but also includes support for Arrays and ObjectsAlso fix issue where an error is thrown when link is created with parameter that's a nested object; for instance given the link definition;
previously filter would be attempted to be processed as a string, which resulted in errors.