op-cellar-git / cellar-async-api

This repo contains the specifications of the microservice APIs of the new Cellar ingestion.
0 stars 0 forks source link

Additional properties are allowed #1

Open simonegasperoni opened 4 years ago

simonegasperoni commented 4 years ago

Async API playground displays: "Additional properties are allowed" on each header and on each payload

sebastianthelen commented 4 years ago

There seems to be a general confusion about this point for openapi (swagger) on which asyncapi is based.

See

sebastianthelen commented 4 years ago

So it seems additionalProperties requires a schema object and not a boolean value. When defining

schemas: PrelockValidationBeginPayloadSchema: type: object additionalProperties:
properties: traceId: $ref: "https://raw.githubusercontent.com/op-cellar-git/cellar-transaction/master/apis/asyncapi/shared_components/shared_components.yml#/components/schemas/traceIdSchema"

sharedAreaRef:

$ref: "https://raw.githubusercontent.com/op-cellar-git/cellar-transaction/master/apis/asyncapi/shared_components/shared_components.yml#/components/schemas/sharedAreaRefSchema"

required:

  • traceId

the editor displays

Screen Shot 2020-06-04 at 10 15 24

Not sure this is what we want, though. I'd suggest emphasizing that any additional properties are to be ignored by the services