Closed LewisCowlesMotive closed 1 year ago
As I mentioned in the other repo this isn't on the roadmap and probably won't be added to the roadmap (it'll be a big enough lift to get us onto OpenAPI 3.1) -- if you could share a little bit about your use case for the OpenAPI file we might be able to see if there is a workaround or alternative solution for solving your problem?
We're trying to generate a mock server, so that we can use the api definition, to ensure our contract between our software and Plaid is valid, without being dependent on internet resources being permanently available. One component of this is a response generator; two others are request and response validators.
We have this successfully and easily completed with other providers, including railsbank and yapily, who use OpenAPI3; but there are some things about the Plaid OpenAPI docs which make the conversion more difficult (examples in the details block below).
Despite reporting as spec-compliant after and before conversion, we see warnings and errors from any tooling we've tried. I Checked the spec, it doesn't seem to be non-compliant, just quite different to other vendor interpretations, perhaps using more OpenAPI features).
Internally we have tooling that takes an OpenAPI (2.0) definition and generates a mock server, which services multiple API's using a path-prefix. By modifying the paths to take into account a prefix, and suffixing all definitions and references, this lets us generate a big-ol ball of yaml, without conflicting entries, which the rest of the tooling uses to validate request, response conformance, as well as generating responses using examples and conventions. I Can't share that code unfortunately, which I understand is a problem.
But, moving sideways, to things I can share, even using external tools, we've found it rather impossible thus-far to generate an API server when using this OpenAPI spec, even unmodified.
nodejs-server-server-generated.zip
this one sort-of works. I delete the security:
and securityDefinitions:
sections, which incorrectly tell me I need to include headers that are not included when communicating with development
or sandbox
I guess the core point here, goes beyond what the company I work at is after, as why would that matter to anyone but them, they'll eventually need to make way for OpenAPI 3 and 3.1 🤷 .
It would be nice if there was more tooling to avoid this kind of dev effort when working with resources. The plaid quickstart was pretty cool to answer questions, as is the postman and having any API documentation, and the static HTML included with the postman.
For now, I guess I can chuck this into docker or kubernetes (sharing in case anyone else needs)
Cross-linking as accidentally opened in plaid postman repo
https://github.com/plaid/plaid-postman/issues/140