There is some questions around this topic, but I dind't find the right way to do it.
What I want is to define all parameters in a single place and reuse it with no need to write it again. I already get that by using "allOf", but this limited the use of "additionalProperties".
My schema has this structure:
SchemaBase:
type: object
properties:
foo:
type: string
SchemaFull:
allOf:
- $ref: '#/components/schemas/SchemaBase'
- type: object
properties:
bar:
type: string
I tried using using definitions but it seems is not anymore in OpenApi version 3.
Here is a solution but its not what I'm looking for, becasue that is for properties, not the entire schema.