openapistack / openapi-client-axios

JavaScript client library for consuming OpenAPI-enabled APIs with axios
https://openapistack.co
MIT License
535 stars 67 forks source link

Search normalized paths for parameters as well #164

Closed frmrm closed 11 months ago

frmrm commented 1 year ago

Parameters can be defined for all verbs within a path at the path level in the OpenAPI spec. E.g.

paths:
  /user/{userId}:
    parameters:
      ....

    get: # parameters apply here as well

However, the typegen code wouldn't find those because it was only searching for exported types under the operationId and didn't include searches that apply to the overall path. This change adds directives to check the path-level for applicable request parameters as well.

frmrm commented 1 year ago

@anttiviljami would love to get some traction on this one so we can stop running on a fork :)

I didn't see a contributing.md so let me know if I missed anything the process!

frmrm commented 11 months ago

@anttiviljami Not trying to be a pest, but we would love to get some movement on this whenever you can so that we can stop running on an internal fork of the type generator. :)

anttiviljami commented 11 months ago

Hi @frmrm! Thanks for the PR. Merged and released as part of openapi-client-axios-typegen@7.3.2

frmrm commented 11 months ago

Thank you!