|
| 1 | +$id: https://spec.openapis.org/overlay/1.0/schema/2024-10-17 |
| 2 | +$schema: https://json-schema.org/draft/2020-12/schema |
| 3 | +description: The description of OpenAPI Initiative Overlay v1.0.0 documents |
| 4 | + without schema validation, as defined by |
| 5 | + https://spec.openapis.org/overlay/v1.0.0 |
| 6 | +type: object |
| 7 | +$comment: https://spec.openapis.org/overlay/v1.0.0#overlay-object |
| 8 | +properties: |
| 9 | + overlay: |
| 10 | + description: The version number of the Overlay Specification |
| 11 | + type: string |
| 12 | + pattern: ^1\.0\.\d+(-.+)?$ |
| 13 | + info: |
| 14 | + $ref: "#/$defs/info-object" |
| 15 | + extends: |
| 16 | + type: string |
| 17 | + format: uri-reference |
| 18 | + actions: |
| 19 | + type: array |
| 20 | + minItems: 1 |
| 21 | + uniqueItems: true |
| 22 | + items: |
| 23 | + $ref: "#/$defs/action-object" |
| 24 | +required: |
| 25 | + - overlay |
| 26 | + - info |
| 27 | + - actions |
| 28 | +$ref: "#/$defs/specification-extensions" |
| 29 | +unevaluatedProperties: false |
| 30 | +$defs: |
| 31 | + info-object: |
| 32 | + $comment: https://spec.openapis.org/overlay/v1.0.0#info-object |
| 33 | + description: Provides metadata about the Overlay description |
| 34 | + type: object |
| 35 | + properties: |
| 36 | + title: |
| 37 | + description: A human readable title of the Overlay Description |
| 38 | + type: string |
| 39 | + version: |
| 40 | + description: The version identifier of the Overlay document (which is distinct |
| 41 | + from the Overlay Specification version) |
| 42 | + type: string |
| 43 | + required: |
| 44 | + - title |
| 45 | + - version |
| 46 | + $ref: "#/$defs/specification-extensions" |
| 47 | + unevaluatedProperties: false |
| 48 | + action-object: |
| 49 | + $comment: https://spec.openapis.org/overlay/v1.0.0#action-object |
| 50 | + description: This object represents one or more changes to be applied to the |
| 51 | + target document at the location defined by the target JSONPath expression. |
| 52 | + properties: |
| 53 | + target: |
| 54 | + description: A JSONPath expression selecting nodes in the target document |
| 55 | + type: string |
| 56 | + pattern: ^\$[.\[]?.*$ |
| 57 | + description: |
| 58 | + description: A description of the action. [[CommonMark]] syntax MAY be used for |
| 59 | + rich text representation. |
| 60 | + type: string |
| 61 | + update: |
| 62 | + description: If the target selects an object node, the value of this field |
| 63 | + MUST be an object with the properties and values to merge with the |
| 64 | + node. If the target selects an array, the value of this field MUST |
| 65 | + be an entry to append to the array. |
| 66 | + type: |
| 67 | + - string |
| 68 | + - boolean |
| 69 | + - object |
| 70 | + - array |
| 71 | + - number |
| 72 | + - "null" |
| 73 | + remove: |
| 74 | + description: A boolean value that indicates that the target object is to be |
| 75 | + removed from the the map or array it is contained in |
| 76 | + type: boolean |
| 77 | + default: false |
| 78 | + allOf: |
| 79 | + - description: The `update` field has no impact if the `remove` field of this |
| 80 | + action object is true. |
| 81 | + if: |
| 82 | + properties: |
| 83 | + remove: |
| 84 | + const: true |
| 85 | + required: |
| 86 | + - remove |
| 87 | + then: |
| 88 | + not: |
| 89 | + required: |
| 90 | + - update |
| 91 | + required: |
| 92 | + - target |
| 93 | + $ref: "#/$defs/specification-extensions" |
| 94 | + unevaluatedProperties: false |
| 95 | + specification-extensions: |
| 96 | + $comment: https://spec.openapis.org/overlay/v1.0.0#specification-extensions |
| 97 | + description: While the Overlay Specification tries to accommodate most use |
| 98 | + cases, additional data can be added to extend the specification at certain |
| 99 | + points |
| 100 | + patternProperties: |
| 101 | + ^x-: true |
0 commit comments