openapistack / openapi-client-axios

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

Unrequire parameters #100

Closed rowrowrowrow closed 2 years ago

rowrowrowrow commented 2 years ago

Currently if you don't specify parameters for an operation several errors occur in getRequestConfigForOperation. It doesn't make sense to require parameters to be set if the path doesn't have any parameters and if we already default all params to query if operation doesn't specify param.

We should provide a default value of an empty array for 'parameters' getRequestConfigForOperation.

We could also ensure that op.parameters is set to an empty array in getOperations, but we may need to know that no parameters we're specified in the spec in other places.

styks1987 commented 2 years ago

I have this exact same issue.

rowrowrowrow commented 2 years ago

I have this exact same issue.

PR Here: https://github.com/anttiviljami/openapi-client-axios/pull/101

anttiviljami commented 2 years ago

Fixed and released as part of openapi-client-axios@4.6.0 release