Files
http-client-app-plan/contracts/workspace-json-schemas/openapi-sources.schema.json
T

114 lines
2.7 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.local/http-client-app/contracts/workspace-json-schemas/openapi-sources.schema.json",
"title": "HTTP Client OpenAPI Sources",
"type": "object",
"required": [
"schemaVersion",
"sources"
],
"properties": {
"schemaVersion": {
"type": "integer",
"const": 1
},
"sources": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name",
"sourcePath",
"format"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"name": {
"type": "string",
"minLength": 1
},
"sourcePath": {
"type": "string",
"minLength": 1
},
"format": {
"type": "string",
"enum": [
"json",
"yaml"
]
},
"openapiVersion": {
"type": "string"
},
"title": {
"type": "string"
},
"version": {
"type": "string"
},
"contentHash": {
"type": "string"
},
"lastSyncedAt": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"targets": {
"type": "object",
"properties": {
"requestFilePath": {
"type": "string"
},
"mockFilePath": {
"type": "string"
}
},
"additionalProperties": false
},
"sync": {
"type": "object",
"properties": {
"strategy": {
"type": "string",
"enum": [
"skip-local-modified",
"overwrite-generated",
"preview-only"
],
"default": "skip-local-modified"
},
"generateRequests": {
"type": "boolean",
"default": true
},
"generateMocks": {
"type": "boolean",
"default": false
},
"enableSchemaValidation": {
"type": "boolean",
"default": false
},
"baseUrlVariable": {
"type": "string",
"default": "baseUrl"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}