You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
👋 Heyo! Finally got around to working on more of my banking sdk. Thought I'd make an issue for investigation instead of going on socials just for better visibility/tracking.
I'm using the OpenAPI specification files from the bank's API, for example this one. On that page you'll see a download button for the OpenAPI file that I'm using with the generator.
The generator generates all the requests, connectors, etc. correctly. The issues I'm having are that some headers and POST bodies are not being populated in the requests. I'm going to assume this is due to the OpenAPI spec file being quirky and having more complex specs maybe?
Let's take the Post Category request for example. The generated CreateCategory request class is bare:
Meanwhile, the Swagger editor seems to pick the header & body up correctly:
All requests in this api also require an intermediaryId header value, but this is not picked up in any of the generation.
Ahh, this package currently don't support header values.
Want to try to tackle this in a PR, what specifically has to be done is to add a "headers" array to the Endpoint class similarly to how we do it for these:
// ...public array $queryParameters = [],
public array $pathParameters = [],
public array $bodyParameters = [],
// ...
Then in the OpenAPI parser it has to be parsed out from the Operation (i'm assuming), here:
👋 Heyo! Finally got around to working on more of my banking sdk. Thought I'd make an issue for investigation instead of going on socials just for better visibility/tracking.
I'm using the OpenAPI specification files from the bank's API, for example this one. On that page you'll see a download button for the OpenAPI file that I'm using with the generator.
The generator generates all the requests, connectors, etc. correctly. The issues I'm having are that some headers and POST bodies are not being populated in the requests. I'm going to assume this is due to the OpenAPI spec file being quirky and having more complex specs maybe?
Let's take the
Post Category
request for example. The generatedCreateCategory
request class is bare:Meanwhile, the Swagger editor seems to pick the header & body up correctly:
All requests in this api also require an
intermediaryId
header value, but this is not picked up in any of the generation.Command-wise, what I'm running is:
Any ideas? Is the OpenAPI spec file being weird, or am I doing something wrong?
The text was updated successfully, but these errors were encountered: