Closed nicolasLuduena closed 7 months ago
Thanks for reporting this!
I'm currently working on applying these fixes in this ticket: https://github.com/input-output-hk/marlowe-ts-sdk/issues/100.
Maybe a Github action that does this validation so the developers know if the latest commit has a valid OpenAPI spec.
This is a good suggestion and something we want to do to prevent issues in the future.
Thanks Bjorn! Btw if you are going to use 'oneOf', going for a change like this changes the generated code radically.
Here's an example of big change: Previously:
export type Contract = ContractOneOf | ContractOneOf1 | ContractOneOf2 | ContractOneOf3 | ContractOneOf4 | ContractOneOf5;
Now:
export type Contract = Assert | Close | If | Let | Pay | When;
The description for each schema is also transferred as comments & documentation!
Hello again,
As I solved the issues earlier today, someone on my team noted that the schema satisfies OpenApi 3.1 so the old issue was dropped and a new one is created to solve this.
We are now targeting OpenApi 3.1.0 in marlowe runtime on the main
branch which means that heterogeneous arrays should be allowed for the items
field in the schema. If there are any further issues, don't hesitate to notify us!
@nicolasLuduena can we close this issue?
Summary
I am trying to generate code automatically from the OpenAPI spec however it's not possible without having to tinker with it manually. The current spec is not a valid OpenAPI spec.
Steps to reproduce
Steps to reproduce the behavior:
cabal run marlowe-web-server -- --marlowe-runtime-host localhost -o -a
.http://localhost:8080/openapi.json
.openapi.json
.npx @openapitools/openapi-generator-cli validate -i openapi.json
. This is the output:[error] Spec has 4 errors.