The problem with the schema is that you can't seem to model Haskell tuples as [13, "hey"] with the following schema according to the OpenAPI specification:
Apparently the schema satisfies the OpenApi 3.1 specification but currently targets the OpenApi 3.0 specification. This ticket is closed and another takes its place.
PLT-8746
Background
tx-pipe found problems with the schema and reported it here.
Subtasks
nix-shell -p openapi-generator-cli
openapi-generator-cli validate -i openapi.json
openapi.json
cabal run marlowe-runtime-web -- --enable-open-api --http-port 8000
http://localhost:8000/openapi.json
components.schemas.MarloweState.items
is not of typeobject
components.schemas.Plutus.StakingCredential.items
is missingcomponents.schemas.Plutus.StakingCredential.items
is not of typeobject
components.schemas.MarloweState.items
is missingWithdrawTxBodyEnvelope
CreateTxBodyEnvelope
components.schemas.MarloweState.items
is not of typeobject
components.schemas.Plutus.StakingCredential.items
is missingcomponents.schemas.Plutus.StakingCredential.items
is not of typeobject
components.schemas.MarloweState.items
is missingWithdrawTxBodyEnvelope
~ Wont do this, requires more thought and isn't urgent.CreateTxBodyEnvelope
~ Wont do this, requires more thought and isn't urgent.ToSchema
instances to prevent further issues~validateEveryToJSONWithPatternChecker
!StakingCredential
(marlowe-runtime-web/src/Language/Marlowe/Runtime/Web/Orphans.hs)~State
(marlowe-runtime-web/src/Language/Marlowe/Runtime/Web/Orphans.hs)~Notes
[13, "hey"]
with the following schema according to the OpenAPI specification:... because
items
must be anobject
, and not anarray
.This would introduce a breaking change because now
[13, "hey"]
becomes{ "n": 13, "s": "hey" }
@hrajchert notes regarding this:... which doesn't introduce breaking changes but it
description
.["hey", 13]
or[3, 14]
etc etc).Definition of done
PR
PLT-8746: Generated schema conforms to OpenApi spec #761