diff --git a/.github/workflows/website-build.yml b/.github/workflows/website-build.yml index 52d6df2f0..d81baa2ab 100644 --- a/.github/workflows/website-build.yml +++ b/.github/workflows/website-build.yml @@ -35,7 +35,6 @@ jobs: -DSOURCEMETA_CORE_URITEMPLATE:BOOL=OFF -DSOURCEMETA_CORE_JSON:BOOL=OFF -DSOURCEMETA_CORE_JSONL:BOOL=OFF - -DSOURCEMETA_CORE_JSONSCHEMA:BOOL=OFF -DSOURCEMETA_CORE_JSONPOINTER:BOOL=OFF -DSOURCEMETA_CORE_YAML:BOOL=OFF -DSOURCEMETA_CORE_JSONRPC:BOOL=OFF diff --git a/.github/workflows/website-deploy.yml b/.github/workflows/website-deploy.yml index 03c095fed..527fa2110 100644 --- a/.github/workflows/website-deploy.yml +++ b/.github/workflows/website-deploy.yml @@ -45,7 +45,6 @@ jobs: -DSOURCEMETA_CORE_URITEMPLATE:BOOL=OFF -DSOURCEMETA_CORE_JSON:BOOL=OFF -DSOURCEMETA_CORE_JSONL:BOOL=OFF - -DSOURCEMETA_CORE_JSONSCHEMA:BOOL=OFF -DSOURCEMETA_CORE_JSONPOINTER:BOOL=OFF -DSOURCEMETA_CORE_YAML:BOOL=OFF -DSOURCEMETA_CORE_JSONRPC:BOOL=OFF diff --git a/CMakeLists.txt b/CMakeLists.txt index c154cb89a..8afa68c62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,6 @@ option(SOURCEMETA_CORE_EMAIL "Build the Sourcemeta Core Email library" ON) option(SOURCEMETA_CORE_URI "Build the Sourcemeta Core URI library" ON) option(SOURCEMETA_CORE_URITEMPLATE "Build the Sourcemeta Core URI Template library" ON) option(SOURCEMETA_CORE_JSON "Build the Sourcemeta Core JSON library" ON) -option(SOURCEMETA_CORE_JSONSCHEMA "Build the Sourcemeta Core JSON Schema library" ON) option(SOURCEMETA_CORE_JSONPOINTER "Build the Sourcemeta Core JSON Pointer library" ON) option(SOURCEMETA_CORE_JSONL "Build the Sourcemeta Core JSONL library" ON) option(SOURCEMETA_CORE_YAML "Build the Sourcemeta Core YAML library" ON) @@ -146,10 +145,6 @@ if(SOURCEMETA_CORE_JSONPOINTER) add_subdirectory(src/core/jsonpointer) endif() -if(SOURCEMETA_CORE_JSONSCHEMA) - add_subdirectory(src/core/jsonschema) -endif() - if(SOURCEMETA_CORE_GZIP) find_package(LibDeflate REQUIRED) find_package(ZLIB REQUIRED) @@ -284,10 +279,6 @@ if(SOURCEMETA_CORE_TESTS) add_subdirectory(test/jsonpointer) endif() - if(SOURCEMETA_CORE_JSONSCHEMA) - add_subdirectory(test/jsonschema) - endif() - if(SOURCEMETA_CORE_GZIP) add_subdirectory(test/gzip) endif() diff --git a/DEPENDENCIES b/DEPENDENCIES index 469212bdf..6e43cf6ba 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -3,17 +3,6 @@ jsontestsuite https://github.com/nst/JSONTestSuite d64aefb55228d9584d3e5b2433f72 yaml-test-suite https://github.com/yaml/yaml-test-suite data-2022-01-17 cmark-gfm https://github.com/github/cmark-gfm 587a12bb54d95ac37241377e6ddc93ea0e45439b zlib https://github.com/madler/zlib v1.3.2 -jsonschema-2020-12 https://github.com/json-schema-org/json-schema-spec 769daad75a9553562333a8937a187741cb708c72 -jsonschema-2019-09 https://github.com/json-schema-org/json-schema-spec 41014ea723120ce70b314d72f863c6929d9f3cfd -jsonschema-draft7 https://github.com/json-schema-org/json-schema-spec 567f768506aaa33a38e552c85bf0586029ef1b32 -jsonschema-draft6 https://github.com/json-schema-org/json-schema-spec 59ed5f6fc6f6386e23ca51d7f31d7fe9cf696713 -jsonschema-draft4 https://github.com/json-schema-org/json-schema-spec 955d185db846cfca84269d9d711b10f4f3353d38 -jsonschema-draft3 https://github.com/json-schema-org/json-schema-spec 89912ad69fe15e006e8336a59e93bf7a1e46fa54 -jsonschema-draft2 https://github.com/json-schema-org/json-schema-spec 707f65070d09fe5baa1315bce4d31a66ff124171 -jsonschema-draft1 https://github.com/json-schema-org/json-schema-spec 2072feec9fc7a7ff0b2bb5b02c2d6742c554cc4a -jsonschema-draft0 https://github.com/json-schema-org/json-schema-spec 7ea575aef8d5c0183acbe6ff65b4c98ee9c236ec -openapi https://github.com/OAI/OpenAPI-Specification 74906beddddab9e555337031b2a8d8e9338c4972 -referencing-suite https://github.com/python-jsonschema/referencing-suite 61c4cc202b1e96ed5adcaf4842a595f68d659212 uritemplate-test https://github.com/uri-templates/uritemplate-test 1eb27ab4462b9e5819dc47db99044f5fd1fa9bc7 pyca-cryptography https://github.com/pyca/cryptography c4935a7021af37c38e0684b0546c1b4378518342 pcre2 https://github.com/PCRE2Project/pcre2 pcre2-10.47 diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt index cc8dc75fe..705828205 100644 --- a/benchmark/CMakeLists.txt +++ b/benchmark/CMakeLists.txt @@ -12,10 +12,6 @@ if(SOURCEMETA_CORE_JSONPOINTER) list(APPEND BENCHMARK_SOURCES jsonpointer.cc) endif() -if(SOURCEMETA_CORE_JSONSCHEMA) - list(APPEND BENCHMARK_SOURCES jsonschema.cc) -endif() - if(SOURCEMETA_CORE_URITEMPLATE) list(APPEND BENCHMARK_SOURCES uritemplate.cc) endif() @@ -53,11 +49,6 @@ if(BENCHMARK_SOURCES) PRIVATE sourcemeta::core::jsonpointer) endif() - if(SOURCEMETA_CORE_JSONSCHEMA) - target_link_libraries(sourcemeta_core_benchmark - PRIVATE sourcemeta::core::jsonschema) - endif() - if(SOURCEMETA_CORE_URITEMPLATE) target_link_libraries(sourcemeta_core_benchmark PRIVATE sourcemeta::core::uritemplate) diff --git a/benchmark/files/2019_09_krakend.json b/benchmark/files/2019_09_krakend.json deleted file mode 100644 index 363947eb4..000000000 --- a/benchmark/files/2019_09_krakend.json +++ /dev/null @@ -1,10128 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Schema validation for KrakenD", - "type": "object", - "required": [ "version" ], - "properties": { - "async_agent": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1async_agent.json" - }, - "cache_ttl": { - "title": "Cache TTL", - "description": "Sets a default `Cache-Control: public, max-age=%d` header to all endpoints where `%d` is the conversion to seconds of any duration you write, indicating for how long the client (or CDN) can cache the content of the request. You can override this value per endpoint, but setting an endpoint to 0 will use the default value instead. Notice that KrakenD does not cache the content with this parameter, but tells the client how to do it. Defaults to `0s` (no cache). **For KrakenD cache, see [backend caching](https://www.krakend.io/docs/backends/caching/)**.", - "default": "0s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "client_tls": { - "title": "TLS Client settings", - "description": "Allows to set specific transport settings when using TLS in your upstream services. See [TLS Client](https://www.krakend.io/docs/service-settings/tls/) for more settings", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1client_tls.json" - }, - "debug_endpoint": { - "title": "Debug endpoint", - "description": "Enables the `/__debug/` endpoint for this configuration. You can safely enable it in production.", - "default": false, - "type": "boolean" - }, - "dialer_fallback_delay": { - "title": "Dialer fallback delay", - "description": "Specifies the length of time to wait before spawning a RFC 6555 Fast Fallback connection. If zero, a default delay of 300ms is used.\n\nSee: https://www.krakend.io/docs/service-settings/http-transport-settings/", - "default": "300ms", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "dialer_keep_alive": { - "title": "Dialer keep alive", - "description": "The interval between keep-alive probes for an active network connection. If zero, keep-alive probes are sent with a default value (currently 15 seconds), if supported by the protocol and operating system. Network protocols or operating systems that do not support keep-alives ignore this field. If negative, keep-alive probes are disabled.\n\nSee: https://www.krakend.io/docs/service-settings/http-transport-settings/", - "default": "15s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "dialer_timeout": { - "title": "Dialer Timeout", - "description": "The timeout of the dial function for creating connections.The default is no timeout. With or without a timeout, the operating system may impose its own earlier timeout.\n\nSee: https://www.krakend.io/docs/service-settings/http-transport-settings/", - "default": "0s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "disable_compression": { - "title": "Disable compression", - "description": "When true prevents requesting compression with an `Accept-Encoding: gzip` request header when the Request contains no existing Accept-Encoding value. If the Transport requests gzip on its own and gets a gzipped response, it's transparently decoded. However, if the user explicitly requested gzip it is not automatically uncompressed.\n\nSee: https://www.krakend.io/docs/service-settings/http-transport-settings/", - "default": false, - "type": "boolean" - }, - "disable_keep_alives": { - "title": "Disable keep alives", - "description": "When true it disables HTTP keep-alives and will only use the connection to the server for a single HTTP request.\n\nSee: https://www.krakend.io/docs/service-settings/http-transport-settings/", - "default": false, - "type": "boolean" - }, - "disable_rest": { - "title": "Disable RESTful URLs", - "description": "Endpoints require in its `endpoint` definition the usage of a RESTful pattern. If you require unrestful patterns, like `/file.{ext}` (instead of its RESTful counterpart `/file/{ext}`), then you must set this parameter to `true`.\nYou can use multiple variables if needed, but only one can be in an unrestful position, and when you do, it must be in the last position of the definition. E.g.: you can declare an endpoint `/file/{name}/base.{ext}` but you cannot do `/file.{ext}.json` because the variable `{ext}` is not in the last position of the definitino, and therefore the remaining path after `{ext}` is ignored by the router.", - "default": false, - "type": "boolean" - }, - "dns_cache_ttl": { - "title": "DNS Cache TTL", - "description": "Sets the maximum time KrakenD can store the results of a query to the configured Service Discovery returning the available hosts list. For values under `1s` this setting is ignored.\n\nSee: https://www.krakend.io/docs/backends/service-discovery/", - "default": "30s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "echo_endpoint": { - "title": "Echo endpoint", - "description": "Enables the `/__echo/` endpoint for this configuration, that returns information about the incoming request. When using /__echo as a backend you can check the actual headers and content a backend receives after all the zero-trust filtering.", - "default": false, - "type": "boolean" - }, - "endpoints": { - "title": "Endpoints", - "description": "Your API contract, or the list of all paths recognized by this gateway. The paths `/__health/`, `/__debug/`, `/__echo/`, `/__catchall`, and `/__stats/` are reserved by the system and you cannot declare them. Their existence depends on their respective settings.\n\nSee: https://www.krakend.io/docs/endpoints/", - "type": "array", - "items": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1endpoint.json", - "type": "object" - } - }, - "expect_continue_timeout": { - "title": "Expect_continue_timeout", - "description": "If non-zero, specifies the amount of time to wait for a server's first response headers after fully writing the request headers if the request has an `Expect: 100-continue` header. Zero means no timeout and causes the body to be sent immediately, without waiting for the server to approve. This time does not include the time to send the request header.\n\nSee: https://www.krakend.io/docs/service-settings/http-transport-settings/", - "default": "0s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "extra_config": { - "title": "Extra configuration", - "description": "The optional configuration that extends the core functionality of the gateway is specified here. The `extra_config` at this level enables service components, meaning that they apply globally to all endpoints or activity.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1service_extra_config.json", - "type": "object" - }, - "host": { - "title": "Default host", - "description": "The default host list for all backends if they specify none.", - "type": "array", - "items": { - "type": "string" - } - }, - "idle_connection_timeout": { - "title": "HTTP Idle timeout", - "description": "The maximum number of idle (keep-alive) connections across all hosts. Zero means no limit.\n\nSee: https://www.krakend.io/docs/service-settings/http-transport-settings/", - "default": "0s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "idle_timeout": { - "title": "HTTP Idle timeout", - "description": "The maximum amount of time to wait for the next request when keep-alives are enabled. If `idle_timeout` is zero, the value of `read_timeout` is used. If both are zero, there is no timeout.\n\nSee: https://www.krakend.io/docs/service-settings/http-server-settings/", - "default": "0s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "listen_ip": { - "title": "Listen IP", - "description": "The IP address that KrakenD listens to in IPv4 or IPv6. An empty string, or no declaration at all means listening on all interfaces. The inclusion of `::` is meant for IPv6 format only (**this is not the port**). Examples of valid addresses are `192.0.2.1` (IPv4), `2001:db8::68` (IPv6). The values `::` and `0.0.0.0` listen to all addresses and both are valid for IPv4 and IPv6 simultaneously.", - "examples": [ "172.12.1.1", "::1" ], - "default": "0.0.0.0", - "type": "string" - }, - "max_header_bytes": { - "title": "Max header bytes", - "description": "Allows overriding the maximum size of headers sent in bytes. It does not limit the request body. When the value is zero, the default is used instead (1MB)\n\nSee: https://www.krakend.io/docs/service-settings/http-transport-settings/", - "default": 1000000, - "type": "integer" - }, - "max_idle_connections": { - "title": "Max idle connections", - "description": "The maximum number of idle (keep-alive) connections across all hosts. Zero means no limit.\n\nSee: https://www.krakend.io/docs/service-settings/http-transport-settings/", - "default": 0, - "type": "integer" - }, - "max_idle_connections_per_host": { - "title": "Max idle connections per host", - "description": "If non-zero, controls the maximum idle (keep-alive) connections to keep per-host. If zero, `250` is used instead.\n\nSee: https://www.krakend.io/docs/service-settings/http-transport-settings/", - "default": 250, - "type": "integer" - }, - "max_shutdown_wait_time": { - "title": "Max shutdown wait time", - "description": "The gateway gracefully shuts down, waiting for all active connections to drain. Nevertheless, persistent connections or long timeouts may leave the shutdown process running for an extended period. Set the maximum time to wait for all the remaining requests to finish when shutting down the service. After this time, the service will force a shutdown. Defaults to `0s` (wait indefinitely). \n\nSee: https://www.krakend.io/docs/service-settings/http-server-settings/", - "default": "0s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "name": { - "title": "Name", - "description": "Used in telemetry. A friendly name, title, date, version or any other short description that helps you recognize the configuration.", - "default": "KrakenD configuration at MyCompany", - "type": "string" - }, - "output_encoding": { - "title": "Output Encoding", - "description": "The encoding used to display the content to the end-user. This setting is the default for all endpoints, unless they have another `output_encoding` overrinding this value.\n\nSee: https://www.krakend.io/docs/endpoints/content-types/", - "default": "json", - "enum": [ - "json", - "fast-json", - "json-collection", - "xml", - "negotiate", - "string", - "no-op" - ] - }, - "plugin": { - "title": "Plugin", - "description": "Enables external plugins that are copied in a specific folder", - "type": "object", - "required": [ "pattern", "folder" ], - "properties": { - "pattern": { - "title": "Pattern", - "description": "The pattern narrows down the contents of the folder. It represents the substring that must be present in the plugin name to load.", - "examples": [ ".so", "-production.so" ], - "default": ".so", - "type": "string" - }, - "folder": { - "title": "Folder", - "description": "The path in the filesystem where all the plugins you want to load are. MUST END IN SLASH. The folder can be a relative or absolute path. KrakenD Enterprise uses /opt/krakend/plugins/ for all plugins.", - "examples": [ "/opt/krakend/plugins/", "./plugins/" ], - "default": "/opt/krakend/plugins/", - "type": "string" - } - } - }, - "port": { - "title": "Port", - "description": "The TCP port where KrakenD is listening to. Recommended value is in the range 1024-65535 to run as an unpriviliged user", - "default": 8080, - "type": "integer", - "maximum": 65535, - "minimum": 0 - }, - "read_header_timeout": { - "title": "HTTP Idle timeout", - "description": "The amount of time allowed to read request headers. The connection's read deadline is reset after reading the headers and the Handler can decide what is considered too slow for the body.\n\nSee: https://www.krakend.io/docs/service-settings/http-server-settings/", - "default": "0s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "read_timeout": { - "title": "HTTP read timeout", - "description": "Is the maximum duration for reading the entire request, including the body. Because `read_timeout` does not let Handlers make per-request decisions on each request body's acceptable deadline or upload rate, most users will prefer to use `read_header_timeout`. It is valid to use them both.\n\nSee: https://www.krakend.io/docs/service-settings/http-server-settings/", - "default": "0s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "response_header_timeout": { - "title": "Response header timeout", - "description": "If non-zero, specifies the amount of time to wait for a server's response headers after fully writing the request (including its body, if any). This time does not include the time to read the response body.\n\nSee: https://www.krakend.io/docs/service-settings/http-transport-settings/", - "default": "0s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "sequential_start": { - "title": "Sequential start", - "description": "A sequential start registers all async agents in order, allowing you to have the starting logs in sequential order. A non-sequential start is much faster, but logs are harder to follow.\n\nSee: https://www.krakend.io/docs/service-settings/http-server-settings/", - "default": false, - "type": "boolean" - }, - "timeout": { - "title": "Global timeout", - "description": "Defines a default timeout for all endpoints. Can be overriden per endpoint.\n\nSee: https://www.krakend.io/docs/service-settings/http-transport-settings/#global-timeout", - "default": "2s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "tls": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1tls.json" - }, - "use_h2c": { - "title": "Enable h2c", - "description": "Enable the support for HTTP/2 with no TLS. This option is only advised when you have a load balancer in front of KrakenD doing SSL termination, and you have no option to enable SSL communication between the balancer and KrakenD (no internal certificates available either). Otherwise, enabling this flag is less secure and less performant.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "default": false, - "type": "boolean" - }, - "version": { - "title": "Version of this syntax", - "description": "The syntax version tells KrakenD how to read this configuration. This is not the KrakenD version. Each KrakenD version is linked to a syntax version, and since KrakenD v2.0 the version must be `3`", - "const": 3 - }, - "write_timeout": { - "title": "HTTP write timeout", - "description": "Maximum duration before timing out writes of the response.\n\nSee: https://www.krakend.io/docs/service-settings/http-server-settings/", - "default": "0s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false, - "$defs": { - "https://www.krakend.io/schema/v2.13/ai/anthropic.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Anthropic integration", - "description": "Connect to Anthropic models easily by providing your API key and optional parameters.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "type": "object", - "maxProperties": 1, - "minProperties": 1, - "properties": { - "v1": { - "title": "Version v1", - "description": "All settings depend on a specific version, as the vendor might change the API over time.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "type": "object", - "required": [ "credentials", "variables" ], - "properties": { - "credentials": { - "title": "API Key", - "description": "Your Anthropic API key. You can set it as an environment variable for better security.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "type": "string" - }, - "debug": { - "title": "Debug Mode", - "description": "Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "default": false, - "type": "boolean" - }, - "input_template": { - "title": "Input Template", - "description": "A path to a custom [Go template](https://pkg.go.dev/text/template) that sets the payload format sent to Anthropic. You don't need to set this value unless you want to override the default template making use of all the `variables` listed in this configuration.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "type": "string" - }, - "output_template": { - "title": "Output Template", - "description": "A path to a custom [Go template](https://pkg.go.dev/text/template) that sets how the response from Anthropic is transformed before being sent to the client. The default template extracts the text from the first choice returned by Anthropic so in most cases you don't need to set a custom output template.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "type": "string" - }, - "variables": { - "title": "Model Variables", - "description": "The variables specific to the Anthropic usage that are used to construct the payload.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "type": "object", - "required": [ "model" ], - "properties": { - "extra_payload": { - "title": "Extra Payload", - "description": "A map of additional payload attributes you want to use in your custom `input_template` (this payload is not used in the default template). The attributes set here are accessible in your custom template as `{{ .variables.extra_payload.yourchosenkey }}`. This option helps adding rare customization and future attributes.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "type": "object" - }, - "max_tokens": { - "title": "Max Tokens", - "description": "Maximum number of tokens that can be generated in the response. A token is approximately four characters. 100 tokens correspond to roughly 60-80 words.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "default": 1024, - "type": "integer" - }, - "model": { - "title": "Model Name", - "description": "The name of the Anthropic model you want to use.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "examples": [ - "claude-opus-4-1-20250805", - "claude-sonnet-4-20250514", - "claude-3-7-sonnet-latest", - "claude-3-5-haiku-latest" - ], - "type": "string" - }, - "stop_sequences": { - "title": "Stop Sequences", - "description": "An array of sequences where the model will stop generating further tokens if found. This can be useful to control the length and content of the output.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "type": "array", - "items": { - "type": "string" - } - }, - "temperature": { - "title": "Temperature", - "description": "The temperature is used for sampling during response generation, which occurs when topP and topK are applied. Temperature controls the degree of randomness in token selection. Lower temperatures are good for prompts that require a less open-ended or creative response, while higher temperatures can lead to more diverse or creative results.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "type": "number", - "maximum": 2, - "minimum": 0 - }, - "top_k": { - "title": "Top K", - "description": "Top-K changes how the model selects tokens for output. A top-K of 1 means the next selected token is the most probable among all tokens in the model's vocabulary (also called greedy decoding), while a top-K of 3 means that the next token is selected from among the three most probable tokens by using temperature.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "type": "integer" - }, - "top_p": { - "title": "Top P", - "description": "Top-P changes how the model selects tokens for output. Tokens are selected from the most probable to least probable until the sum of their probabilities equals the top-P value. For example, if tokens A, B, and C have a probability of 0.3, 0.2, and 0.1 and the top-P value is 0.5, then the model will select either A or B as the next token by using temperature and excludes C as a candidate.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/anthropic/", - "type": "number" - } - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/ai/gemini.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Google Gemini integration", - "description": "Connect to Google Gemini models easily by providing your API key and optional parameters.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "type": "object", - "maxProperties": 1, - "minProperties": 1, - "properties": { - "v1beta": { - "title": "Version v1", - "description": "All settings depend on a specific version, as the vendor might change the API over time.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "type": "object", - "required": [ "credentials" ], - "properties": { - "credentials": { - "title": "API Key", - "description": "Your Google Gemini API key. You can set it as an environment variable for better security.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "type": "string" - }, - "debug": { - "title": "Debug Mode", - "description": "Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "default": false, - "type": "boolean" - }, - "input_template": { - "title": "Input Template", - "description": "A path to a custom [Go template](https://pkg.go.dev/text/template) that sets the payload format sent to Google Gemini. You don't need to set this value unless you want to override the default template making use of all the `variables` listed in this configuration.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "type": "string" - }, - "output_template": { - "title": "Output Template", - "description": "A path to a custom [Go template](https://pkg.go.dev/text/template) that sets how the response from Google Gemini is transformed before being sent to the client. The default template extracts the text from the first choice returned by Google Gemini so in most cases you don't need to set a custom output template.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "type": "string" - }, - "variables": { - "title": "Model Variables", - "description": "The variables specific to the Google Gemini usage that are used to construct the payload.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "type": "object", - "properties": { - "candidate_count": { - "title": "Candidate Count", - "description": "An integer value that specifies how many different completions (responses) the model should generate for a single input prompt. This can be useful for exploring multiple variations of the output.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "default": 1, - "type": "integer" - }, - "extra_payload": { - "title": "Extra Payload", - "description": "A map of additional payload attributes you want to use in your custom `input_template` (this payload is not used in the default template). The attributes set here are accessible in your custom template as `{{ .variables.extra_payload.yourchosenkey }}`. This option helps adding rare customization and future attributes.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "type": "object" - }, - "max_output_tokens": { - "title": "Max Tokens", - "description": "Maximum number of tokens that can be generated in the response. A token is approximately four characters. 100 tokens correspond to roughly 60-80 words.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "type": "integer" - }, - "stop_sequences": { - "title": "Stop Sequences", - "description": "An array of sequences where the model will stop generating further tokens if found. This can be useful to control the length and content of the output.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "type": "array", - "items": { - "type": "string" - } - }, - "temperature": { - "title": "Temperature", - "description": "The temperature is used for sampling during response generation, which occurs when topP and topK are applied. Temperature controls the degree of randomness in token selection. Lower temperatures are good for prompts that require a less open-ended or creative response, while higher temperatures can lead to more diverse or creative results.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "type": "number", - "maximum": 2, - "minimum": 0 - }, - "top_k": { - "title": "Top K", - "description": "Top-K changes how the model selects tokens for output. A top-K of 1 means the next selected token is the most probable among all tokens in the model's vocabulary (also called greedy decoding), while a top-K of 3 means that the next token is selected from among the three most probable tokens by using temperature.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "type": "integer" - }, - "top_p": { - "title": "Top P", - "description": "Top-P changes how the model selects tokens for output. Tokens are selected from the most probable to least probable until the sum of their probabilities equals the top-P value. For example, if tokens A, B, and C have a probability of 0.3, 0.2, and 0.1 and the top-P value is 0.5, then the model will select either A or B as the next token by using temperature and excludes C as a candidate.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/gemini/", - "type": "number" - } - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/ai/llm.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AI LLM Connectors", - "description": "Ready-to-use LLM connectors available for major AI vendors.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/unified-llm-interface/", - "type": "object", - "maxProperties": 1, - "properties": { - "anthropic": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1ai~1anthropic.json" - }, - "gemini": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1ai~1gemini.json" - }, - "mistral": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1ai~1mistral.json" - }, - "openai": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1ai~1openai.json" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/ai/mcp.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "MCP functionality", - "description": "MCP functionality.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "type": "object", - "required": [ "servers" ], - "properties": { - "servers": { - "description": "The array of MCP servers available for linking to endpoints. Each object represents a different MCP server. The entry is only the definition of the server. You must create an endpoint that serves as the entrypoint to each server.", - "type": "array", - "items": { - "type": "object", - "required": [ "name", "version", "title" ], - "properties": { - "title": { - "title": "MCP Server Title", - "description": "The description of the purpose of this MCP Server. Provide a meaningful description to help AI understand its use case.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "examples": [ "Story tracker tools" ], - "type": "string" - }, - "instructions": { - "title": "Instructions", - "description": "The instructions are key for the AI client to understand how to use this server.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "default": "", - "type": "string" - }, - "json_response": { - "title": "JSON Response", - "description": "Set to true if you want the response to be in JSON format. If set to false, the response will be in SSE format (text/event-stream).\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "default": false, - "type": "boolean" - }, - "name": { - "title": "MCP Server Name", - "description": "A unique name for MCP server configuration. This name is an identifier used in the logs or when a title is not provided.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "examples": [ "stories-tracker" ], - "type": "string" - }, - "ping_period": { - "title": "Ping Period", - "description": "Krakend will ping all connected clients from time to time to determine if the session must be kept alive. This duration strings sets the ping period KrakenD will do to its connected clients. When you don't set a value, there is no ping process and KrakenD is unaware of disconnected clients, so it won't report live notifications.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "default": "0s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "stateless": { - "title": "Stateless", - "description": "A stateless server does not validate the Mcp-Session-Id header, and uses a temporary session with default initialization parameters. Any server->client request is rejected immediately as there's no way for the client to respond. Server->Client notifications may reach the client if they are made in the context of an incoming request\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "default": false, - "type": "boolean" - }, - "tools": { - "description": "The Model Context Protocol (MCP) allows servers to expose tools ([RFC](https://modelcontextprotocol.io/specification/2025-06-18/server/tools)) that can be invoked by language models. Tools enable models to interact with internal/external systems. Each tool is uniquely identified by a name and includes metadata describing its schema.", - "type": "array", - "items": { - "type": "object", - "required": [ "name", "title", "description", "workflow" ], - "properties": { - "title": { - "title": "MCP Server Title", - "description": "The description of the purpose of this MCP tool. Provide a meaningful text to help AI understand its use case.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "examples": [ "Story list" ], - "type": "string" - }, - "description": { - "title": "MCP Server Title", - "description": "The description of the purpose of this MCP tool. Provide a meaningful description to help AI understand its use case.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "examples": [ - "Get a list of open stories in tracker matching a search query" - ], - "type": "string" - }, - "type": { - "title": "Media Type", - "description": "The type of the response media.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "default": "text", - "enum": [ "text", "audio", "image" ] - }, - "input_headers": { - "title": "Allowed Headers In", - "description": "Defines the list of all headers allowed to reach the backend when passed.\nBy default, KrakenD won't pass any header from the client to the backend. This list is **case-insensitive**. You can declare headers in lowercase, uppercase, or mixed.\nAn entry `[\"Cookie\"]` forwards all cookies, and a single star element `[\"*\"]` as value forwards everything to the backend (**it's safer to avoid this option**), including cookies. See [headers forwarding](https://www.krakend.io/docs/endpoints/parameter-forwarding/#headers-forwarding)", - "default": [], - "type": "array", - "uniqueItems": true, - "items": { - "title": "Forwarded header", - "examples": [ "User-Agent", "Accept", "*" ], - "type": "string" - } - }, - "input_schema": { - "title": "Input JSON Schema", - "description": "The input JSON schema to validate the input parameters sent by the AI client. The schema is **essential** in most clients to understand how to pass parameters to the MCP server. The schema must be a valid [2020-12 draft JSON Schema](https://json-schema.org/understanding-json-schema/) object.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "type": "object" - }, - "name": { - "title": "MCP Tool Name", - "description": "A unique name for MCP tool configuration. This name is an identifier used in the logs or when a title is not provided.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "examples": [ "stories-list" ], - "type": "string" - }, - "output_schema": { - "title": "Input JSON Schema", - "description": "The input JSON schema to validate the output parameters sent back to the AI client. The schema must be a valid [2020-12 draft JSON Schema](https://json-schema.org/understanding-json-schema/) object.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "type": "object" - }, - "return_error_msg": { - "title": "Return error message", - "description": "Set to true if you want the error message to be returned to the AI client. If set to false, the AI client will only receive a generic error message.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "default": false, - "type": "boolean" - }, - "workflow": { - "title": "Workflow", - "description": "This is the action/pipeline performed by the tool. While you can add a single action to the tool, because actions can be chained and have complex logic, we have called this a workflow, whether is connecting to a single remote service, many, aggreggating, or any other functionality supported by KrakenD. See the [Workflow syntax](https://www.krakend.io/docs/enterprise/endpoints/workflows/) ", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1workflow.json", - "type": "object" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "version": { - "title": "Title", - "description": "The version of the logic behind your MCP Server implementation. This version makes sense to your business and is not linked to anything else.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "examples": [ "0.2.1" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - } - } - }, - "https://www.krakend.io/schema/v2.13/ai/mcp_endpoint.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "MCP endpoint", - "description": "Enterprise only. Declares the current endpoint as an MCP server entry point. \n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "type": "object", - "required": [ "server_name" ], - "properties": { - "server_name": { - "title": "Server name", - "description": "The MCP server you want to attach to this endpoint. When you add this namespace, the endpoint becomes the MCP server entry point URL. The name used must match the name in the `ai/mcp` configuration in the root level.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/", - "examples": [ "stories-tracker" ] - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/ai/mistral.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Mistral integration", - "description": "Connect to Mistral models easily by providing your API key and optional parameters.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "type": "object", - "maxProperties": 1, - "minProperties": 1, - "properties": { - "v1": { - "title": "Version v1", - "description": "All settings depend on a specific version, as the vendor might change the API over time.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "required": [ "credentials", "variables" ], - "properties": { - "credentials": { - "title": "API Key", - "description": "Your Mistral API key. You can set it as an environment variable for better security.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "type": "string" - }, - "debug": { - "title": "Debug Mode", - "description": "Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "default": false, - "type": "boolean" - }, - "input_template": { - "title": "Input Template", - "description": "A path to a custom [Go template](https://pkg.go.dev/text/template) that sets the payload format sent to Mistral. You don't need to set this value unless you want to override the default template making use of all the `variables` listed in this configuration.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "type": "string" - }, - "output_template": { - "title": "Output Template", - "description": "A path to a custom [Go template](https://pkg.go.dev/text/template) that sets how the response from Mistral is transformed before being sent to the client. The default template extracts the text from the first choice returned by Mistral so in most cases you don't need to set a custom output template.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "type": "string" - }, - "variables": { - "title": "Model Variables", - "description": "The variables specific to the Mistral usage that are used to construct the payload.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "type": "object", - "required": [ "model" ], - "properties": { - "extra_payload": { - "title": "Extra Payload", - "description": "A map of additional payload attributes you want to use in your custom `input_template` (this payload is not used in the default template). The attributes set here are accessible in your custom template as `{{ .variables.extra_payload.yourchosenkey }}`. This option helps adding rare customization and future attributes.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "type": "object" - }, - "max_tokens": { - "title": "Max Tokens", - "description": "An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "type": "integer" - }, - "model": { - "title": "Model Name", - "description": "The name of the Mistral model you want to use. The value you provide is passed as is to Mistral and KrakenD does not prove if the model is currently accepted by the vendor. Check the available models on Mistral documentation.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "examples": [ "mistral-small-latest", "codestral-latest" ], - "type": "string" - }, - "n": { - "title": "Number of Completions", - "description": "An integer value that specifies how many different completions (responses) the model should generate for a single input prompt. This can be useful for exploring multiple variations of the output.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "default": 1, - "type": "integer" - }, - "random_seed": { - "title": "Random Seed", - "description": "An integer value to seed the random number generator used by the model. Setting a specific seed can help produce reproducible results across different requests.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "type": "integer" - }, - "safe_prompt": { - "title": "Safe Prompt", - "description": "A boolean flag to enable or disable Mistral's safe prompt feature, which helps filter out inappropriate or harmful content from the model's responses. By default, this feature is enabled to ensure safer interactions.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "default": false, - "type": "boolean" - }, - "stop": { - "title": "Stop Sequences", - "description": "An array of sequences where the model will stop generating further tokens if found. This can be useful to control the length and content of the output.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "type": "array", - "items": { - "type": "string" - } - }, - "temperature": { - "title": "Temperature", - "description": "What sampling temperature to use, recommended between 0.0 and 0.7. Higher values like 0.7 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Change this or top_p but not both.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "type": "number", - "maximum": 2, - "minimum": 0 - }, - "top_p": { - "title": "Top P", - "description": "A float value between 0 and 1 that controls the nucleus sampling for text generation. It represents the cumulative probability threshold for token selection, where only the most probable tokens that add up to this threshold are considered. A higher value (closer to 1) allows for more diverse outputs, while a lower value (closer to 0) makes the output more focused and deterministic. Change this or temperature but not both.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "type": "number" - } - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/ai/openai.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OpenAI integration", - "description": "Connect to OpenAI's GPT models easily by providing your API key and optional parameters.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/mistral/", - "type": "object", - "maxProperties": 1, - "minProperties": 1, - "properties": { - "v1": { - "title": "Version v1", - "description": "All settings depend on a specific version, as the vendor might change the API over time.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/openai/", - "required": [ "credentials", "variables" ], - "properties": { - "credentials": { - "title": "API Key", - "description": "Your OpenAI API key. You can set it as an environment variable for better security.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/openai/", - "examples": [ "sk-xxxx" ], - "type": "string" - }, - "debug": { - "title": "Debug Mode", - "description": "Enables the debug mode to log activity for troubleshooting. Do not set this value to true in production as it may log sensitive data.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/openai/", - "default": false, - "type": "boolean" - }, - "input_template": { - "title": "Input Template", - "description": "A path to a custom [Go template](https://pkg.go.dev/text/template) that sets the payload format sent to OpenAI. You don't need to set this value unless you want to override the default template making use of all the `variables` listed in this configuration.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/openai/", - "type": "string" - }, - "output_template": { - "title": "Output Template", - "description": "A path to a custom [Go template](https://pkg.go.dev/text/template) that sets how the response from OpenAI is transformed before being sent to the client. The default template extracts the text from the first choice returned by OpenAI so in most cases you don't need to set a custom output template.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/openai/", - "type": "string" - }, - "variables": { - "title": "Template Variables", - "description": "The variables specific to the OpenAI usage that are used to construct the payload.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/openai/", - "type": "object", - "required": [ "model" ], - "properties": { - "extra_payload": { - "title": "Extra Payload", - "description": "A map of additional payload attributes you want to use in your custom `input_template` (this payload is not used in the default template). The attributes set here are accessible in your custom template as `{{ .variables.extra_payload.yourchosenkey }}`. This option helps adding rare customization and future attributes.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/openai/", - "type": "object" - }, - "max_output_tokens": { - "title": "Max Output Tokens", - "description": "An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. Setting this value to `0` does not set any limit.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/openai/", - "type": "integer" - }, - "model": { - "title": "Model Name", - "description": "The name of the OpenAI model you want to use. The value you provide is passed as is to OpenAI and KrakenD does not prove if the model is currently accepted by the vendor. Check the available models on OpenAI documentation.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/openai/", - "examples": [ "gpt-5-nano", "gpt-4" ], - "type": "string" - }, - "temperature": { - "title": "Temperature", - "description": "What sampling temperature to use, between `0` and `2`. Higher values like `0.8` will make the output more random, while lower values like `0.2` will make it more focused and deterministic.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/openai/", - "type": "number", - "maximum": 2, - "minimum": 0 - }, - "top_p": { - "title": "Top P", - "description": "The nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/openai/", - "type": "number", - "maximum": 1, - "minimum": 0 - }, - "truncation": { - "title": "Truncation Strategy", - "description": "The strategy to use when truncating messages to fit within the model's context length (, the model will truncate the response to fit the context window by dropping items from the beginning of the conversation.\n\nSee: https://www.krakend.io/docs/enterprise/ai-gateway/openai/", - "default": "disabled", - "enum": [ "auto", "disabled" ] - } - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/async/amqp.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Async AMQP Driver", - "description": "The Async AMQP component enables the AMQP driver for the Async functionality.\n\nSee: https://www.krakend.io/docs/async/amqp/", - "type": "object", - "required": [ "name", "host", "exchange" ], - "properties": { - "auto_ack": { - "title": "Auto ACK", - "description": "When KrakenD retrieves the messages, regardless of the success or failure of the operation, it marks them as ACK. When auto ACK is not used, only successful backend responses do the ACK, and failing messages are requeued. Defaults to `false`.\n\nSee: https://www.krakend.io/docs/async/amqp/", - "default": false, - "type": "boolean" - }, - "delete": { - "title": "Delete", - "description": "When `true`, AMQP deletes the queue when there are no remaining connections. This option is **not recommended** in most of the scenarios. If for instance, the connectivity between KrakenD and AMQP is lost for whatever reason and it's the only client, AMQP will delete the queue no matter the number of messages there are inside, and when KrakenD gets the connection again the queue won't exist and future connections will recreate it again.\n\nSee: https://www.krakend.io/docs/async/amqp/", - "default": false, - "type": "boolean" - }, - "durable": { - "title": "Durable", - "description": "Durable queues will survive server restarts and remain when there are no remaining consumers or bindings. Most of the times `true` is recommended, but depends on the use case.\n\nSee: https://www.krakend.io/docs/async/amqp/", - "default": false, - "type": "boolean" - }, - "exchange": { - "title": "Exchange", - "description": "The entity name where messages are retrieved (it will be created, or it must have a **topic** type if already exists).\n\nSee: https://www.krakend.io/docs/async/amqp/", - "examples": [ "some-exchange" ], - "type": "string" - }, - "exclusive": { - "title": "Exclusive", - "description": "When `true`, AMQP will allow **a single KrakenD client** to access the queue. This option is **not recommended** in environments where the gateway needs high availability and you have several instances running.\n\nSee: https://www.krakend.io/docs/async/amqp/", - "default": false, - "type": "boolean" - }, - "host": { - "title": "Host", - "description": "The connection string, ends in slash. E.g: `amqp://user:password@host:5672/`.\n\nSee: https://www.krakend.io/docs/async/amqp/", - "type": "string" - }, - "nack_discard": { - "title": "NACK Discard", - "description": "When `true`, messages that cannot be processed are discarded instead of being sent back to the queue. This is useful for scenarios where you want to avoid reprocessing failed messages.\n\nSee: https://www.krakend.io/docs/async/amqp/", - "default": false, - "type": "boolean" - }, - "name": { - "title": "Name", - "description": "The queue name.\n\nSee: https://www.krakend.io/docs/async/amqp/", - "type": "string" - }, - "no_local": { - "title": "No local", - "description": "The no_local flag is not supported by RabbitMQ.\n\nSee: https://www.krakend.io/docs/async/amqp/", - "type": "boolean" - }, - "no_wait": { - "title": "No wait", - "description": "When true, do not wait for the server to confirm the request and immediately begin deliveries. If it is not possible to consume, a channel exception will be raised and the channel will be closed.\n\nSee: https://www.krakend.io/docs/async/amqp/", - "type": "boolean" - }, - "prefetch_count": { - "title": "Prefetch count", - "description": "The number of messages you want to prefetch prior to consume them.\n\nSee: https://www.krakend.io/docs/async/amqp/", - "default": 10, - "type": "integer" - }, - "prefetch_size": { - "title": "Prefetch size", - "description": "The number of bytes you want to use to prefetch messages.\n\nSee: https://www.krakend.io/docs/async/amqp/", - "default": 0, - "type": "integer" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/async_agent.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Async Agents", - "description": "Async agents are routines listening to queues or PubSub systems that react to new events and push data to your backends. Through async agents, you can start a lot of consumers to process your events autonomously.\n\nSee: https://www.krakend.io/docs/async/", - "type": "array", - "items": { - "type": "object", - "required": [ "name", "consumer", "backend", "extra_config" ], - "properties": { - "backend": { - "title": "Backend definition", - "description": "The [backend definition](https://www.krakend.io/docs/backends/) (as you might have in any endpoint) indicating where the event data is sent. It is a full backend object definition, with all its possible options, transformations, filters, validations, etc.", - "type": "array", - "items": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend.json" - } - }, - "connection": { - "title": "Connection", - "description": "A key defining all the connection settings between the agent and your messaging system.\n\nSee: https://www.krakend.io/docs/async/", - "type": "object", - "properties": { - "backoff_strategy": { - "title": "Backoff strategy", - "description": "When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the `max_retries`. The backoff strategy defines the delay in seconds in between consecutive failed retries.\n\nSee: https://www.krakend.io/docs/async/", - "default": "fallback", - "enum": [ - "linear", - "linear-jitter", - "exponential", - "exponential-jitter", - "fallback" - ] - }, - "health_interval": { - "title": "Health interval", - "description": "The time between pings checking that the agent is connected to the queue and alive. Regardless of the health interval, if an agent fails, KrakenD will restart it again immediately as defined by `max_retries`and `backoff_strategy`.\n\nSee: https://www.krakend.io/docs/async/", - "default": "1s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit" - }, - "max_retries": { - "title": "Max retries", - "description": "The maximum number of times you will allow KrakenD to retry reconnecting to a broken messaging system. Use 0 for unlimited retries.\n\nSee: https://www.krakend.io/docs/async/", - "default": 0, - "type": "integer" - } - } - }, - "consumer": { - "title": "Consumer", - "description": "Defines all the settings for each agent consuming messages.\n\nSee: https://www.krakend.io/docs/async/", - "required": [ "topic" ], - "properties": { - "max_rate": { - "title": "Max Rate", - "description": "The maximum number of messages you allow each worker to consume per second. Use any of `0` or `-1` for unlimited speed.\n\nSee: https://www.krakend.io/docs/async/", - "default": 0, - "type": "number" - }, - "timeout": { - "title": "Timeout", - "description": "The maximum time the agent will wait to process an event sent to the backend. If the backend fails to process it, the message is reinserted for later consumption. Defaults to the timeout in the root level, or to `2s` if no value is declared.\n\nSee: https://www.krakend.io/docs/async/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit" - }, - "topic": { - "title": "Topic", - "description": "The topic name you want to consume. The syntax depends on the driver. Examples for AMQP: `*`, `mytopic`, `lazy.#`, `*`, `foo.*`.\n\nSee: https://www.krakend.io/docs/async/", - "type": "string" - }, - "workers": { - "title": "Workers", - "description": "The number of workers (consuming processes) you want to start simultaneously for this agent.\n\nSee: https://www.krakend.io/docs/async/", - "default": 1, - "type": "integer" - } - } - }, - "encoding": { - "title": "Backend Encoding", - "description": "Informs KrakenD how to parse the responses of your services.\n\nSee: https://www.krakend.io/docs/backends/supported-encodings/", - "default": "json", - "enum": [ "json", "safejson", "xml", "rss", "string", "no-op" ] - }, - "extra_config": { - "description": "Defines the driver that connects to your queue or PubSub system. In addition, you can place other middlewares to modify the request (message) or the response, apply logic or any other endpoint middleware, but adding the driver is mandatory.\n\nSee: https://www.krakend.io/docs/async/", - "required": [ "async/amqp" ], - "properties": { - "async/amqp": { - "title": "Async Agent extra configuration", - "description": "[See the configuration for async/amqp](https://www.krakend.io/docs/async/amqp/)", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1async~1amqp.json" - } - } - }, - "name": { - "title": "Name", - "description": "A unique name for this agent. KrakenD shows it in the health endpoint and logs and metrics. KrakenD does not check collision names, so make sure each agent has a different name.\n\nSee: https://www.krakend.io/docs/async/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "https://www.krakend.io/schema/v2.13/auth/api-keys.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "API-key Authentication", - "description": "Enterprise only. Enables a Role-Based Access Control (RBAC) mechanism by reading the `Authorization` header of incoming requests.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "type": "object", - "required": [ "keys" ], - "properties": { - "hash": { - "title": "Hash", - "description": "The hashing function used to store the value of the key. When you use `plain` the API key is written as it will passed by the user. The rest of the hashes require you to save the API key after applying the desired function.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "default": "plain", - "enum": [ "plain", "fnv128", "sha256", "sha1" ] - }, - "identifier": { - "title": "Identifier", - "description": "The header name or the query string name that contains the API key. Defaults to `key` when using the `query_string` strategy and to `Authorization` when using the `header` strategy. The identifier set here is used across all endpoints with API key authentication enabled, but they can override this entry individually.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "examples": [ "Authorization", "X-Key" ], - "default": "Authorization", - "type": "string" - }, - "keys": { - "title": "API Keys", - "description": "A list of objects defining each API Key.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "type": "array", - "items": { - "type": "object", - "properties": { - "key": { - "title": "API Key", - "description": "The secret key used by the client to access the resources. Don't have a key? Execute in a terminal `uuidgen` to generate a random one.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "type": "string" - }, - "roles": { - "title": "Roles", - "description": "All the roles this user has. See roles as all the identifying labels that belong to this client.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "type": "array", - "items": { - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "propagate_role": { - "title": "Propagate role as header", - "description": "The name of a header that will propagate to the backend containing the matching role. The backend receives no header when the string is empty, or the attribute is not declared. Otherwise, the backend receives the declared header name containing **the first matching role of the user**. The header value will be `ANY` when the endpoint does not require roles. For instance, if an API key has roles `[A, B]`, and the endpoint demands roles `[B, C]`, the backend will receive a header with the value `B`.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "examples": [ "X-Krakend-Role" ], - "default": "", - "type": "string" - }, - "salt": { - "title": "Salt", - "description": "A salt string for the desired hashing function. When provided, the API key is concatenated after the salt string and both hashed together.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "examples": [ "mySalt" ], - "default": "", - "type": "string" - }, - "strategy": { - "title": "Strategy", - "description": "Specifies where to expect the user API key, whether inside a header or as part of the query string. The strategy set here is used across all endpoints with API key authentication enabled, but they can override this entry individually.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "default": "header", - "enum": [ "header", "query_string" ] - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/auth/aws-sigv4.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "aws-sigv4 Authentication", - "description": "Enterprise only. Enables AWS Sigv4 authentication between KrakenD and Google Cloud service account.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/", - "type": "object", - "required": [ "region", "service" ], - "properties": { - "assume_role_arn": { - "title": "Assume Role ARN", - "description": "The Amazon Resource Name (ARN) of the role to assume.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/", - "examples": [ "arn:aws:sts::{account ID}:assumed-role/{resource}" ], - "type": "string" - }, - "debug": { - "title": "Debug", - "description": "Enables debug logging for AWS Sigv4 signing process.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/", - "default": false, - "type": "boolean" - }, - "region": { - "title": "Region", - "description": "The AWS region where the service is deployed.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/", - "examples": [ "us-east-1" ], - "type": "string" - }, - "service": { - "title": "Service", - "description": "The name of the service in AWS you'd like to sign the request.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/", - "examples": [ "dynamodb" ], - "type": "string" - }, - "sts_region": { - "title": "STS Region", - "description": "The AWS region where the STS service is deployed.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/aws-sigv4/", - "examples": [ "us-west-1" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/auth/basic.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "description": "Enterprise only. The Basic Authentication component protects the access to selected endpoints using basic username and password credentials.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/", - "type": "object", - "properties": { - "htpasswd_path": { - "title": "Path to htpasswd file", - "description": "Absolute Path to the `htpasswd` filename (recommended) or relative `./` to the workdir (less secure).\n\nSee: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/", - "examples": [ "/path/to/.htpasswd" ], - "type": "string" - }, - "users": { - "title": "Additional users", - "description": "**Additional** users to the `htpasswd` file can be declared directly inside the configuration. The content of both places will be merged (and this list will overwrite users already defined in the htpasswd file). The key of each entry is the username, and the value the bcrypt.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/basic-authentication/", - "examples": [ - { - "admin": "$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ...", - "user2": "$2y$05$HpdPmv2Z3h3skMCVaf/CEep/UUBuhZ..." - } - ], - "type": "object", - "patternProperties": { - "(.*)": { - "type": "string" - } - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/auth/client-credentials.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OAuth2 client-credentials", - "description": "2-legged OAuth2 flow: Request to your authorization server an access token to reach protected resources.\n\nSee: https://www.krakend.io/docs/authorization/client-credentials/", - "type": "object", - "required": [ "client_id", "client_secret", "token_url" ], - "properties": { - "client_id": { - "title": "Client ID", - "description": "The Client ID provided to the Auth server\n\nSee: https://www.krakend.io/docs/authorization/client-credentials/", - "type": "string" - }, - "client_secret": { - "title": "Client secret", - "description": "The secret string provided to the Auth server.\n\nSee: https://www.krakend.io/docs/authorization/client-credentials/", - "examples": [ "mys3cr3t" ], - "type": "string" - }, - "endpoint_params": { - "title": "Endpoint parameters", - "description": "Any additional parameters you want to include **in the payload** when requesting the token. For instance, adding the `audience` request parameter may denote the target API for which the token should be issued.\n\nSee: https://www.krakend.io/docs/authorization/client-credentials/", - "examples": [ - { - "audience": [ "YOUR-AUDIENCE" ] - } - ], - "type": "object" - }, - "scopes": { - "title": "Scopes", - "description": "A comma-separated list of scopes needed, e.g.: `scopeA,scopeB`\n\nSee: https://www.krakend.io/docs/authorization/client-credentials/", - "examples": [ "scopeA,scopeB" ], - "type": "string" - }, - "token_url": { - "title": "Token URL", - "description": "The endpoint URL where the negotiation of the token happens\n\nSee: https://www.krakend.io/docs/authorization/client-credentials/", - "examples": [ - "https://your.custom.identity.service.tld/token_endpoint" - ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/auth/gcp.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "GCP Authentication", - "description": "Enterprise only. Enables GCP authentication between KrakenD and Google Cloud service account.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/gcp/", - "type": "object", - "anyOf": [ - { - "required": [ "audience" ] - }, - { - "required": [ "audience", "credentials_file" ] - }, - { - "required": [ "audience", "credentials_json" ] - } - ], - "properties": { - "audience": { - "title": "Audience", - "description": "The audience in GCP looks like an URL, and contains the destination service you will ask a token for. Most of the times this URL will match exactly with the `host` entry.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/gcp/", - "examples": [ "https://gcptest-76fewi6rca-uc.a.run.app" ], - "type": "string" - }, - "credentials_file": { - "title": "Path to credentials file", - "description": "The relative or absolute path to a credentials file in JSON format that contains all the credentials to authenticate API calls to the given service account.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/gcp/", - "examples": [ "/etc/krakend/gcp.json" ], - "type": "string" - }, - "credentials_json": { - "title": "JSON credentials file", - "description": "An inline JSON object containing all the credentials fields to authenticate to GCP.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/gcp/", - "examples": [ - { - "type": "service_account", - "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", - "auth_uri": "https://accounts.google.com/o/oauth2/auth", - "client_email": "xyz@developer.gserviceaccount.com", - "client_id": "123", - "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/xyz%40developer.gserviceaccount.com", - "private_key": "-----BEGIN PRIVATE KEY-----\nSOME_KEY\n-----END PRIVATE KEY-----\n", - "private_key_id": "private_key_id", - "project_id": "project_id", - "token_uri": "https://accounts.google.com/o/oauth2/token" - } - ], - "type": "object" - }, - "custom_claims": { - "title": "Custom claims", - "description": "Custom private claims that you can optionally add to an ID token.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/gcp/", - "type": "object" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/auth/jose.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Shared JWK cache", - "description": "Enables global configurations for the HTTP client responsible of downloading and caching the JWK URLs for token validation and signing.", - "type": "object", - "required": [ "shared_cache_duration" ], - "properties": { - "shared_cache_duration": { - "title": "Shared cache duration", - "description": "The cache duration in seconds for the JWK client retrieving the `jwk_url`. The endpoint must enable the `cache` option in order to use this second level cache.\n\nSee: https://www.krakend.io/docs/authorization/jwk-caching/", - "type": "integer" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/auth/ntlm.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "NTLM Authentication", - "description": "Enterprise only. Enables NTLM authentication between KrakenD and a Microsoft server such as Dynamics.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/ntlm/", - "type": "object", - "required": [ "user", "password" ], - "properties": { - "password": { - "title": "Password", - "description": "The password you will use, in clear text.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/ntlm/", - "examples": [ "myp4ssw0rd" ], - "type": "string" - }, - "user": { - "title": "User", - "description": "The username you will send as NTLM authentication user.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/ntlm/", - "examples": [ "krakendclient" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/auth/revoker.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Revoke Server", - "description": "The API Gateway authorizes users that provide valid tokens according to your criteria, but at some point, you might want to change your mind and decide to revoke JWT tokens that are still valid.", - "type": "object", - "required": [ "N", "P", "hash_name", "TTL", "port", "token_keys" ], - "properties": { - "N": { - "title": "Number of elements", - "description": "The maximum `N`umber of elements you want to keep in the bloom filter. Tens of millions work fine on machines with low resources.\n\nSee: https://www.krakend.io/docs/authorization/revoking-tokens/", - "examples": [ 10000000 ], - "type": "integer" - }, - "P": { - "title": "Probability", - "description": "The `P`robability of returning a false positive. E.g.,`1e-7` for one false positive every 10 million different tokens. The values `N` and `P` determine the size of the resulting bloom filter to fulfill your expectations. E.g: 0.0000001\n\nSee: https://www.krakend.io/docs/authorization/revoking-tokens/", - "examples": [ 1e-07, 1e-07 ], - "type": "number" - }, - "TTL": { - "title": "Time To Live", - "description": "The lifespan of the JWT you are generating in seconds. The value must match the expiration you are setting in the identity provider when creating the tokens.\n\nSee: https://www.krakend.io/docs/authorization/revoking-tokens/", - "type": "integer" - }, - "hash_name": { - "title": "Hash function name", - "description": "Either `optimal` (recommended) or `default`. The `optimal` consumes less CPU but has less entropy when generating the hash, although the loss is negligible.\n\nSee: https://www.krakend.io/docs/authorization/revoking-tokens/", - "enum": [ "optimal", "default" ] - }, - "port": { - "title": "Port", - "description": "The port number exposed on each KrakenD instance for the RPC service to interact with the bloomfilter. This port is allocated only to the clients (running KrakenDs).\n\nSee: https://www.krakend.io/docs/authorization/revoking-tokens/", - "type": "integer" - }, - "revoke_server_api_key": { - "title": "Revoke Server Ping URL", - "description": "A string used as an exchange API key to secure the communication between the Revoke Server and the KrakenD instances and to consume the REST API of the Revoker Server as well. E.g., a string generated with `uuidgen`.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/revoke-server/", - "examples": [ "639ee23f-f4c5-40c4-855c-912bf01fae87" ], - "type": "string" - }, - "revoke_server_max_retries": { - "title": "Revoke Server Max Retries", - "description": "Maximum number of retries after a connection fails. When the value is less than zero it is changed automatically to zero.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/revoke-server/", - "default": 0, - "type": "integer" - }, - "revoke_server_max_workers": { - "title": "Max workers", - "description": "How many workers are used concurrently to execute an action (e.g., push a token) to all registered instances, allowing you to limit the amount of memory consumed by the server. For example, if you have 100 KrakenD servers and need to push 5MB of data each, you need to send 500MB in total. A max_workers=5 will consume a maximum of `5MB x 5 workers = 25MB` of memory in a given instant. Defaults to the same number of CPUs available.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/revoke-server/", - "default": 5, - "type": "integer" - }, - "revoke_server_ping_interval": { - "title": "Revoke Server ping interval", - "description": "Time the server and the client wait to verify they are alive with each other (health check). Defaults to `30s`. Do not lower this value a lot; otherwise, you will have a lot of internal traffic.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/revoke-server/", - "examples": [ "30s" ], - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "revoke_server_ping_url": { - "title": "Revoke Server Ping URL", - "description": "The address to the `/instances` endpoint in the Revoke Server.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/revoke-server/", - "examples": [], - "type": "string" - }, - "token_keys": { - "title": "Token keys", - "description": "The list with all the claims in your JWT payload that need watching. These fields establish the criteria to revoke accesses in the future. The Revoker does not use this value, only the clients.\n\nSee: https://www.krakend.io/docs/authorization/revoking-tokens/", - "examples": [ "jti" ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/auth/signer.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "JWT signer", - "description": "creates a wrapper for your login endpoint that signs with your secret key the selected fields of the backend payload right before returning the content to the end-user.\n\nSee: https://www.krakend.io/docs/authorization/jwt-signing/", - "type": "object", - "oneOf": [ - { - "required": [ "alg", "jwk_local_path", "disable_jwk_security" ] - }, - { - "required": [ "alg", "jwk_url" ] - } - ], - "required": [ "alg", "kid", "keys_to_sign" ], - "properties": { - "alg": { - "title": "Algorithm", - "description": "The hashing algorithm used by the issuer. Usually `RS256`. The algorithm you choose directly affects the CPU consumption.\n\nSee: https://www.krakend.io/docs/authorization/jwt-signing/", - "enum": [ - "EdDSA", - "HS256", - "HS384", - "HS512", - "RS256", - "RS384", - "RS512", - "ES256", - "ES384", - "ES512", - "PS256", - "PS384", - "PS512" - ] - }, - "cipher_suites": { - "title": "Cipher suites", - "description": "Override the default cipher suites (see [JWT validation](https://www.krakend.io/docs/authorization/jwt-signing/)). Unless you have a legacy JWK, **you don't need to set this value**.", - "default": [ 49199, 49195, 49200, 49196, 52392, 52393 ], - "type": "array", - "items": { - "title": "Object in array", - "description": "\n\nSee: https://www.krakend.io/docs/authorization/jwt-signing/", - "enum": [ - 5, - 10, - 47, - 53, - 60, - 156, - 157, - 49159, - 49161, - 49162, - 49169, - 49170, - 49171, - 49172, - 49187, - 49191, - 49199, - 49195, - 49200, - 49196, - 52392, - 52393 - ] - } - }, - "cypher_key": { - "title": "Cypher key", - "description": "The cyphering key.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "type": "string" - }, - "disable_jwk_security": { - "title": "Disable_jwk_security", - "description": "Disables HTTP security of the JWK client and allows insecure connections (plain HTTP) to download the keys. The flag should be `false` when you use HTTPS, and `true` when using plain HTTP or loading the key from a local file.\n\nSee: https://www.krakend.io/docs/enterprise/authorization/jwt-validation/", - "default": false, - "type": "boolean" - }, - "full": { - "title": "Full format", - "description": "Use JSON format instead of the compact form JWT provides.\n\nSee: https://www.krakend.io/docs/enterprise/authorization/jwt-validation/", - "default": false, - "type": "boolean" - }, - "jwk_fingerprints": { - "title": "JWK Fingerprints", - "description": "A list of fingerprints (the unique identifier of the certificate) for certificate pinning and avoid man in the middle attacks. Add fingerprints in base64 format.\n\nSee: https://www.krakend.io/docs/authorization/jwt-signing/", - "type": "array", - "items": { - "type": "string" - } - }, - "jwk_local_ca": { - "title": "Local CA", - "description": "Path to the CA’s certificate verifying a secure connection when downloading the JWK. Use when not recognized by the system (e.g., self-signed certificates).\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "type": "string" - }, - "jwk_local_path": { - "title": "JWK local path", - "description": "Local path to the JWK public keys, has preference over `jwk_url`. Instead of pointing to an external URL (with `jwk_url`), public keys are kept locally, in a plain JWK file (security alert!), or encrypted. When encrypted, also add `secret_url` and `cypher_key`.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "examples": [ "./jwk.txt" ], - "type": "string" - }, - "jwk_url": { - "title": "JWK URL", - "description": " The URL to the JWK endpoint with the private keys used to sign the token.\n\nSee: https://www.krakend.io/docs/authorization/jwt-signing/", - "examples": [ "http://your-backend/jwk/symmetric.json" ], - "type": "string" - }, - "keys_to_sign": { - "title": "Keys to sign", - "description": "List of all the specific keys that need signing (e.g., `refresh_token` and `access_token`).\n\nSee: https://www.krakend.io/docs/authorization/jwt-signing/", - "examples": [ "access_token", "refresh_token" ], - "type": "array", - "items": { - "type": "string" - } - }, - "kid": { - "title": "Kid", - "description": "The key ID purpose is to match a specific key, as the jwk_url might contain several keys.\n\nSee: https://www.krakend.io/docs/enterprise/authorization/jwt-validation/", - "examples": [ "sim2" ], - "type": "string" - }, - "leeway": { - "title": "Leeway", - "description": "A margin of extra time where you will still accept the token after its expiration date. You should not accept expired tokens other than enabling two environments that are not perfectly synchronized and have minor clock drifts to accept each other differences. Any value specified here will be rounded to seconds, with a minimum of one second.\n\nSee: https://www.krakend.io/docs/authorization/jwt-signing/", - "examples": [ "1m", "1s" ], - "default": "1s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "secret_url": { - "title": "Secret's URL", - "description": "An URL with a custom scheme using one of the supported providers (e.g.: `awskms://keyID`) ([see providers](https://www.krakend.io/docs/authorization/jwt-validation/#accepted-providers-for-encrypting-payloads)).\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "examples": [ - "base64key://smGbjm71Nxd1Ig5FS0wj9SlbzAIrnolCz9bQQ6uAhl4=", - "awskms://keyID", - "azurekeyvault://keyID", - "gcpkms://projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEY_RING]/cryptoKeys/[KEY]", - "hashivault://keyID" - ], - "type": "string", - "pattern": "(base64key|awskms|azurekeyvault|gcpkms|hashivault)://(.*)" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/auth/validator.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "JWT validator", - "description": "Protect endpoints from public usage by validating JWT tokens generated by any industry-standard OpenID Connect (OIDC) integration.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "type": "object", - "oneOf": [ - { - "required": [ "alg", "jwk_local_path" ] - }, - { - "required": [ "alg", "jwk_url" ] - } - ], - "properties": { - "alg": { - "title": "Algorithm", - "description": "The hashing algorithm used by the token issuer.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "default": "RS256", - "enum": [ - "EdDSA", - "HS256", - "HS384", - "HS512", - "RS256", - "RS384", - "RS512", - "ES256", - "ES384", - "ES512", - "PS256", - "PS384", - "PS512" - ] - }, - "audience": { - "title": "Audience", - "description": "Reject tokens that do not contain ALL audiences declared in the list.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "examples": [ - [ "audience1" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "auth_header_name": { - "title": "Authorization header", - "description": "Allows to parse the token from a custom header.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "examples": [ "X-Custom-Auth" ], - "default": "Authorization", - "type": "string" - }, - "cache": { - "title": "Cache", - "description": "Set this value to `true` (recommended) to stop downloading keys on every request and store them in memory for the next `cache_duration` period and avoid hammering the key server, as recommended for performance. Do not use this flag when using `jwk_local_ca`.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "default": false, - "type": "boolean" - }, - "cache_duration": { - "title": "Cache duration", - "description": "The cache duration in seconds when the `cache` is enabled. 15 minutes when unset.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "default": 900, - "type": "integer" - }, - "cipher_suites": { - "title": "Cipher suites", - "description": "Override the default cipher suites. Use it if you want to enforce an even higher security standard.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "default": [ 49199, 49195, 49200, 49196, 52392, 52393 ], - "type": "array", - "items": { - "title": "Object in array", - "description": "\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "enum": [ - 5, - 10, - 47, - 53, - 60, - 156, - 157, - 49159, - 49161, - 49162, - 49169, - 49170, - 49171, - 49172, - 49187, - 49191, - 49199, - 49195, - 49200, - 49196, - 52392, - 52393 - ] - } - }, - "cookie_key": { - "title": "Cookie key", - "description": "Add the key name of the cookie containing the token when it is not passed in the headers\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "examples": [ "cookie_jwt" ], - "type": "string" - }, - "cypher_key": { - "title": "Cypher key", - "description": "The cyphering key.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "type": "string" - }, - "disable_jwk_security": { - "title": "Disable_jwk_security", - "description": "When true, disables security of the JWK client and allows insecure connections (plain HTTP) to download the keys. Useful for development environments.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "default": false, - "type": "boolean" - }, - "failed_jwk_key_cooldown": { - "title": "Failed JWK Key cooldown", - "description": "When a request comes with a token declaring an unknown `kid` (or the key strategy you choose), and the JWK is in a remote destination, KrakenD downloads the JWK from the Identity Provider for its recognition. Suppose there is a network failure, or the key is not in the list (e.g., you rotated the keys without anticipation). In that case, you can tell the gateway not to contact the Identity Provider again during the time specified here. We recommend setting this value, even with a low time (e.g., `10s`), to prevent misconfigurations from hammering your Identity Providers. Any values under one second are ignored.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "examples": [ "1m", "10s", "1h" ], - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "issuer": { - "title": "Issuer", - "description": "When set, tokens not matching the issuer are rejected.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "examples": [ "issuer" ], - "type": "string" - }, - "jwk_fingerprints": { - "title": "Roles", - "description": "A list of fingerprints (the certificate's unique identifier) for certificate pinning and avoid man-in-the-middle attacks. Add fingerprints in base64 format.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "type": "array", - "items": { - "type": "string" - } - }, - "jwk_local_ca": { - "title": "Local CA", - "description": "Path to the CA's certificate verifying a secure connection when downloading the JWK. Use when not recognized by the system (e.g., self-signed certificates).\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "type": "string" - }, - "jwk_local_path": { - "title": "JWK local path", - "description": "Local path to the JWK public keys, has preference over `jwk_url`. Instead of pointing to an external URL (with `jwk_url`), public keys are kept locally, in a plain JWK file (security alert!), or encrypted. When encrypted, also add `secret_url` and `cypher_key`.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "examples": [ "./jwk.txt" ], - "type": "string" - }, - "jwk_url": { - "title": "JWK URL", - "description": "The URL to the JWK endpoint with the public keys used to verify the token's authenticity and integrity. Use with `cache` to avoid re-downloading the key on every request. Consider enabling [shared caching](https://www.krakend.io/docs/authorization/jwk-caching/) too. The identity server will receive an HTTP(s) request from KrakenD with a KrakenD user agent, and the identity server must reply with a JSON object and a content-type `application/jwk-set+json` or `application/json`.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "examples": [ - "https://some-domain.auth0.com/.well-known/jwks.json", - "http://KEYCLOAK:8080/auth/realms/master/protocol/openid-connect/certs", - "https://yourOktaBaseUrl/v1/keys" - ], - "type": "string" - }, - "key_identify_strategy": { - "title": "Key identify strategy", - "description": "Allows strategies other than `kid` to load keys.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "enum": [ "kid", "x5t", "x5t#S256", "kid_x5t" ] - }, - "leeway": { - "title": "Leeway", - "description": "A margin of time where you will accept an already expired token. You should not accept expired tokens other than enabling two environments that are not perfectly synchronized and have minor clock drifts to accept each other differences. Any value specified here will be rounded to seconds, with a minimum of one second.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "examples": [ "1m", "1s" ], - "default": "1s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "operation_debug": { - "title": "Debug", - "description": "When `true`, any JWT **validation operation** gets printed in the log with a level `ERROR`. You will see if a client does not have sufficient roles, the allowed claims, scopes, and other useful information.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "default": false, - "type": "boolean" - }, - "propagate_claims": { - "title": "Claims to propagate", - "description": "Enables passing claims in the backend's request header. You can pass nested claims using the dot `.` operator. E.g.: `realm_access.roles`.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "type": "array", - "items": { - "type": "array", - "maxItems": 2, - "minItems": 2, - "items": { - "type": "string" - } - } - }, - "propagate_claims_preserve_array": { - "title": "Preserve array structure", - "description": "When set to `true`, the JWT claims that are propagated to the backend will preserve their array structure as multi-value headers, if applies. If set to `false`, arrays will be converted to comma-separated strings.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "default": false, - "type": "boolean" - }, - "roles": { - "title": "Roles", - "description": " When set, the JWT token not having at least one of the listed roles is rejected.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "type": "array", - "items": { - "type": "string" - } - }, - "roles_key": { - "title": "Roles key", - "description": "When validating users through roles, provide the key name inside the JWT payload that lists their roles. If this key is nested inside another object, add `roles_key_is_nested` and use the dot notation `.` to traverse each level. E.g.: `resource_access.myclient.roles` represents the payload `{resource_access: { myclient: { roles: [\"myrole\"] } }`. Notice that the roles object you choose is a list, not a map.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "examples": [ "resource_access.myclient.roles" ], - "type": "string" - }, - "roles_key_is_nested": { - "title": "Roles key is nested", - "description": "If the roles key uses a nested object using the `.` dot notation, you must set it to `true` to traverse the object.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "type": "boolean" - }, - "scopes": { - "title": "Scopes", - "description": "A list of scopes to validate. The token, after decoding it, can have the scopes declared as a space-separated list, e.g.: `\"my_scopes\": \"resource1:action1 resource3:action7\"` or inside a list, e.g.: `\"my_scopes\": [\"resource1:action1\",\"resource3:action7\"]`.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "type": "array", - "items": { - "type": "string" - } - }, - "scopes_key": { - "title": "Scopes key", - "description": "The key name where KrakenD can find the scopes. The key can be a nested object using the `.` dot notation, e.g.: `data.access.my_scopes`.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "type": "string" - }, - "scopes_matcher": { - "title": "Scopes matcher", - "description": "Defines if the user needs to have in its token at least one of the listed claims (`any`), or `all` of them.\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "default": "any", - "enum": [ "any", "all" ] - }, - "secret_url": { - "title": "Secret's URL", - "description": "An URL with a custom scheme using one of the supported providers (e.g.: `awskms://keyID`) (see providers).\n\nSee: https://www.krakend.io/docs/authorization/jwt-validation/", - "examples": [ - "base64key://smGbjm71Nxd1Ig5FS0wj9SlbzAIrnolCz9bQQ6uAhl4=", - "awskms://keyID", - "azurekeyvault://keyID", - "gcpkms://projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEY_RING]/cryptoKeys/[KEY]", - "hashivault://keyID" - ], - "type": "string", - "pattern": "(base64key|awskms|azurekeyvault|gcpkms|hashivault)://(.*)" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/backend.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Backend Object", - "description": "A backend object is an array of all the services that an endpoint connects to. It defines the list of hostnames that connects to and the URL to send or receive the data.", - "type": "object", - "required": [ "url_pattern" ], - "properties": { - "allow": { - "title": "Allow (data manipulation)", - "description": "**Only return the fields in the list**. Only the matching fields (case-sensitive) are returned in the final response. Use a dot `.` separator to define nested attributes, e.g.: `a.b` returns `{\"a\":{\"b\": true}}` \n\nSee: https://www.krakend.io/docs/backends/data-manipulation/", - "examples": [ - [ "user_id", "field1.subfield2" ] - ], - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "deny": { - "title": "Deny (data manipulation)", - "description": "**Don't return the fields in the list**. All matching fields (case-sensitive) defined in the list, are removed from the response. Use a dot `.` separator to define nested attributes, e.g.: `a.b` removes `{\"a\":{\"b\": true}}`.\n\nSee: https://www.krakend.io/docs/backends/data-manipulation/", - "examples": [ - [ "token", "CVV", "password" ] - ], - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "disable_host_sanitize": { - "title": "Disable host sanitize", - "description": "Set it to `true` when the host doesn't need to be checked for an HTTP protocol. This is the case of `sd=dns` or when using other protocols like `amqp://`, `nats://`, `kafka://`, etc. When set to true, and the protocol is not HTTP, KrakenD fails with an `invalid host` error.", - "default": false, - "type": "boolean" - }, - "encoding": { - "title": "Backend Encoding", - "description": "Defines your [needed encoding](https://www.krakend.io/docs/backends/supported-encodings/) to set how to parse the response. Defaults to the value of its endpoint's `encoding`, or to `json` if not defined anywhere else. Notice that `fast-json` and `yaml` are for Enterprise only.\n\nSee: https://www.krakend.io/docs/backends/supported-encodings/", - "default": "json", - "enum": [ - "json", - "safejson", - "fast-json", - "xml", - "rss", - "string", - "no-op", - "yaml" - ] - }, - "extra_config": { - "title": "Backend Extra configuration", - "description": "When there is additional configuration related to a specific component or middleware (like a circuit breaker, rate limit, etc.), it is declared under this section.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend_extra_config.json", - "type": "object" - }, - "group": { - "title": "Group (data manipulation)", - "description": "Instead of placing all the response attributes in the root of the response, create a new key and encapsulate the response inside.\n\nSee: https://www.krakend.io/docs/backends/data-manipulation/", - "default": "backend1", - "type": "string" - }, - "host": { - "title": "Host array", - "description": "An array with all the available hosts to [load balance](https://www.krakend.io/docs/throttling/load-balancing/#balancing-egress-traffic-to-upstream) requests, including the schema (when possible) `schema://host:port`. E.g.: ` https://my.users-ms.com`. If you are in a platform where hosts or services are balanced (e.g., a K8S service), write a single entry in the array with the service name/balancer address. Defaults to the `host` declaration at the configuration's root level, and the service fails starting when there is none.", - "type": "array", - "items": { - "type": "string", - "pattern": ".+", - "minLength": 1 - } - }, - "input_headers": { - "title": "Allowed Headers In", - "description": "A second level of header filtering that defines the list of all headers allowed to reach this backend when different than the endpoint.\nBy default, all headers in the endpoint `input_headers` reach the backend, unless otherwise specified here. An empty list `[]` is considered a zero-value and allows all headers to pass. Use `[\"\"]` to explicitly remove all headers. See [headers forwarding](https://www.krakend.io/docs/endpoints/parameter-forwarding/#headers-forwarding)", - "default": [], - "type": "array", - "uniqueItems": true, - "items": { - "examples": [ - [ "*" ], - [ "User-Agent", "Accept" ] - ], - "type": "string" - } - }, - "input_query_strings": { - "title": "Allowed Querystrings In", - "description": "A second level of query string filtering that defines the list of all query strings allowed to reach this backend when different than the endpoint.\nBy default, all query strings in the endpoint `input_query_strings` reach the backend, unless otherwise specified here. An empty list `[]` is considered a zero-value and allows all headers to pass. Use `[\"\"]` to explicitly remove all query strings. See [query strings forwarding](https://www.krakend.io/docs/endpoints/parameter-forwarding/#query-string-forwarding)", - "default": [], - "type": "array", - "uniqueItems": true, - "items": { - "examples": [ - [ "*" ], - [ "page", "limit" ] - ], - "type": "string" - } - }, - "is_collection": { - "title": "Is a collection/array", - "description": "Set to true when your API does not return an object {} but a collection []\n\nSee: https://www.krakend.io/docs/backends/data-manipulation/", - "default": true, - "type": "boolean" - }, - "mapping": { - "title": "Mapping", - "description": "Mapping, or also known as renaming, let you change the name of the fields of the generated responses, so your composed response would be as close to your use case as possible without changing a line on any backend.\n\nSee: https://www.krakend.io/docs/backends/data-manipulation/", - "examples": [ - { - "from": "to" - } - ], - "type": "object" - }, - "method": { - "title": "Method", - "description": "The method sent to this backend in **uppercase**. The method does not need to match the endpoint's method. When the value is omitted, it uses the same endpoint's method. Some special methods will require you to use no-op encoding (like HEAD or OPTIONS) when these return an empty body.\n\nSee: https://www.krakend.io/docs/backends/", - "default": "GET", - "enum": [ - "GET", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS", - "HEAD", - "CONNECT", - "TRACE" - ] - }, - "sd": { - "title": "Service Discovery", - "description": "The [Service Discovery](https://www.krakend.io/docs/backends/service-discovery/) system to resolve your backend services. Defaults to `static` (no external Service Discovery). Use `dns` to use DNS SRV records. Use `dns-shared` to share the DNS resolution between backends using the same hosts.\n\nSee: https://www.krakend.io/docs/backends/", - "default": "static", - "enum": [ "static", "dns", "dns-shared" ] - }, - "sd_scheme": { - "title": "Service Discovery Scheme", - "description": "The [Service Discovery](https://www.krakend.io/docs/backends/service-discovery/) scheme to connect to your backend services.\n\nSee: https://www.krakend.io/docs/backends/", - "examples": [ "http", "https" ], - "default": "http", - "type": "string" - }, - "target": { - "title": "Target (data manipulation)", - "description": "Removes the matching object from the reponse and returns only its contents.\n\nSee: https://www.krakend.io/docs/backends/data-manipulation/", - "examples": [ "data", "content", "response" ], - "type": "string" - }, - "url_pattern": { - "title": "URL Pattern", - "description": "The path inside the service (no protocol, no host, no method). E.g: `/users`. Some functionalities under `extra_config` might drop the requirement of declaring a valid `url_pattern`, but they are exceptions. The URL must be RESTful, if it is not (e.g.: `/url.{some_variable}.json`), then see how to [disable RESTful checking](#disable-restful-checking).\n\nSee: https://www.krakend.io/docs/backends/", - "examples": [ "/users", "/user/{id_user}" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/backend/amqp/consumer.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AMQP Consumer", - "description": "The AMQP component allows to send and receive messages to and from a queue through the API Gateway.\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "type": "object", - "required": [ "name", "exchange", "routing_key" ], - "properties": { - "auto_ack": { - "title": "Auto ACK", - "description": "When KrakenD retrieves the messages, regardless of the success or failure of the operation, it marks them as `ACK`nowledge.\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "default": false, - "type": "boolean" - }, - "backoff_strategy": { - "title": "Backoff strategy", - "description": "When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the `max_retries`. The backoff strategy defines the delay in seconds in between consecutive failed retries. [Check the meaning of each strategy](https://www.krakend.io/docs/async/#backoff-strategies).\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "default": "fallback", - "enum": [ - "linear", - "linear-jitter", - "exponential", - "exponential-jitter", - "fallback" - ] - }, - "delete": { - "title": "Delete", - "description": "When `true`, AMQP deletes the queue when there are no remaining connections. This option is **not recommended** in most of the scenarios. If for instance, the connectivity between KrakenD and AMQP is lost for whatever reason and it's the only client, AMQP will delete the queue no matter the number of messages there are inside, and when KrakenD gets the connection again the queue won't exist and future connections will recreate it again.\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "default": false, - "type": "boolean" - }, - "durable": { - "title": "Durable", - "description": "Durable queues will survive server restarts and remain when there are no remaining consumers or bindings. `true` is recommended, but depends on the use case. \n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "default": false, - "type": "boolean" - }, - "exchange": { - "title": "Exchange", - "description": "The exchange name (must have a **topic** type if already exists).\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "examples": [ "some-exchange" ], - "type": "string" - }, - "exclusive": { - "title": "Exclusive", - "description": "When `true`, AMQP will allow **a single KrakenD instance** to access the queue. This option is **not recommended** in environments where the gateway needs high availability and you have several instances running.\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "default": false, - "type": "boolean" - }, - "max_retries": { - "title": "Max retries", - "description": "The maximum number of times you will allow KrakenD to retry reconnecting to a broken messaging system. During startup KrakenD will wait for a maximum of 3 retries before starting to use this policy. Use 0 for unlimited retries.\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "default": 0, - "type": "integer" - }, - "nack_discard": { - "title": "NACK Discard", - "description": "When `true`, messages that cannot be processed are discarded instead of being sent back to the queue. This is useful for scenarios where you want to avoid reprocessing failed messages.\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "default": false, - "type": "boolean" - }, - "name": { - "title": "Name", - "description": "Queue name.\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "type": "string" - }, - "no_local": { - "title": "No local", - "description": "The no_local flag is not supported by RabbitMQ.\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "type": "boolean" - }, - "no_wait": { - "title": "No wait", - "description": "When true, do not wait for the server to confirm the request and immediately begin deliveries. If it is not possible to consume, a channel exception will be raised and the channel will be closed.\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "type": "boolean" - }, - "prefetch_count": { - "title": "Prefetch count", - "description": "The number of messages you want to prefetch prior to consume them.\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "default": 0, - "type": "integer" - }, - "routing_key": { - "title": "Routing keys", - "description": "The list of routing keys you will use to consume messages.\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "examples": [ "#" ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/backend/amqp/producer.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AMQP Producer", - "description": "Send messages to a queue through the API Gateway.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "type": "object", - "required": [ "name", "exchange", "routing_key" ], - "properties": { - "backoff_strategy": { - "title": "Backoff strategy", - "description": "When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the `max_retries`. The backoff strategy defines the delay in seconds in between consecutive failed retries. [Check the meaning of each strategy](https://www.krakend.io/docs/async/#backoff-strategies).\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "default": "fallback", - "enum": [ - "linear", - "linear-jitter", - "exponential", - "exponential-jitter", - "fallback" - ] - }, - "delete": { - "title": "Delete", - "description": "When `true`, AMQP deletes the queue when there are no remaining connections. This option is **not recommended** in most of the scenarios. If for instance, the connectivity between KrakenD and AMQP is lost for whatever reason and it's the only client, AMQP will delete the queue no matter the number of messages there are inside, and when KrakenD gets the connection again the queue won't exist and future connections will recreate it again.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "default": false, - "type": "boolean" - }, - "durable": { - "title": "Durable", - "description": "true is recommended, but depends on the use case. Durable queues will survive server restarts and remain when there are no remaining consumers or bindings.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "default": false, - "type": "boolean" - }, - "exchange": { - "title": "Exchange", - "description": "The exchange name (must have a topic type if already exists).\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "examples": [ "some-exchange" ], - "type": "string" - }, - "exclusive": { - "title": "Exclusive", - "description": "When `true`, AMQP will allow **a single KrakenD instance** to access the queue. This option is **not recommended** in environments where the gateway needs high availability and you have several instances running.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "default": false, - "type": "boolean" - }, - "exp_key": { - "title": "Expiration key", - "description": "Take a parameter from a `{placeholder}` in the endpoint definition to use as the expiration key. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as `{id}`, you must write `Id`.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "default": "", - "type": "string" - }, - "immediate": { - "title": "Immediate", - "description": "A consumer must be connected to the queue when true.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "default": false, - "type": "boolean" - }, - "mandatory": { - "title": "Mandatory", - "description": "The exchange must have at least one queue bound when true.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "default": false, - "type": "boolean" - }, - "max_retries": { - "title": "Max retries", - "description": "The maximum number of times you will allow KrakenD to retry reconnecting to a broken messaging system. During startup KrakenD will wait for a maximum of 3 retries before starting to use this policy. Use 0 for unlimited retries.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "default": 0, - "type": "integer" - }, - "msg_id_key": { - "title": "Expiration key", - "description": "Take a parameter from a `{placeholder}` in the endpoint definition to use as the message identifier. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as `{id}`, you must write `Id`.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "default": "", - "type": "string" - }, - "name": { - "title": "Name", - "description": "Queue name.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "type": "string" - }, - "no_local": { - "title": "No local", - "description": "The no_local flag is not supported by RabbitMQ.\n\nSee: https://www.krakend.io/docs/backends/amqp-consumer/", - "type": "boolean" - }, - "no_wait": { - "title": "No wait", - "description": "When true, do not wait for the server to confirm the request and immediately begin deliveries. If it is not possible to consume, a channel exception will be raised and the channel will be closed.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "type": "boolean" - }, - "priority_key": { - "title": "Expiration key", - "description": "Take a parameter from a `{placeholder}` in the endpoint definition to use as the reply key. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as `{id}`, you must write `Id`.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "default": "", - "type": "string" - }, - "reply_to_key": { - "title": "Expiration key", - "description": "Take a parameter from a `{placeholder}` in the endpoint definition to use as the reply key. The key must have the first letter uppercased. For instance, when an endpoint parameter is defined as `{id}`, you must write `Id`.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "default": "", - "type": "string" - }, - "routing_key": { - "title": "Routing key", - "description": "The routing key you will use to send messages, case sensitive.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "default": "#", - "type": "string" - }, - "static_routing_key": { - "title": "Static Routing key", - "description": "Defines whether the `routing_key` will have a static value or not, instead of taking the value from a parameter.\n\nSee: https://www.krakend.io/docs/backends/amqp-producer/", - "default": false, - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/backend/conditional.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Conditional Routing", - "description": "Evaluates a rule to determine if the backend is callable or not, and skip to the next one in case it's not.\n\nSee: https://www.krakend.io/docs/enterprise/backends/conditional/", - "type": "object", - "required": [ "strategy" ], - "properties": { - "name": { - "title": "Header Name", - "description": "Only used with the `header` strategy. It is the name of the header you want to use for the evaluation in the [canonical format of the MIME header](https://www.krakend.io/docs/endpoints/parameter-forwarding/#case-sensitive-and-case-insensitive-parameters). **Make sure to declare the header** in the `input_headers` list of the endpoint.\n\nSee: https://www.krakend.io/docs/enterprise/backends/conditional/", - "examples": [ "X-Test" ], - "type": "string" - }, - "strategy": { - "title": "Strategy", - "description": "Choose `header` when you want to check the value of a specific header, `policy` when you want to write a more complex logical expression, or `fallback` when the backend will execute when all the rest of conditional backends have failed to evaluate to true. Only one fallback can be defined per endpoint.\n\nSee: https://www.krakend.io/docs/enterprise/backends/conditional/", - "enum": [ "header", "policy", "fallback" ] - }, - "value": { - "title": "Value", - "description": "The value according to the strategy. With the `header` strategy, this is the literal value contained in the header (case sensitive). With the `policy` strategy, the [Security Policy expression](https://www.krakend.io/docs/enterprise/security-policies/policy-language/). When using policies you can access to the variables `req` and `req_params` (a previous backend response might be in the latter), and to [advanced macros](https://www.krakend.io/docs/enterprise/security-policies/advanced-policy-macros/). Access to headers require you to add the corresponding `input_headers` in the endpoint.\n\nSee: https://www.krakend.io/docs/enterprise/backends/conditional/", - "examples": [ - "TestA", - "hasHeader('X-Test') && req_params.Resp0_message == '0 items left'" - ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/backend/graphql.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "GraphQL", - "description": "Convert REST endpoints to GraphQL calls (adapter/transformer)", - "type": "object", - "oneOf": [ - { - "required": [ "type", "query" ] - }, - { - "required": [ "type", "query_path" ] - } - ], - "properties": { - "type": { - "title": "Query type", - "description": "The type of query you are declaring, `query` (read), or `mutation` (write).\n\nSee: https://www.krakend.io/docs/backends/graphql/", - "enum": [ "query", "mutation" ] - }, - "operationName": { - "title": "Operation name", - "description": "A meaningful and explicit name for your operation, required in multi-operation documents and for helpful debugging and server-side logging.\n\nSee: https://www.krakend.io/docs/backends/graphql/", - "examples": [ "addMktPreferencesForUser" ], - "type": "string" - }, - "query": { - "title": "Query", - "description": "An inline GraphQL query you want to send to the server. Use this attribute for simple and inline queries, use `query_path` instead for larger queries. Use escaping when needed.\n\nSee: https://www.krakend.io/docs/backends/graphql/", - "examples": [ - "{ \n find_follower(func: uid(\"0x3\")) {\n name \n }\n }" - ], - "type": "string" - }, - "query_path": { - "title": "Query path", - "description": "Path to the file containing the query. This file is loaded during startup and never checked again, if it changes KrakenD will be unaware of it.\n\nSee: https://www.krakend.io/docs/backends/graphql/", - "examples": [ "./graphql/mutations/marketing.graphql" ], - "type": "string" - }, - "variables": { - "title": "Variables", - "description": "A dictionary defining all the variables sent to the GraphQL server. You can use `{placeholders}` to inject parameters from the endpoint URL.\n\nSee: https://www.krakend.io/docs/backends/graphql/", - "type": "object" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/backend/grpc.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "gRPC backend connection", - "description": "Enterprise only. Handles the communication with a backend using gRPC, after having defined the protocol buffer definitions.\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "type": "object", - "properties": { - "client_tls": { - "title": "Enable TLS client options", - "description": "Enables specific TLS connection options when using the gRPC service. Supports all options under [TLS client settings](https://www.krakend.io/docs/service-settings/tls/#client-tls-settings).\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1client_tls.json" - }, - "disable_query_params": { - "title": "Disable query parameters", - "description": "When `true`, it does not use URL parameters (`{placeholders}` in endpoints) or query strings to fill the gRPC payload to send. If `use_request_body` is not set, or set to `false`, and this option is set to `true`, there will be no input used for the gRPC message to send. That is still a valid option, when we just want to send the message with its default values, or when the input for the gRPC calls is just the [empty message](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/empty.proto).\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "default": false, - "type": "boolean" - }, - "header_mapping": { - "title": "Mapping of headers", - "description": "A dictionary that rename the received header (key) to a new header name (value). If the header starts with `grpc` they will be renamed to `in-grpc-*` as the word is reserved.\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "examples": [ - { - "X-Tenant": "customerid" - } - ], - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - }, - "additionalProperties": false - }, - "idle_conn_disconnect_time": { - "title": "Request naming convention", - "description": "The maximum time a connection is kept without being used.\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "default": "10m", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "input_assume_bytes": { - "title": "Assume input are bytes", - "description": "When set to true, when the backend has to fill a bytes field for a grpc protobuf payload to send, first tries to decode the input data (the one coming from either a json body field, a query param or header string) from base64: if it succeeds it fills the field to send with that binary / bytes data. If the incoming field is not a valid base64 decoded field (the one used in jsonpb), it will fill the binary field with the verbatim conversion of the incoming string to bytes.", - "default": false - }, - "input_mapping": { - "title": "Mapping of parameters", - "description": "A dictionary that converts query string parameters and parameters from `{placeholders}` into a different field during the backend request. When passing parameters using `{placeholder}` the parameter capitalizes the first letter, so you receive `Placeholder`.\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "examples": [ - { - "lat": "where.latitude", - "lon": "where.longitude" - } - ], - "type": "object", - "patternProperties": { - ".*": { - "type": "string" - } - }, - "additionalProperties": false - }, - "max_call_recv_msg_size": { - "title": "Maximum size for messages", - "description": "Specifies the maximum size (in bytes) for messages the grpc client is allowed to receive. If the value is unset, or `0`, it uses its default (4MB)", - "examples": [ 33554432, 4194304, 0 ], - "type": "number" - }, - "output_duration_as_string": { - "title": "Output duration types as string", - "description": "Well-known Duration types (`google.protobuf.Duration`) are returned as a struct containing fields with `seconds` and `nanos` fields (flag set to `false`). Setting this flag to `true` transforms the timestamps into a string representation in seconds.\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "default": false, - "type": "boolean" - }, - "output_enum_as_string": { - "title": "Output enum types as string", - "description": "Enum types are returned as numeric values (flag set to `false`). Set this flag to `true` to return the string representation of the enum value. For instance, an enum representing allergies, such as `['NUTS', 'MILK', ' SOY', 'WHEAT']` would return a value `SOY` when this flag is `true`, or `2` when `false`.\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "default": false, - "type": "boolean" - }, - "output_remove_unset_values": { - "title": "Output removes unset values", - "description": "This attribute defines what to do when a field that is declared in the definition does not exist in the backend response. When the flag is `true`, any fields in the definition that are not present in the backend response are removed before returning the content to the user. When the flag is `false` missing fields are returned but set with a zeroed-value depending on its type (zero, nil, false, etc).\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "default": false, - "type": "boolean" - }, - "output_timestamp_as_string": { - "title": "Output timestamps types as string", - "description": "Well-known Timestamp types (`google.protobuf.Timestamp`) are returned as a struct containing fields with `seconds` and `nanos` fields (flag set to `false`). Setting this flag to `true` transforms the timestamps into a string representation in RFC3999 format.\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "default": false, - "type": "boolean" - }, - "read_buffer_size": { - "title": "Read buffer size", - "description": "Specifies the size of the client buffer reading the gRPC communication in bytes. If the value is unset, or `0`, it uses its default (32KB). Use a negative value to disable the buffer, and if you do there won't be memory pre-allocation to read. To determine the right number, calculate the average size of the responses the gRPC client will receive.\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "examples": [ 32768, 8192, -1 ], - "type": "number" - }, - "request_naming_convention": { - "title": "Request naming convention", - "description": "Defines the naming convention used to format the request. Applies to query strings and JSON field names. By default, the gateway uses `snake_case` which makes use of the standard `encoding/json` package, while when you choose `camelCase` the `protobuf/encoding` deserialization is used instead.\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "default": "snake_case", - "enum": [ "camelCase", "snake_case" ] - }, - "response_naming_convention": { - "title": "Response naming convention", - "description": "Defines the naming convention used to format the returned data. By default, the gateway uses `snake_case` which makes use of the standard `encoding/json` package, while when you choose `camelCase` the `protobuf/encoding` deserialization is used instead.\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "default": "snake_case", - "enum": [ "camelCase", "snake_case" ] - }, - "use_alternate_host_on_error": { - "title": "Use alternate host on error", - "description": "When `true`, before sending a message to a host, it checks if the connection status is in a \"transient failure\" or \"failure\" state and tries to use a different host (from the service discovery or randomly from the list of hosts). If the connection is in a valid state, but an error happens when sending the gRPC message, it also tries to use a different host to retry sending the message. Depending on the host list, the retry attempts may go to the same host initially in a \"bad state\".\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "type": "boolean" - }, - "use_request_body": { - "title": "Use body", - "description": "Enables the use of the sent body to fill the gRPC request. Take into account that when you set this flag to `true` a body is expected, and this body is **consumed** in the first backend. If the endpoint that uses this gRPC backend has additional backends (either gRPC or HTTP) that also expect to consume the payload, these requests might fail.\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", - "default": false, - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/backend/http_client.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HTTP Client options", - "description": "Enterprise only. Allows you to set the different HTTP client options with the backend, like TLS, no redirect or connect via a proxy.\n\nSee: https://www.krakend.io/docs/enterprise/backends/http-client/", - "type": "object", - "properties": { - "client_tls": { - "title": "TLS Client settings", - "description": "Allows to set specific transport settings when using TLS in your upstream services. See the global [Client TLS options](https://www.krakend.io/docs/service-settings/tls/#client-tls-settings) for the list of all supported options.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1client_tls.json" - }, - "no_redirect": { - "title": "No redirect", - "description": "Set `no_redirect` to true if you don't want KrakenD to follow redirects and let the consuming user to receive the `30x` status code.\n\nSee: https://www.krakend.io/docs/enterprise/backends/http-client/", - "default": false, - "type": "boolean" - }, - "proxy_address": { - "title": "Proxy address", - "description": "The proxy address used to forward the traffic. The address must contain the protocol and the port.\n\nSee: https://www.krakend.io/docs/enterprise/backends/http-client/", - "examples": [ "http://proxy.corp:9099" ] - }, - "send_body_on_redirect": { - "title": "Enable redirect POST", - "description": "Post the original body to the final URL after a 307 or a 308 redirection.\n\nSee: https://www.krakend.io/docs/enterprise/backends/http-client/", - "default": false, - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/backend/lambda.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "AWS Lambda functions", - "description": "Invoke Amazon Lambda functions on a KrakenD endpoint call.\n\nSee: https://www.krakend.io/docs/backends/lambda/", - "type": "object", - "properties": { - "endpoint": { - "title": "Endpoint", - "description": "An optional parameter to customize the Lambda endpoint to call. Useful when Localstack is used for testing instead of direct AWS usage.\n\nSee: https://www.krakend.io/docs/backends/", - "type": "string" - }, - "function_name": { - "title": "Function name", - "description": "Name of the lambda function as saved in the AWS service. You have to choose between function_name and function_param_name but not both.\n\nSee: https://www.krakend.io/docs/backends/", - "type": "string" - }, - "function_param_name": { - "title": "Function_param_name", - "description": "The endpoint {placeholder} that sets the function name, with the **first letter uppercased**. You have to choose between `function_name` and `function_param_name` but not both. If your endpoint defines the route `/foo/{bar}` the value of `function_param_name` must be `Bar` with the uppercased B.\n\nSee: https://www.krakend.io/docs/backends/", - "type": "string" - }, - "max_retries": { - "title": "Max retries", - "description": "Maximum times you want to execute the function until you have a successful response. The value -1 defers the max retry setting to the service specific configuration.\n\nSee: https://www.krakend.io/docs/backends/", - "default": 0, - "type": "integer" - }, - "region": { - "title": "AWS Region", - "description": "The AWS identifier region\n\nSee: https://www.krakend.io/docs/backends/", - "examples": [ "us-east-1", "eu-west-2" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/backend/pubsub/publisher.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Pubsub publisher", - "description": "Publishes to a topic using the desired driver.\n\nSee: https://www.krakend.io/docs/backends/pubsub/", - "type": "object", - "required": [ "topic_url" ], - "properties": { - "topic_url": { - "title": "Topic URL", - "description": "Topic URL according to the selected driver\n\nSee: https://www.krakend.io/docs/backends/pubsub/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/backend/pubsub/subscriber.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Pubsub subscriber", - "description": "Subscribes a backend using the desired driver.\n\nSee: https://www.krakend.io/docs/backends/pubsub/", - "type": "object", - "required": [ "subscription_url" ], - "properties": { - "subscription_url": { - "title": "Subscription URL", - "description": "Subscription URL according to the selected driver\n\nSee: https://www.krakend.io/docs/backends/pubsub/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/backend/soap.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "SOAP Template modifier", - "description": "Enterprise only. Build and modify requests to communicate with SOAP services.\n\nSee: https://www.krakend.io/docs/backends/soap/", - "type": "object", - "oneOf": [ - { - "required": [ "path" ] - }, - { - "required": [ "template" ] - } - ], - "properties": { - "content_type": { - "title": "Content-Type", - "description": "The `Content-Type` used in your template, and that will be sent to the SOAP server. This is not the content-type the end-user sent in the request.\n\nSee: https://www.krakend.io/docs/backends/soap/", - "examples": [ "application/xml", "text/xml" ], - "default": "text/xml", - "type": "string" - }, - "debug": { - "title": "Enable debug", - "description": "When `true`, shows useful information in the logs with `DEBUG` level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.\n\nSee: https://www.krakend.io/docs/backends/soap/", - "default": false, - "type": "boolean" - }, - "path": { - "title": "Path to template", - "description": "The path to the Go template file you want to use to craft the body.\n\nSee: https://www.krakend.io/docs/backends/soap/", - "examples": [ "./path/to.xml" ], - "type": "string" - }, - "template": { - "title": "Template", - "description": "An inline base64 encoded Go template with the body XML content you want to send to the SOAP service. This option is useful if you don't want to rely on external files and embed the template in the configuration.\n\nSee: https://www.krakend.io/docs/backends/soap/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/backend/static-filesystem.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Static Filesystem", - "description": "Enterprise only. Allows you to fetch and serve static content from the disk instead of a remote server, and you can use it to mock data.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/", - "type": "object", - "required": [ "path" ], - "properties": { - "directory_listing": { - "description": "Whether to allow directory listings or not", - "default": false, - "type": "boolean" - }, - "path": { - "title": "Path", - "description": "The folder in the filesystem containing the static files. Relative to the working dir where KrakenD config is (e.g.: `./assets`) or absolute (e.g.: `/var/www/assets`).\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/", - "examples": [ "./static/" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/backend_extra_config.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Extra configuration for backends", - "type": "object", - "properties": { - "ai/llm": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1ai~1llm.json" - }, - "auth/aws-sigv4": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1auth~1aws-sigv4.json" - }, - "auth/client-credentials": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1auth~1client-credentials.json" - }, - "auth/gcp": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1auth~1gcp.json" - }, - "auth/ntlm": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1auth~1ntlm.json" - }, - "backend/amqp/consumer": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend~1amqp~1consumer.json" - }, - "backend/amqp/producer": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend~1amqp~1producer.json" - }, - "backend/conditional": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend~1conditional.json" - }, - "backend/graphql": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend~1graphql.json" - }, - "backend/grpc": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend~1grpc.json" - }, - "backend/http": { - "oneOf": [ - { - "required": [ "return_error_details" ] - }, - { - "required": [ "return_error_code" ] - } - ], - "properties": { - "return_error_code": { - "title": "Return error code", - "description": "Returns the HTTP status code of the backend (when there is only one). The headers are not returned.\n\nSee: https://www.krakend.io/docs/backends/detailed-errors/", - "type": "boolean" - }, - "return_error_details": { - "title": "Return error details", - "description": "Returns to the client details of a failing request.\n\nSee: https://www.krakend.io/docs/backends/detailed-errors/", - "type": "string" - } - } - }, - "backend/http/client": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend~1http_client.json" - }, - "backend/lambda": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend~1lambda.json" - }, - "backend/pubsub/publisher": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend~1pubsub~1publisher.json" - }, - "backend/pubsub/subscriber": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend~1pubsub~1subscriber.json" - }, - "backend/soap": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend~1soap.json" - }, - "backend/static-filesystem": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend~1static-filesystem.json" - }, - "governance/quota": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1governance~1quota.json" - }, - "modifier/body-generator": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1body-generator.json" - }, - "modifier/jmespath": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1jmespath.json" - }, - "modifier/lua-backend": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1lua.json" - }, - "modifier/martian": { - "title": "Martian modifiers", - "description": "Transform requests and responses through a simple DSL definition in the configuration file.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "modifier/request-body-generator": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1body-generator.json" - }, - "modifier/response-body": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1response-body.json" - }, - "modifier/response-body-generator": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1body-generator.json" - }, - "plugin/http-client": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1http-client.json" - }, - "plugin/middleware": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1middleware.json" - }, - "plugin/req-resp-modifier": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1req-resp-modifier.json" - }, - "proxy": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1proxy.json" - }, - "qos/circuit-breaker": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1qos~1circuit-breaker.json" - }, - "qos/circuit-breaker/http": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1qos~1circuit-breaker-http.json" - }, - "qos/http-cache": { - "title": "Backend Cache", - "description": "Enable in-memory caching for backend responses for as long as its `Cache-Control` header permits. Only safe methods are cached (GET or HEAD). The final backend URL and the `Vary` headers are used to create the caching key.\n\nSee: https://www.krakend.io/docs/backends/caching/", - "type": "object", - "oneOf": [ - { - "required": [ "max_size", "max_items" ] - }, - { - "required": [ "shared" ] - }, - { - "maxProperties": 0 - } - ], - "properties": { - "max_items": { - "title": "Max items", - "description": "To be released on open source on v2.10. The maximum number of items the LRU cache will store **for this cache bucket** before starting to do evictions. When `max_items` is declared, you must declare `max_size` as well.\n\nSee: https://www.krakend.io/docs/backends/caching/", - "examples": [], - "type": "integer", - "minimum": 1 - }, - "max_size": { - "title": "Max size", - "description": "To be released on open source on v2.10. The maximum number of bytes you allow the LRU cache to store **for this cache bucket** before starting to do evictions. This is not the total cache you allow to the system, but the number of bytes you reserve to this backend (or its `shared` neighbours). will store before starting to do evictions. When `max_size` is declared, you must declare `max_items` as well.\n\nSee: https://www.krakend.io/docs/backends/caching/", - "examples": [ 104857600, 1048576 ], - "type": "integer", - "minimum": 1024 - }, - "shared": { - "title": "Shared cache", - "description": "Allows different backend definitions with this flag set to true to reuse the store between them when the request is the same. Otherwise, each backend uses a private cache context that is not accessible by other endpoints. The cache definition is unique for every backend URL + `Vary` header combination.\n\nSee: https://www.krakend.io/docs/backends/caching/", - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "qos/ratelimit/proxy": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1qos~1ratelimit~1proxy.json" - }, - "security/policies": { - "title": "Securiy Policies", - "description": "Enterprise only. The policies engine allows you to write custom sets of policies that are validated during requests, responses, or token validation.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "type": "object", - "anyOf": [ - { - "required": [ "req" ] - }, - { - "required": [ "resp" ] - } - ], - "properties": { - "auto_join_policies": { - "title": "Auto-join policies", - "description": "When true, all policies of the same type concatenate with an AND operation to evaluate a single expression. Performs faster, but its harder the debug.", - "default": false, - "type": "boolean" - }, - "debug": { - "title": "Debug", - "description": "When true, all the inputs and evaluation results are printed in the console.", - "default": false, - "type": "boolean" - }, - "disable_macros": { - "title": "Disable advanced macros", - "description": "Advanced macros can be disabled in those policies not needing them for a faster evaluation.", - "default": false, - "type": "boolean" - }, - "req": { - "title": "Request policies", - "description": "All the policies applied in the request context.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "type": "object", - "required": [ "policies" ], - "properties": { - "error": { - "type": "object", - "properties": { - "body": { - "title": "Error body", - "description": "Leave an empty string to use the validation error, or write a string with the error response body. This error is NOT returned in the response, but in the application logs, unless you enable `return_detailed_errors` in the `router` section. You can add escaped JSON, XML, etc in the string and add a Content-Type.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "default": "", - "type": "string" - }, - "content_type": { - "title": "Content-Type", - "description": "The Content-Type header you'd like to send with the error response. When unset, uses `text/plain` by default.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "default": "text/plain", - "type": "string" - }, - "status": { - "title": "HTTP status code", - "description": "The HTTP status code you want to return when the validation fails.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "default": 500, - "type": "integer" - } - } - }, - "policies": { - "title": "Policies", - "description": "An array with all the policies to evaluate. Each policy is represented as a string\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "type": "array", - "minItems": 1, - "items": { - "title": "The policy you want to evaluate", - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "resp": { - "title": "Response policies", - "description": "All the policies applied in the response context.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "type": "object", - "required": [ "policies" ], - "properties": { - "error": { - "type": "object", - "properties": { - "body": { - "title": "Error body", - "description": "Leave an empty string to use the validation error, or write a string with the error response body. This error is NOT returned in the response, but in the application logs, unless you enable `return_detailed_errors` in the `router` section. You can add escaped JSON, XML, etc in the string and add a Content-Type.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "default": "", - "type": "string" - }, - "content_type": { - "title": "Content-Type", - "description": "The Content-Type header you'd like to send with the error response. When unset, uses `text/plain` by default.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "default": "text/plain", - "type": "string" - }, - "status": { - "title": "HTTP status code", - "description": "The HTTP status code you want to return when the validation fails.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "default": 500, - "type": "integer" - } - } - }, - "policies": { - "title": "Policies", - "description": "An array with all the policies to evaluate. Each policy is represented as a string\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "type": "array", - "minItems": 1, - "items": { - "title": "The policy you want to evaluate", - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "telemetry/logging": { - "title": "Backend Log", - "description": "Enterprise only. Add a specific Backend Log. Useful to see status codes, headers, and other information that come from your backends.\n\nSee: https://www.krakend.io/docs/enterprise/logging/", - "type": "object", - "properties": { - "backend": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1backend_log.json" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "telemetry/opentelemetry": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1opentelemetry-backend.json" - }, - "validation/cel": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1validation~1cel.json" - }, - "validation/response-json-schema": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1validation~1response-json-schema.json" - }, - "workflow": { - "title": "Workflow", - "description": "Enterprise only. A whole new endpoint that is executed within this backend context.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1workflow.json", - "type": "object" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/client_tls.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TLS client settings", - "description": "TLS options to connect to upstream services.\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "properties": { - "allow_insecure_connections": { - "title": "Allow insecure connections", - "description": "By default, KrakenD verifies every SSL connection. This option allows you to connect to backends considered **insecure**, for instance when you are using self-signed certificates", - "default": false, - "type": "boolean" - }, - "ca_certs": { - "title": "CA certificates", - "description": "An array with all the CA certificates you would like to validate the server you are connecting to.\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "examples": [ - [ "ca.pem" ] - ], - "default": [], - "type": "array" - }, - "cipher_suites": { - "title": "Cipher Suites", - "description": "The list of cipher suites as defined in the documentation.\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "default": [ 4865, 4866, 4867 ], - "type": "array", - "uniqueItems": true - }, - "client_certs": { - "title": "Client certificates", - "description": "The list of all client certificates available when fetching data from the upstream service.\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "type": "array", - "items": { - "type": "object", - "required": [ "certificate", "private_key" ], - "properties": { - "certificate": { - "title": "Certificate", - "description": "The path to the certificate you will use for mTLS connections.", - "type": "string" - }, - "private_key": { - "title": "Private key", - "description": "The path to the private key you will use for mTLS connections.", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "curve_preferences": { - "title": "Curve identifiers", - "description": "The list of all the identifiers for the curve preferences. Use `23` for CurveP256, `24` for CurveP384 or `25` for CurveP521.\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "default": [ 23, 24, 25 ], - "type": "array", - "uniqueItems": true, - "items": { - "enum": [ 23, 24, 25 ] - } - }, - "disable_system_ca_pool": { - "title": "Disable system's CA", - "description": "Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the `ca_certs` list when true.\n\nSee: https://www.krakend.io/docs/service-settings/http-server-settings/", - "default": false, - "type": "boolean" - }, - "max_version": { - "title": "Maximum TLS version", - "description": "Maximum TLS version supported.\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "default": "TLS13", - "enum": [ "SSL3.0", "TLS10", "TLS11", "TLS12", "TLS13" ] - }, - "min_version": { - "title": "Minimum TLS version", - "description": "Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the `ciphers_list`.\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "default": "TLS13", - "enum": [ "SSL3.0", "TLS10", "TLS11", "TLS12", "TLS13" ] - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/documentation/openapi.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Generate documentation using OpenAPI", - "description": "Enterprise only. Generates OpenAPI documentation automatically through `krakend openapi export` command.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "type": "object", - "properties": { - "description": { - "title": "API Description", - "description": "An introductory, optionally verbose, explanation supporting [CommonMark](http://commonmark.org/help/) syntax. If you'd like to load an **external markdown file**, you can use flexible configuration, for instance `\"description\": {{include \"openapi/intro.md\" | toJson }}`\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ - "Hi there, I am [OpenAPI](https://www.krakend.io/docs/enterprise/endpoints/openapi/)" - ], - "type": "string" - }, - "audience": { - "title": "Audience", - "description": "The list of audiences that will consume this endpoint. These values **do not define the gateway logic** in any way. They are a way to group endpoints and filter them out when generating the OpenAPI documentation. Use `*` to indicate an endpoint will be present in any audience generated.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ - [ "gold", "silver", "*" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "base_path": { - "title": "Base path", - "description": "A starting path that is appended to any endpoint.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ "/v1" ], - "type": "string" - }, - "components_schemas": { - "title": "Component Schemas", - "description": "The JSON Schemas you can reuse inside endpoint definitions using `ref`. You can either pass the JSON Schema object, or a bas64 string.", - "examples": [ - { - "Pet": { - "type": "object", - "required": [ "id", "name" ] - } - } - ], - "type": "object", - "patternProperties": { - ".*": { - "title": "JSON Schema", - "description": "JSON Schema in base64 or as an object", - "type": [ "string", "object" ] - } - } - }, - "contact_email": { - "title": "Contact email", - "description": "Email where users of your API can write to.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ "/v1" ], - "type": "string" - }, - "contact_name": { - "title": "Contact name", - "description": "Contact name.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ "/v1" ], - "type": "string" - }, - "contact_url": { - "title": "Contact URL", - "description": "Contact URL that users of your API can read.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ "/v1" ], - "type": "string" - }, - "cookie_name": { - "title": "Cookie name", - "description": "When generating an OpenAPI spec, the name of the cookie used under components securitySchemes.", - "default": "SESSIONID", - "type": "string" - }, - "custom_security_schemes": { - "title": "Custom security schemes", - "description": "Allows you to add custom security schemes under `components/securitySchemes` in the generated OpenAPI spec. This is useful when you want to define your own security schemes, different from the built-in ones (e.g., `jwt`, `apikey`, `cookie`, etc.). When the property is in the service level you must declare the schema (e.g., `\"OAuth2Security\":{...}`), and when it is in the endpoint you should only write the object name with not properties inside, e.g, `{\"OAuth2Security\":{}`.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ - { - "OAuth2Security": { - "description": "OAuth2 security scheme", - "type": "oauth2", - "flows": { - "authorizationCode": { - "authorizationUrl": "https://example.com/oauth/authorize", - "scopes": {}, - "tokenUrl": "https://example.com/oauth/token" - } - } - } - } - ], - "type": "object", - "patternProperties": { - "^.*$": { - "title": "Security Scheme", - "description": "A valid OpenAPI Security Scheme object.", - "type": "object" - } - } - }, - "disable_default_response_definitions": { - "title": "Disable default response definitions", - "description": "By default, KrakenD adds a `500` and a `200` response definition to each endpoint. Set this property to `true` if you want to avoid this behavior.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "default": false, - "type": "boolean" - }, - "example": { - "title": "Example", - "description": "**Deprecated in OAS3** (use `response_definition` instead). A free form JSON object or a string you would like to show as a sample response of the endpoint. The examples assume they are JSON content types except when using the `output_encoding=string`.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "type": [ "object", "string" ] - }, - "header_definition": { - "title": "Header definition", - "description": "Sets a detailed description for the headers allowed in the endpoint. Make sure to include the same headers in the endpoint's `input_headers`.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ - [ - { - "description": "The type of content", - "name": "Content-Type" - } - ] - ], - "type": "array", - "items": { - "title": "Headers definition", - "type": "object", - "required": [ "name" ], - "properties": { - "description": { - "title": "Name", - "description": "The description of the header", - "examples": [ - "The Content-Type sets the encoding of the request" - ], - "type": "string" - }, - "type": { - "title": "Type", - "description": "The type of data according to the OpenAPI spec", - "examples": [ "string" ], - "default": "string", - "enum": [ - "integer", - "string", - "boolean", - "object", - "array", - "float", - "date-time" - ] - }, - "enum": { - "title": "Enum", - "description": "The allowed values for this header", - "examples": [ - [ "application/json", "application/xml" ] - ], - "type": "array", - "items": { - "type": [ - "array", - "boolean", - "integer", - "number", - "object", - "string" - ] - } - }, - "required": { - "title": "Required", - "description": "Set to `true` when this query string is required", - "default": false, - "type": "boolean" - }, - "hide": { - "title": "Hide header", - "description": "Avoids this header from showing in the generated documentation", - "default": false, - "type": "boolean" - }, - "name": { - "title": "Name", - "description": "The name of the header, as declared in `input_headers`", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "host": { - "title": "Host", - "description": "The hostname where you will publish your API.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ "my.api.com" ], - "type": "string" - }, - "jwt_key": { - "title": "JWT key", - "description": "When generating an OpenAPI spec, the name of the JWT key used under components securitySchemes.", - "default": "KrakenD-JWT", - "type": "string" - }, - "license_name": { - "title": "License name", - "description": "The license name (e.g.: Apache License)\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ "/v1" ], - "type": "string" - }, - "license_url": { - "title": "License URL", - "description": "The URL where the license is hosted\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ "/v1" ], - "type": "string" - }, - "operation_id": { - "title": "Operation ID", - "description": "A unique string identifying the operation identifier. Usually the method + the endpoint. If provided, these IDs must be unique among all operations described in your API.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ "GET/foo" ], - "type": "string" - }, - "param_definition": { - "title": "Param definition", - "description": "Sets a detailed description for the URL parameters (e.g.: `/foo/{param}`) required in the endpoint. Make sure to include to write the param exactly as in the endpoint definition.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ - [ - { - "description": "The unique user ID", - "name": "id_user" - } - ] - ], - "type": "array", - "items": { - "title": "Parameters", - "type": "object", - "required": [ "name" ], - "properties": { - "description": { - "title": "Name", - "description": "The description of the parameter", - "type": "string" - }, - "examples": { - "title": "Examples", - "description": "Guess what? Multiple example values for this parameter.", - "type": "object", - "patternProperties": { - "^.*$": { - "type": [ "string", "number", "boolean", "array", "object" ] - } - } - }, - "type": { - "title": "Type", - "description": "The type of data according to the OpenAPI spec", - "examples": [ "string" ], - "default": "string", - "enum": [ - "integer", - "number", - "string", - "boolean", - "object", - "array", - "float", - "date-time" - ] - }, - "enum": { - "title": "Enum", - "description": "The allowed values for this parameter", - "examples": [ - [ "application/json", "application/xml" ] - ], - "type": "array", - "items": { - "type": [ - "array", - "boolean", - "integer", - "number", - "object", - "string" - ] - } - }, - "format": { - "title": "Format", - "description": "The extending format for the previously defined type. If the type is `number` or `string` you can apply them one of the available formats. If you choose string formats for numbers or viceversa de linter does not check it.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "enum": [ - "int32", - "int64", - "float", - "double", - "date", - "date-time", - "byte", - "uuid", - "" - ] - }, - "required": { - "title": "Required", - "description": "A path parameter is always mandatory on KrakenD, but you can still generate the OpenAPI documentation saying otherwise.", - "default": true, - "type": "boolean" - }, - "example": { - "title": "Example", - "description": "An example value for this parameter. This example is injected in the spec as is.", - "type": [ "string", "number", "boolean", "array", "object" ] - }, - "hide": { - "title": "Hide param", - "description": "Avoids this param from showing in the generated documentation, although is still part of the endpoint definition.", - "default": false, - "type": "boolean" - }, - "name": { - "title": "Name", - "description": "The name of the parameter, as declared in `endpoint` without the curly braces `{}`", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "query_definition": { - "title": "Query definition", - "description": "Sets a detailed description for the query strings allowed in the endpoint. Make sure to include the same strings in the endpoint's `input_query_strings`.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ - [ - { - "description": "The number of the page", - "name": "page" - } - ] - ], - "type": "array", - "items": { - "title": "Query strings", - "type": "object", - "required": [ "name" ], - "properties": { - "description": { - "title": "Name", - "description": "The description of the querystring", - "type": "string" - }, - "type": { - "title": "Type", - "description": "The type of data according to the OpenAPI spec", - "default": "string", - "enum": [ - "integer", - "number", - "string", - "boolean", - "object", - "array", - "float", - "date-time" - ] - }, - "enum": { - "title": "Enum", - "description": "The allowed values for this query definition", - "type": "array", - "items": { - "type": [ - "array", - "boolean", - "integer", - "number", - "object", - "string" - ] - } - }, - "format": { - "title": "Format", - "description": "The extending format for the previously defined type. If the type is `number` or `string` you can apply them one of the available formats. If you choose string formats for numbers or viceversa de linter does not check it.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "enum": [ - "int32", - "int64", - "float", - "double", - "date", - "date-time", - "byte", - "uuid", - "" - ] - }, - "required": { - "title": "Required", - "description": "Set to `true` when this query string is required", - "default": true, - "type": "boolean" - }, - "hide": { - "title": "Hide querystring", - "description": "Avoids this querystring from showing in the generated documentation", - "default": false, - "type": "boolean" - }, - "name": { - "title": "Name", - "description": "The name of the querystring, as declared in `input_query_strings`", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "request_definition": { - "title": "Definition of a request", - "description": "Describes the payload needed to consume the endpoint. If a JSON Schema validation exists, it takes precedence when generating the documentation. An example use case is when you need to document a `multipart/form-data` request body.This property is an array because you can document requests with multiple content types.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ - [ - { - "description": "Updates the user", - "content_type": "application/json", - "example": { - "first_name": "Mary", - "id_user": 33 - } - } - ] - ], - "type": "array", - "items": { - "required": [ "content_type" ], - "properties": { - "description": { - "title": "Description", - "description": "The description of the payload this endpoint accepts.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "type": "string" - }, - "content_type": { - "title": "Content Type", - "description": "The content type returned by this error, e.g., `application/json`. You cannot repeat this content type in another item.", - "type": "string" - }, - "example": { - "title": "Content Type", - "description": "A free form JSON object or a string you would like to show as a sample response of the endpoint. The examples assume they are JSON content types except when using the `output_encoding=string`.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "type": [ - "string", - "object", - "array", - "boolean", - "integer", - "null", - "number" - ] - }, - "example_schema": { - "description": "A JSON schema that describes the request format for the accepted payload in the endpoint. Use either example or example_schema, but not both.", - "type": [ "string", "object" ] - }, - "ref": { - "title": "Reference", - "description": "The relative reference to the `components/schema` OpenAPI definition that will be used as definition of the accepted request. Notice that the path `#/components/schemas/` is not needed.", - "examples": [ "your_schema_name" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "response_definition": { - "title": "Definition of errors (OAS3 only)", - "description": "Describes the different status codes returned by this endpoint. Each key is the definition of the status code, represented by a string. E.g., `200` (success), `500` (internal error), etc.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ - { - "404": { - "description": "Page not found", - "@comment": "Some comment", - "content_type": "application/json", - "example": { - "status": "KO" - } - } - } - ], - "type": "object", - "patternProperties": { - "default|^[0-9]+$": { - "type": "object", - "properties": { - "description": { - "title": "Description", - "description": "The description of this error code, e.g., `Page not found`.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "type": "string" - }, - "content_type": { - "title": "Content Type", - "description": "The content type returned by this error, e.g., `application/json`", - "type": "string" - }, - "example": { - "title": "Content Type", - "description": "A free form JSON object or a string you would like to show as a sample response of the endpoint. The examples assume they are JSON content types except when using the `output_encoding=string`.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "type": [ - "string", - "object", - "array", - "boolean", - "integer", - "null", - "number" - ] - }, - "example_schema": { - "description": "A JSON schema that describes the response format for the endpoint, directly as a JSON object, or encoded as a base64 string. Use either example or example_schema, but not both.", - "type": [ "string", "object" ] - }, - "ref": { - "title": "Reference", - "description": "The relative reference to the `components/schema` OpenAPI definition that will be used as definition of the accepted request. Notice that the path `#/components/schemas/` is not needed.", - "examples": [ "your_schema_name" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "schemes": { - "title": "Supported schemes", - "description": "The list of schemes supported by the API, e.g. `http` or `https`\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ - [ "https", "http" ] - ], - "default": [ "http" ], - "type": "array", - "items": { - "type": "string" - } - }, - "servers": { - "title": "Servers", - "description": "The list of servers where the API is hosted. The server URL can be a relative path, e.g., `/v1` or an absolute path. The URL might contain `{variables}`, although these are only recognized by OpenAPI and to KrakenD they are just literal strings because it does not use them.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ - [ - { - "url": "/v1" - } - ], - [ - { - "url": "https://example.com:{port}", - "variables": { - "port": { - "default": "8443", - "enum": [ "8443", "443" ] - } - } - } - ] - ], - "type": "array", - "items": { - "type": "object", - "required": [ "url" ], - "properties": { - "description": { - "title": "Description", - "description": "A short description of the server URL.", - "type": "string" - }, - "url": { - "title": "URL", - "description": "The URL of the server. This URL will be used as the base path for all endpoints.", - "type": [ "string", "object" ] - }, - "variables": { - "title": "Variables", - "description": "A [Server Variable Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#server-variable-object) according to the OpenAPI specification. The variable name is the key and the value is the default value for that variable.", - "type": "object", - "patternProperties": { - "^.*$": { - "type": [ "string", "object" ] - } - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "summary": { - "title": "Summary", - "description": "A short summary for the endpoint. Use the description field for the longest explanation.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "type": "string" - }, - "tag_definition": { - "title": "Tag definition", - "description": "Sets a detailed description for the tags classifiying endpoints when generating the OpenAPI spec.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ - [ - { - "description": "Description of tag1", - "name": "Tag1" - } - ] - ], - "type": "array", - "items": { - "title": "Tags", - "type": "object", - "required": [ "name" ], - "properties": { - "description": { - "title": "Tag Description", - "description": "Describe what this tag is grouping", - "type": "string" - }, - "name": { - "title": "Tag name", - "description": "The name of the tag. You will use this name in each endpoint.", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "tags": { - "title": "Tags", - "description": "You can assign a list of tags to each API operation. If you declare tags in the `tag_definition` at the OpenAPI service level, they will have a description in the documentation. Tagged operations may be handled differently by tools and libraries. For example, Swagger UI uses tags to group the displayed operations.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "type": "array", - "items": { - "type": "string" - } - }, - "terms_of_service": { - "title": "Terms of Service", - "description": "The URL to the terms of service for using this API.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ "/v1" ], - "type": "string" - }, - "version": { - "title": "Version", - "description": "The version numbering you want to apply to this release of API., e.g.: `1.0`.\n\nSee: https://www.krakend.io/docs/enterprise/developer/openapi/", - "examples": [ "1.0" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/documentation/postman.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Generate documentation using Postman collections", - "description": "Enterprise only. Generates postman documentation automatically through `krakend postman export` command.\n\nSee: https://www.krakend.io/docs/enterprise/developer/postman/", - "type": "object", - "properties": { - "description": { - "title": "API Collection Description", - "description": "An introductory, optionally verbose, explanation supporting Markdown syntax. If you'd like to load an **external markdown file**, you can use flexible configuration, for instance `\"description\": {{include \"postman/intro.md\" | toJson }}`\n\nSee: https://www.krakend.io/docs/enterprise/developer/postman/", - "examples": [ - "Hi there, I am a [postman collection](https://www.krakend.io/docs/enterprise/developer/postman/)" - ], - "type": "string" - }, - "folder": { - "title": "Folder", - "description": "The folder definition where you will add endpoints", - "type": "array", - "items": { - "type": "object", - "required": [ "name" ], - "properties": { - "description": { - "title": "Folder description", - "description": "A description explaining the items inside this folder", - "examples": [ - "Books from post-apocalyptic dystopias to brilliant time-travel" - ] - }, - "name": { - "title": "Folder name", - "description": "The folder name. This might look like the path in an operative system with a slash /, but is not strictly necessary. Usage of special chars is allowed.", - "examples": [ - "/Books", - "/Books/Science Fiction/Dystopia", - "/书籍/科幻小说", - "/पुस्तकें/विज्ञान कथा", - "/本/サイエンスフィクション" - ], - "type": "string" - } - }, - "additionalProperties": false - } - }, - "name": { - "title": "Collection Name", - "description": "The name of the Postman collection you are generating.\n\nSee: https://www.krakend.io/docs/enterprise/developer/postman/", - "examples": [ "KrakenD Config v1" ], - "type": "string" - }, - "version": { - "title": "Collection Version", - "description": "The version you assign to this Postman collection you are generating using **semantic versioning**.\n\nSee: https://www.krakend.io/docs/enterprise/developer/postman/", - "examples": [ "1.2.3", "0.7.9" ], - "type": "string", - "pattern": "^[0-9].[0-9].[0-9]+$" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/documentation/postman_endpoint.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Generate documentation using Postman collections", - "description": "Enterprise only. Generates postman documentation automatically through `krakend postman export` command.\n\nSee: https://www.krakend.io/docs/enterprise/developer/postman/", - "type": "object", - "properties": { - "description": { - "title": "Endpoint description", - "description": "An introductory, optionally verbose, explanation supporting Markdown syntax. If you'd like to load an **external markdown file**, you can use flexible configuration, for instance `\"description\": {{include \"postman/intro.md\" | toJson }}`\n\nSee: https://www.krakend.io/docs/enterprise/developer/postman/", - "examples": [ - "Hi there, I am a [postman endpoint](https://www.krakend.io/docs/enterprise/developer/postman/)" - ], - "type": "string" - }, - "folder": { - "title": "Folder", - "description": "The folder name where you want to put this endpoint. If you defined folders at the service level, use the same name to reuse their name and description", - "examples": [ "/Books" ], - "type": "string" - }, - "name": { - "title": "Endpoint Name", - "description": "The name of the endpoint you are generating. If you don't set any name the last member path is used.\n\nSee: https://www.krakend.io/docs/enterprise/developer/postman/", - "examples": [ "List books", "Create user" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/endpoint.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Endpoint Object", - "default": { - "backend": [ - { - "url_pattern": "/url" - } - ], - "endpoint": "/foo" - }, - "type": "object", - "required": [ "endpoint", "backend" ], - "properties": { - "backend": { - "title": "Backend", - "description": "An array with all the backend services you want to use in this endpoint. See [the backend object](https://www.krakend.io/docs/backends/) documentation to know all the available options, they are omitted here for brevity.\n\nSee: https://www.krakend.io/docs/backends/", - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend.json", - "type": "object" - } - }, - "cache_ttl": { - "title": "Cache TTL", - "description": "Sets or overrides the cache headers to inform how long the client or CDN can cache the request to this endpoint. Setting this value to a zero-value will use the `cache_ttl` in the root of the configuration if any. This attribute **does not cache** content but tells others how to do it. For caching, see [Caching Backend Responses](https://www.krakend.io/docs/backends/caching/).", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit" - }, - "concurrent_calls": { - "title": "Concurrent calls", - "description": "The concurrent requests are an excellent technique to improve the response times and decrease error rates by requesting in parallel the same information multiple times. Yes, you make the same request to several backends instead of asking to just one. When the first backend returns the information, the remaining requests are canceled.\n\nSee: https://www.krakend.io/docs/endpoints/concurrent-requests/", - "default": 1, - "type": "integer", - "maximum": 5, - "minimum": 1 - }, - "endpoint": { - "title": "Endpoint", - "description": "The path of the URL you want to expose. The path is **case-sensitive** and should start with a slash `/`. You can use `{placeholders}` to allow dynamic variables. For example: `/foo/{var}/baz`. You can also add an ending `/*` in the path to enable [wildcards](https://www.krakend.io/docs/enterprise/endpoints/wildcard/). Enterprise only.\nThe router will try to automatically redirect calls to endpoints with an incorrect case or incorrect trailing slash to its correct version offering a `301`. There are no guarantees that it will succeed and the request might even fail completely while trying (and log an ugly error with a trace). The **safest option** is to [disable automatic redirections](https://www.krakend.io/docs/service-settings/router-options/) by setting to true the flags `disable_redirect_fixed_path` and `disable_redirect_trailing_slash` in the `router` options.\n**Limitations**: URLs do not support colons `:` in their definition. All `{vars}` are meant to be isolated in the path and not to be used to build words, like in `/file.{ext}` [See `disable_rest` for that usage](https://www.krakend.io/docs/service-settings/http-server-settings/#disable_rest).\n\nSee: https://www.krakend.io/docs/endpoints/", - "examples": [ "/new-endpoint", "/foo/{var}", "/foo/{var1}/{var2}" ], - "type": "string", - "pattern": "^\\/[^\\*\\?\\&\\%]*(\\/\\*)?$" - }, - "extra_config": { - "title": "Extra configuration", - "description": "Besides the functionality ofered by the endpoint, you can load more functionalty into this endpoint by adding new entries under this extra configuration object. You will find across all documentation a lot of functionality that is designed to be placed here.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1endpoint_extra_config.json", - "type": "object" - }, - "input_headers": { - "title": "Allowed Headers In", - "description": "Defines the list of all headers allowed to reach the backend when passed.\nBy default, KrakenD won't pass any header from the client to the backend. This list is **case-insensitive**. You can declare headers in lowercase, uppercase, or mixed.\nAn entry `[\"Cookie\"]` forwards all cookies, and a single star element `[\"*\"]` as value forwards everything to the backend (**it's safer to avoid this option**), including cookies. See [headers forwarding](https://www.krakend.io/docs/endpoints/parameter-forwarding/#headers-forwarding)", - "default": [], - "type": "array", - "uniqueItems": true, - "items": { - "examples": [ "User-Agent", "Accept", "*" ], - "type": "string" - } - }, - "input_query_strings": { - "title": "Allowed Query String parameters", - "description": "Defines the exact list of quey strings parameters that are allowed to reach the backend. This list is **case-sensitive**.\nBy default, KrakenD won't pass any query string to the backend.\nA single star element `[\"*\"]` as value forwards everything to the backend (**it's safer to avoid this option**)\n\nSee: https://www.krakend.io/docs/endpoints/parameter-forwarding/", - "default": [], - "type": "array", - "uniqueItems": true, - "items": { - "examples": [ "page", "limit", "*" ], - "type": "string" - } - }, - "method": { - "title": "Method", - "description": "The method supported by this endpoint. Create multiple endpoint entries if you need different methods.\n\nSee: https://www.krakend.io/docs/endpoints/", - "default": "GET", - "enum": [ "GET", "POST", "PUT", "PATCH", "DELETE" ] - }, - "output_encoding": { - "title": "Output encoding", - "description": "The gateway can work with several content types, even allowing your clients to choose how to consume the content. See the [supported encodings](https://www.krakend.io/docs/endpoints/content-types/)", - "default": "json", - "enum": [ - "json", - "json-collection", - "yaml", - "fast-json", - "xml", - "negotiate", - "string", - "no-op" - ] - }, - "timeout": { - "title": "Timeout", - "description": "The duration you write in the timeout represents the **whole duration of the pipe**, so it counts the time all your backends take to respond and the processing of all the components involved in the endpoint (the request, fetching data, manipulation, etc.). Usually specified in seconds (`s`) or milliseconds (`ms`. e.g.: `2000ms` or `2s`). If you don't set any timeout, the timeout is taken from the entry in the service level, or to the system's default", - "examples": [ "2s", "1500ms" ], - "default": "2s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/endpoint_extra_config.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Endpoint extra configuration", - "type": "object", - "properties": { - "ai/mcp": { - "description": "Enterprise only. Declares the endpoint as an [MCP server entrypoint](https://www.krakend.io/docs/enterprise/ai-gateway/mcp-server/)", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1ai~1mcp_endpoint.json" - }, - "auth/api-keys": { - "title": "API-key validation", - "description": "Enterprise only. Validates that users of this endpoint pass a valid API-key containing one of the declared roles.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "type": "object", - "required": [ "roles" ], - "properties": { - "client_max_rate": { - "title": "Max rate", - "description": "If you want to limit the endpoint usage to this specific user at a number of requests per second. Exceeding the number of requests per second will give the client a `429 Too Many Requests` HTTP status code.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "type": "number" - }, - "identifier": { - "title": "Override Identifier", - "description": "The header name or the query string name that contains the API key. By default uses any value declared in the `auth/api-keys` component in the service level.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "type": "string" - }, - "roles": { - "title": "", - "description": "The list of roles allowed to access the endpoint. Values must match (case sensitive) definitions in the `keys` section at the service level of `auth/api-keys`. API Keys not having the right role, or unauthenticated requests, will receive a `401 Unauthorized`.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "type": "array", - "items": { - "type": "string" - } - }, - "strategy": { - "title": "Strategy", - "description": "Specifies where to expect the user API key, whether inside a header or as part of the query string. When you change the strategy at the endpoint level, **you should also set the identifier**, otherwise you could have for instance, a query string strategy expecting to have a URL like `/foo?Authorization=YOUR-KEY`.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/api-keys/", - "enum": [ "header", "query_string" ] - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "auth/basic": { - "description": "Enterprise only. Validates the access to the endpoint using [Basic Authentication](https://www.krakend.io/docs/enterprise/authentication/basic-authentication/).", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1auth~1basic.json", - "type": "object" - }, - "auth/signer": { - "description": "A component that [cryptographically signs tokens](https://www.krakend.io/docs/authorization/jwt-signing/) generated by your legacy login system (without JWT signing) to be later validated by the `auth/validator` component.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1auth~1signer.json", - "type": "object" - }, - "auth/validator": { - "description": "Protect endpoints from public usage by [validating JWT tokens](https://www.krakend.io/docs/authorization/jwt-validation/) generated by any industry-standard OpenID Connect (OIDC) integration.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1auth~1validator.json", - "type": "object" - }, - "documentation/openapi": { - "description": "Enterprise only. Documents the endpoint so you can [automatically generate OpenAPI documentation](https://www.krakend.io/docs/enterprise/developer/openapi/) through `krakend openapi export` command.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1documentation~1openapi.json", - "type": "object" - }, - "documentation/postman": { - "description": "Enterprise only. Documents the endpoint so you can [generate postman documentation automatically](https://www.krakend.io/docs/enterprise/developer/postman/) through the `krakend postman export` command.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1documentation~1postman_endpoint.json", - "type": "object" - }, - "governance/quota": { - "description": "Enterprise only. [Attach a quota](https://www.krakend.io/docs/enterprise/governance/quota/) to the endpoint, backend, or service. The quota component allows you to limit the number of requests a user can do in a given time window.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1governance~1quota.json", - "type": "object" - }, - "modifier/jmespath": { - "description": "Enterprise only. The [JMESPath](https://www.krakend.io/docs/enterprise/endpoints/jmespath/) is a query language that allows you to select, slice, filter, map, project, flatten, sort, and all sorts of operations on data.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1jmespath.json", - "type": "object" - }, - "modifier/lua-endpoint": { - "description": "[Scripting with Lua](https://www.krakend.io/docs/endpoints/lua/) is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1lua.json", - "type": "object" - }, - "modifier/lua-proxy": { - "description": "[Scripting with Lua](https://www.krakend.io/docs/endpoints/lua/) is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1lua.json", - "type": "object" - }, - "modifier/request-body-generator": { - "description": "Enterprise only. Freely [transform the request body/payload](https://www.krakend.io/backends/body-generator/) you will send to your services using a templating system.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1body-generator.json", - "type": "object" - }, - "modifier/response-body": { - "description": "An alias of `modifier/response-body-generator`", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1response-body.json", - "type": "object" - }, - "modifier/response-body-generator": { - "description": "Enterprise only. Freely [transform the response body](https://www.krakend.io/docs/enterprise/backends/response-body-generator/) you get from your backends.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1body-generator.json", - "type": "object" - }, - "plugin/middleware": { - "description": "Enterprise only. Inject your own [Go middleware plugins](https://www.krakend.io/docs/extending/injecting-plugins/)", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1middleware.json", - "type": "object" - }, - "plugin/req-resp-modifier": { - "description": "Inject your own [Go request and response modifier plugins](https://www.krakend.io/docs/enterprise/extending/plugin-modifiers/)", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1req-resp-modifier.json", - "type": "object" - }, - "proxy": { - "title": "Proxy", - "description": "Fine tune different options for the proxy phase of the API request/response flow.", - "type": "object", - "properties": { - "combiner": { - "title": "Custom combiner", - "description": "For custom builds of KrakenD only", - "examples": [ "combiner_name" ], - "type": "string" - }, - "decompress_gzip": { - "title": "Decompress Gzip", - "description": "Enterprise only. Decompresses any Gzipped content before sending it to the backend when the `Content-Encoding` has `gzip` in the first position. You can also set this value globally at the [service level](https://www.krakend.io/docs/enterprise/service-settings/router-options/#max_payload).\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "default": false, - "type": "boolean" - }, - "flatmap_filter": { - "title": "Flatmap (Array manipulation)", - "description": "The list of operations to **execute sequentially** (top down). Every operation is defined with an object containing two properties:\n\nSee: https://www.krakend.io/docs/backends/flatmap/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1proxy~1flatmap.json", - "type": "array", - "items": { - "type": "object" - } - }, - "max_payload": { - "title": "Maximum Payload", - "description": "Enterprise only. Limits the maximum number of bytes a user can send to the endpoint. `0` means no limit. You can also set this value globally at the [service level](https://www.krakend.io/docs/enterprise/service-settings/router-options/#max_payload).\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "default": 0, - "type": "integer" - }, - "sequential": { - "title": "Sequential proxy", - "description": "When set to true, instead of fetching all backend content in parallel, the calls are made in order (sequentially), allowing you to chain backend requests and making calls dependent one of each other. If any of the calls fail, the remaining ones are aborted.\n\nSee: https://www.krakend.io/docs/endpoints/sequential-proxy/", - "default": false, - "type": "boolean" - }, - "sequential_propagated_params": { - "title": "Sequential propagated parameters", - "description": "The list of parameters you want to propagate from a previous response to the next request. Parameters are accessible by Lua scripts, CEL, security policies, the body generator, or plugins. When you add a `resp`-like parameter in this list, the parameter becomes available to the components mentioned in subsequent calls, **uppercasing the first letter**. For instance, if you add `resp0_user`, you can access in the second, third, etc. backends in Lua to `req:params('Resp0_user')`.The format of the parameters must start with `respX_` or `respX`, where `X` is the backend index from which you want to take the parameter. If you don't set the underscore `_`, you set the whole payload as a parameter. For instance, `resp0` sets a parameter `Resp0` to use in Lua or a Body generator and contains **the entire payload of the backend 0** (as a string). In this extreme case, you must use `no-op` in the backend's output (even the endpoint has a `json` output encoding) and you should access the value in Lua or a plugin. Note that access to **nested parameters** uses a single string with the dot notation inside, e.g.: `req_params['Resp0_f1.f2.f3']` (CEL and Security Policies), or `{{ index .req_params \"Resp0_f1.f2.f3\" }}` (body generators).\n\nSee: https://www.krakend.io/docs/endpoints/sequential-proxy/", - "examples": [ - [ "resp0" ], - [ "resp1_my_field", "resp0_user_id" ] - ], - "type": "array", - "items": { - "title": "Propagated parameter name", - "description": "A `resp`-like string that references the field you want to set a parameter and use it in the next backend call.", - "type": "string", - "pattern": "^resp[0-9]+(_[^\\s]+)?$" - } - }, - "static": { - "title": "Static response", - "description": "The static proxy injects static data in the final response when the selected strategy matches.\n\nSee: https://www.krakend.io/docs/endpoints/static-proxy/", - "type": "object", - "required": [ "data", "strategy" ], - "properties": { - "data": { - "title": "Data", - "description": "The static data (as a JSON object) that you will return.\n\nSee: https://www.krakend.io/docs/endpoints/static-proxy/", - "type": "object" - }, - "strategy": { - "title": "Strategy", - "description": "One of the supported strategies\n\nSee: https://www.krakend.io/docs/endpoints/static-proxy/", - "enum": [ - "always", - "success", - "complete", - "errored", - "incomplete" - ] - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "qos/ratelimit/router": { - "title": "Router Rate-limiting", - "description": "The router rate limit feature allows you to set a [number of maximum requests per second a KrakenD endpoint will accept](https://www.krakend.io/docs/enterprise/endpoints/rate-limit/).\n\nSee: https://www.krakend.io/docs/endpoints/rate-limit/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1qos~1ratelimit~1router.json", - "type": "object" - }, - "qos/ratelimit/router/redis": { - "description": "Enterprise only. Stateful endpoint rate limit persisted on a [Redis database](https://www.krakend.io/docs/enterprise/throttling/endpoint-redis-rate-limit/)", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1qos~1ratelimit~1redis.json", - "type": "object" - }, - "qos/ratelimit/tiered": { - "description": "Enterprise only. The [rate limit based on tiers](https://www.krakend.io/docs/enterprise/service-settings/tiered-rate-limit/) allows you to have multiple sets of rate limits that apply differently to users depending on their tier or sometimes called subscription plans.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1qos~1ratelimit~1tiered.json", - "type": "object" - }, - "security/bot-detector": { - "description": "The [bot detector](https://www.krakend.io/docs/throttling/botdetector/) module checks incoming connections to the gateway to determine if a bot made them, helping you detect and reject bots carrying out scraping, content theft, and form spam.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1security~1bot-detector.json", - "type": "object" - }, - "security/cors": { - "description": "Define [Cross-Origin Resource Sharing (CORS)](https://www.krakend.io/docs/enterprise/service-settings/cors/) configuration to send additional HTTP headers to tell browsers if they can use resources from a different origin.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1security~1cors.json", - "type": "object" - }, - "security/http": { - "description": "[Security HTTP headers](https://www.krakend.io/docs/service-settings/security/), including HSTS, HPKP, MIME-Sniffing prevention, Clickjacking protection, and others.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1security~1http.json", - "type": "object" - }, - "security/policies": { - "description": "Enterprise only. A [policies engine](https://www.krakend.io/docs/enterprise/security-policies/) that allows you to write custom sets of policies that are validated during requests, responses, or token validation.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1security~1policies.json", - "type": "object" - }, - "telemetry/opentelemetry": { - "description": "Enables metrics and traces using [OpenTelemetry](https://www.krakend.io/docs/telemetry/opentelemetry/).", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1opentelemetry-endpoint.json", - "type": "object" - }, - "validation/cel": { - "description": "The [Common Expression Language (CEL)](https://www.krakend.io/docs/endpoints/common-expression-language-cel/) middleware enables expression evaluation, when an expression returns false, KrakenD does not return the content as the condition has failed. Otherwise, if all expressions returned true, the content is served.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1validation~1cel.json", - "type": "array" - }, - "validation/json-schema": { - "title": "Validating the body with the JSON Schema", - "description": "Apply [automatic validations using a JSON Schema](https://www.krakend.io/docs/endpoints/json-schema/) definition before the content passes to the backends. The json schema component allows you to define validation rules on the body, type definition, or even validate the fields' values.", - "type": "object" - }, - "validation/response-json-schema": { - "description": "Enterprise only. Applies a [JSON schema validation to the response](https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/) before is sent to the end-user or before it’s merged in the endpoint with the rest of the backends.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1validation~1response-json-schema.json", - "type": "object" - }, - "websocket": { - "description": "Enterprise only. Enables [websocket communication](https://www.krakend.io/docs/enterprise/websockets/)", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1websocket.json", - "type": "object" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/governance/processors.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Governance processors.", - "description": "Declares rules and limits to be enforced.", - "type": "object", - "required": [ "quotas" ], - "properties": { - "quotas": { - "description": "The list of quota processors available for attachment. You can have multiple processors with different configurations.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "type": "array", - "items": { - "type": "object", - "required": [ "name", "connection_name", "rules" ], - "properties": { - "connection_name": { - "description": "The name of the [Redis connection](https://www.krakend.io/docs/enterprise/service-settings/redis-connection-pools/) to use, it must exist under the `redis` namespace at the service level and written exactly as declared.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "type": "string" - }, - "deny_queue_flush_interval": { - "description": "When you have a `rejecter_cache`, the time interval to write the events stored in the buffer in the bloom filter. This is the maximum time that can elapse before the events are written to the bloom filter.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "default": "1s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "deny_queue_flush_threshold": { - "description": "When you have a `rejecter_cache`, the maximum number of events in the buffer that will force a write to the bloom filter event when the flush interval has not kicked in yet.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "default": 10, - "type": "integer" - }, - "deny_queue_size": { - "description": "When you have a `rejecter_cache`, the size of the buffer (number of events stored) to write in the bloomfilter. It defaults to the number of cores on the machine. This is the maximum number of events that can be stored in memory before being written to the bloom filter. You should not set this value unless you are seeing increased latencies on very high-concurrency scenarios; ask support for help.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "type": "integer" - }, - "hash_keys": { - "description": "Whether to hash the keys used for quota consumption. If you have PII (Personal Identifiable Information) in the keys (like an email), enable this option to `true` to avoid Redis containing clear text keys with PII. This is a setting for privacy, enabling it may affect performance because of the extra hashing, and makes data exploration difficult.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "default": false, - "type": "boolean" - }, - "name": { - "description": "Name of the quota. The exact name you type here is the one you need to reference when you attach a quota under the `governance/quota` namespace, and is also part of the key name on the persistence layer.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "examples": [ "public_api", "LLM" ], - "type": "string" - }, - "on_failure_allow": { - "description": "What to do with the user request if Redis is down. When `true`, allows continuing to perform requests even when Redis is unreachable, but the quota won't be counted. When `false`, the request is rejected and the user receives a 500 error. This is a fail-safe option, but it may lead to quota overconsumption.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "type": "boolean" - }, - "on_failure_backoff_strategy": { - "description": "The backoff strategy to use when Redis is unreachable. The default is `exponential`, which means that the time between retries will increase exponentially. The other option is `linear`, which means that the time between retries will be constant.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "default": "exponential", - "enum": [ "linear", "exponential" ] - }, - "on_failure_max_retries": { - "description": "Maximum number of retries to Redis when it is unreachable. Once the retries are exhausted, the processor is no longer usable and the quota stops working until the Redis connection is restored and the service restarted. The users will be able to consume content depending on the `on_failure_allow` option. A zero value means no retries.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "default": 0, - "type": "integer" - }, - "rejecter_cache": { - "description": "The bloom filter configuration that you use to cache rejections. The bloom filter is used to store the events that are rejected by the quota processor. This is useful to avoid rejecting the same event multiple times.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "type": "object", - "required": [ "N", "P" ], - "properties": { - "N": { - "title": "Number of elements", - "description": "The maximum `N`umber of elements you want to keep in the bloom filter. Tens of millions work fine on machines with low resources.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "examples": [ 10000000 ], - "type": "integer" - }, - "P": { - "title": "Probability", - "description": "The `P`robability of returning a false positive. E.g.,`1e-7` for one false positive every 10 million different tokens. The values `N` and `P` determine the size of the resulting bloom filter to fulfill your expectations. E.g: 0.0000001\n\nSee: https://www.krakend.io/docs/authorization/revoking-tokens/\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "examples": [ 1e-07, 1e-07 ], - "type": "number" - }, - "cleanup_interval": { - "description": "The time interval to clean up the bloom filter. This is the maximum time that can elapse before the bloom filter is cleaned up.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "default": "30m", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "hash_name": { - "title": "Hash function name", - "description": "Either `optimal` (recommended) or `default`. The `optimal` consumes less CPU but has less entropy when generating the hash, although the loss is negligible.\n\nSee: https://www.krakend.io/docs/authorization/revoking-tokens/\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "default": "optimal", - "enum": [ "optimal", "default" ] - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "rules": { - "description": "The rules to use for the quota processor.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "type": "array", - "items": { - "type": "object", - "required": [ "name", "limits" ], - "properties": { - "limits": { - "description": "The limits for the rule. The limits are defined as an array of objects, each object containing an amount and a unit.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "examples": [ - [ - { - "amount": 10, - "unit": "hour" - }, - { - "amount": 250, - "unit": "day" - } - ] - ], - "type": "array", - "items": { - "type": "object", - "required": [ "amount", "unit" ], - "properties": { - "amount": { - "description": "The amount of the limit. This is the maximum number of requests that can be made in the given time unit.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "type": "number" - }, - "unit": { - "description": "The time unit for the limit.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "enum": [ - "second", - "minute", - "hour", - "day", - "week", - "month", - "year" - ] - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "name": { - "description": "The name of the rule. This is the name that will be used to identify the rule in the logs and metrics. It is also the plan name.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "examples": [ "gold", "silver" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/governance/quota.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Attachment of a quota", - "description": "Enterprise only. Attach a quota to the endpoint, backend, or service. Needs a governance/processor namespace.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "type": "object", - "required": [ "quota_name", "tier_key", "tiers" ], - "properties": { - "disable_quota_headers": { - "description": "When set to `true`, the quota headers `X-Quota-Limit`, `X-Quota-Remaining`, and `Retry-After` will not be added to the response. This is useful when you want to hide the quota information from the client.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "default": false, - "type": "boolean" - }, - "on_unmatched_tier_allow": { - "description": "When a tier cannot be infered from the request, whether to allow the request to continue or not. In case a request does not match any of the tiers, the request will be rejected with a 400 error unless you set this to `true`.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "default": false, - "type": "boolean" - }, - "quota_name": { - "description": "Name of the quota you want to reuse, written exactly as declared under the `processors` list.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "examples": [ "my_quota" ], - "type": "string" - }, - "tier_key": { - "description": "Header or param used to determine the tier. Use `tier_value` and `tier_value_as` on each tier to determine how to match the value.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "examples": [ "X-User-Tier", "X-User-ID" ], - "type": "string" - }, - "tiers": { - "description": "List of tiers to match against the request. The first tier that matches will be used to determine the quota to consume.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "type": "array", - "items": { - "type": "object", - "required": [ "rule_name" ], - "properties": { - "key": { - "description": "The key (e.g., header name, IP, claim name) that contains the identity of the caller, like the user ID of who is doing the request. The key must be present in the request.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "type": "string" - }, - "rule_name": { - "description": "Tier limit defined in the global `processor`. It must be within the defined `limits` of the quota_name processor. If it's not found, the system will complain at startup and affected endpoints will be degraded with a 500 error\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "type": "string" - }, - "strategy": { - "description": "Where to find the key containing the identity of the caller. Use `header` for headers, `ip` for the IP address of the caller, and `param` for an endpoint {parameter}.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "default": "header", - "enum": [ "header", "ip", "param" ] - }, - "tier_value": { - "description": "Literal value or CEL expression to match.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "type": "string" - }, - "tier_value_as": { - "description": "How to treat the value. In most cases the tier value contains the plan name, like `gold`, so you will choose `literal`. But you can also set in the value a security policy (CEL) that will evaluate to resolve the tier policy accordingly, or put an asterisk `*` to always match and use as your last and default tier.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "default": "literal", - "enum": [ "literal", "policy", "*" ] - } - } - } - }, - "weight_key": { - "description": "Instead of incrementing the quota counter by one unit, use the value provided in a field or header with its dynamic value. For instance, an LLM can return how many tokens it consumed, and you can use that value to increment the quota counter. The value must be a parseable number, and the field or header must be present in the backend response. The `weight_key` is only used in the `endpoint` and `backend` scopes, and it is ignored in the service level.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "type": "string" - }, - "weight_strategy": { - "description": "Where to find the key containing the counter value to increment. Use `body` for any type of encoding different than `no-op` and `header` for `no-op`.\n\nSee: https://www.krakend.io/docs/enterprise/governance/quota/", - "default": "body", - "enum": [ "body", "header" ] - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/grpc.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "gRPC server", - "description": "Enterprise only. gRPC server integration", - "type": "object", - "required": [ "catalog" ], - "properties": { - "catalog": { - "title": "Catalog definition", - "description": "The paths to the different `.pb` files you want to load, or the paths to directories containing `.pb` files. All content is scanned in the order of the list, and after fetching all files it resolves the dependencies of their imports. The order you use here is not important to resolve imports, but it matters when there are conflicts (different files using the same namespace and package type).\n\nSee: https://www.krakend.io/docs/enterprise/grpc/server/", - "examples": [ - "./grpc/flights.pb", - "./grpc/definitions", - "/etc/krakend/grpc" - ], - "type": "array", - "items": { - "type": "string" - } - }, - "server": { - "title": "gRPC Server", - "description": "Defines the gRPC server properties.\n\nSee: https://www.krakend.io/docs/enterprise/grpc/server/", - "type": "object", - "properties": { - "opentelemetry": { - "title": "OpenTelemetry settings", - "description": "Overrides [OpenTelemetry settings](https://www.krakend.io/docs/enterprise/telemetry/opentelemetry-layers-metrics/) for the gRPC server.", - "type": "object", - "properties": { - "disable_metrics": { - "title": "Disable metrics", - "description": "Whether you want to disable all metrics happening in the gRPC server.\n\nSee: https://www.krakend.io/docs/enterprise/grpc/server/", - "default": false, - "type": "boolean" - }, - "disable_traces": { - "title": "Disable trace", - "description": "Whether you want to disable all traces happening in the gRPC server.\n\nSee: https://www.krakend.io/docs/enterprise/grpc/server/", - "default": false, - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "services": { - "title": "gRPC services", - "description": "Defines one object per available gRPC service.\n\nSee: https://www.krakend.io/docs/enterprise/grpc/server/", - "type": "array", - "items": { - "type": "object", - "properties": { - "methods": { - "title": "Methods", - "description": "The gRPC methods available for this service. The `methods` entry is the gRPC equivalent of the HTTP `endpoints`, meaning that the `backend` object under `methods` can use the same configuration as HTTP, including all its `extra_config` parameters.\n\nSee: https://www.krakend.io/docs/enterprise/grpc/server/", - "type": "array", - "items": { - "type": "object", - "properties": { - "backend": { - "title": "Backend", - "description": "An array with all the [backend objects](https://www.krakend.io/docs/backends/) mapped to this method", - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend.json", - "type": "object" - } - }, - "extra_config": { - "title": "Extra configuration", - "description": "Extra configuration for this method", - "type": "object", - "properties": { - "auth/validator": { - "title": "JWT validation", - "description": "The JWT validation for this method. The configuration underneath is exactly as in the [JWT validator](https://www.krakend.io/docs/enterprise/authorization/jwt-validation/)", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1auth~1validator.json", - "type": "object" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "input_headers": { - "title": "Allowed Headers In", - "description": "Defines the list of all client headers that you can use as gRPC metadata.\nBy default, KrakenD won't pass any header from the client to the backend. This list is **case-insensitive**. You can declare headers in lowercase, uppercase, or mixed.\nAn entry `[\"X-Something\"]` forwards a single `X-Something` header to the backend, ignoring everything else. A single star element `[\"*\"]` as value forwards everything to the backend (**it's safer to avoid this option**).", - "examples": [ "X-Custom-Trace", "*" ], - "default": [], - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "name": { - "title": "Method name", - "description": "The name of the published gRPC method.\n\nSee: https://www.krakend.io/docs/enterprise/grpc/server/", - "examples": [ "FindFlight" ], - "type": "string" - }, - "payload_params": { - "description": "Maps a property of the gRPC incoming payload to a `{parameter}` that you can inject and reuse in a `url_pattern`. It supports dot nation to access nested objects.\n\nSee: https://www.krakend.io/docs/enterprise/grpc/server/", - "examples": [ - { - "some.grpc.object": "param1" - } - ], - "type": "object" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "name": { - "title": "gRPC name", - "description": "The name of the published gRPC service.\n\nSee: https://www.krakend.io/docs/enterprise/grpc/server/", - "examples": [ "flight_finder.Flights" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/modifier/body-generator.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Template-based body generator", - "description": "Enterprise only. Crafts the body/payload using a templating system.\n\nSee: https://www.krakend.io/backends/body-generator/", - "type": "object", - "oneOf": [ - { - "required": [ "path" ] - }, - { - "required": [ "template" ] - } - ], - "properties": { - "content_type": { - "title": "Content-Type", - "description": "The `Content-Type` you are generating in the template, so it can be recognized by whoever is using it.\n\nSee: https://www.krakend.io/docs/enterprise/backends/body-generator/", - "examples": [ "application/json", "application/xml", "text/xml" ], - "default": "application/json", - "type": "string" - }, - "debug": { - "title": "Enable debug", - "description": "When `true`, shows useful information in the logs with `DEBUG` level about the input received and the body generated. Do not enable in production. Debug logs are multiline and designed fore developer readibility, not machine processing.\n\nSee: https://www.krakend.io/docs/enterprise/backends/body-generator/", - "default": false, - "type": "boolean" - }, - "path": { - "title": "Path to template", - "description": "The path to the Go template file you want to use to craft the body.\n\nSee: https://www.krakend.io/docs/enterprise/backends/body-generator/", - "examples": [ "./path/to.tmpl" ], - "type": "string" - }, - "template": { - "title": "Template", - "description": "An inline base64 encoded Go template with the body you want to generate. This option is useful if you want to have the template embedded in the configuration instead of an external file.\n\nSee: https://www.krakend.io/docs/enterprise/backends/body-generator/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false, - "@comment": "This schema is used by modifier/request-body-generator and modifier/body-generator simultaneously" - }, - "https://www.krakend.io/schema/v2.13/modifier/jmespath.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": " JMESPath: Response manipulation with query language", - "description": "Enterprise only. The JMESPath query language allows you to select, slice, filter, map, project, flatten, sort, and all sorts of operations on data.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/jmespath/", - "type": "object", - "required": [ "expr" ], - "properties": { - "expr": { - "title": "Expression", - "description": "The JMESPath expression you want to apply to this endpoint.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/jmespath/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/modifier/lua.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Lua modifier", - "description": "Scripting with Lua is an additional choice to extend your business logic, and is compatible with the rest of options such as CEL, Martian, or other Go plugins and middlewares.\n\nSee: https://www.krakend.io/docs/endpoints/lua/", - "type": "object", - "properties": { - "allow_open_libs": { - "title": "Open external libs", - "description": "As an efficiency point the Lua component does not load the standard libraries by default. If you need to import Lua libraries (e.g, the I/O, String, etc.), then you must set this flag to true.\n\nSee: https://www.krakend.io/docs/endpoints/lua/", - "default": false, - "type": "boolean" - }, - "live": { - "title": "Live reload", - "description": "For security and efficiency, the Lua script is loaded once into memory and not reloaded even if the file contents change. Set this flag to `true` if you want to modify the Lua script while KrakenD is running and apply the changes live (mostly during development to avoid the snippet being cached).\n\nSee: https://www.krakend.io/docs/endpoints/lua/", - "default": false, - "type": "boolean" - }, - "md5": { - "title": "MD5 Checksum", - "description": "The md5sum is an extra security feature to make sure that once you have coded the Lua script, the MD5 of what is loaded into memory matches what you expect and has not been tampered by a malicious 3rd party. The key of the object must match **exactly** the filename under sources, **including all the path**.\n\nSee: https://www.krakend.io/docs/endpoints/lua/", - "examples": [ - { - "./path/to/file1.lua": "49ae50f58e35f4821ad4550e1a4d1de0" - } - ], - "type": "object" - }, - "post": { - "title": "post-execution code", - "description": "The Lua code that is executed **after** performing the request. Available when used in the `backend` section. You can write all the Lua code inline (e.g., `print('Hi'); print('there!')` but you can also call functions that live inside one of the files under `sources` (e.g., `my_function()`).\n\nSee: https://www.krakend.io/docs/endpoints/lua/", - "examples": [ - "local r = response.load(); r:headers('Set-Cookie', 'key1='.. r:data('response'));" - ], - "type": "string" - }, - "pre": { - "title": "Pre-execution code", - "description": "The Lua code that is executed **before** performing the request. Unlike `post`, it's available in all sections. You can write all the Lua code inline (e.g., `print('Hi'); print('there!')` but you can also call functions that live inside one of the files under `sources` (e.g., `my_function()`).\n\nSee: https://www.krakend.io/docs/endpoints/lua/", - "examples": [ - "print('Backend response, pre-logic:'); local r = request.load(); print(r:body());" - ], - "type": "string" - }, - "skip_next": { - "title": "Skip next", - "description": "Available on the `backend` section only. Instead of connecting to next backend in the pipe, returns an empty response and executes the `post` lua function.\n\nSee: https://www.krakend.io/docs/endpoints/lua/", - "default": false, - "type": "boolean" - }, - "sources": { - "title": "Sources", - "description": "An array with all the Lua files that will be processed. If no path is provided (e.g., `myfile.lua`) the file loads from the [working directory](https://www.krakend.io/docs/configuration/working-directory/).\n\nSee: https://www.krakend.io/docs/endpoints/lua/", - "type": "array", - "items": { - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/modifier/martian.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Martian modifiers", - "description": "The Martian component allows you to modify requests and responses with static data through a simple DSL definition in the configuration file.\n\nSee: https://www.krakend.io/docs/endpoints/martian/", - "type": "object", - "maxProperties": 1, - "properties": { - "body.Modifier": { - "title": "Body Modifier", - "description": "The body.Modifier changes or sets the body of a request or response. The body must be uncompressed and Base64 encoded.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "body" ], - "properties": { - "body": { - "title": "Body in base64", - "description": "The body you want to set, formatted in base64.", - "type": "string" - }, - "contentType": { - "title": "Content Type", - "description": "The content-type representing the body you are setting", - "examples": [ "application/x-www-form-urlencoded", "text/plain" ], - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "enum": [ - [ "request", "response" ], - [ "request" ], - [ "response" ] - ] - } - } - }, - "cookie.Filter": { - "title": "Cookie Filter", - "description": "The cookie.Filter executes the contained modifier when a cookie is provided under the name.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "modifier", "name" ], - "properties": { - "else": { - "description": "The modifier you want to execute when the condition does not match", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "modifier": { - "description": "The modifier you want to execute when the cookie name (and value if provided) matches", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "name": { - "description": "The name of the Cookie you want to check. Notice that the `input_headers` must contain `Cookie` in the list when you want to check cookies sent by the client.", - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "const": [ "request" ] - }, - "value": { - "description": "If besides the cookie name, you set this value, it ensures the cookie has a literal match." - } - } - }, - "cookie.Modifier": { - "title": "Cookie Modifier", - "description": "Adds a cookie to a request or a response. If you set cookies in a response, the cookies are only set to the client when you use no-op encoding.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "name", "value" ], - "properties": { - "domain": { - "description": "Domain of the Cookie you want to set", - "examples": [ "example.com" ], - "type": "string" - }, - "expires": { - "description": "Date in RFC 3339 format and is absolute, not relative to the current time.", - "examples": [ "2025-04-12T23:20:50.52Z" ], - "type": "string" - }, - "httpOnly": { - "description": "Create the Cookie with the httpOnly flag. When `true`, mitigates the risk of client side script accessing the protected cookie (if the browser supports it), mitigating the Most Common XSS", - "default": false, - "type": "boolean" - }, - "maxAge": { - "description": "For how long this Cookie is valid, in seconds. `0` means that the attribute is not set. `maxAge<0` means delete cookie now", - "default": 0, - "type": "integer" - }, - "name": { - "description": "Name of the Cookie you want to set", - "type": "string" - }, - "path": { - "description": "Path of the Cookie you want to set", - "examples": [ "/path/to" ], - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "enum": [ - [ "request", "response" ], - [ "request" ], - [ "response" ] - ] - }, - "secure": { - "description": "Cookie secure flag. When `true`, the user agent will include the cookie in the request when using https only", - "default": false, - "type": "boolean" - }, - "value": { - "description": "Value of the Cookie you want to set", - "type": "string" - } - } - }, - "fifo.Group": { - "title": "FIFO group", - "description": "The fifo.Group holds a list of modifiers executed in first-in, first-out order.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "modifiers" ], - "properties": { - "aggregateErrors": { - "description": "When true, the group will continue to execute consecutive modifiers when a modifier in the group encounters an error. The Group will then return all errors returned by each modifier after all modifiers have been executed. When false, if an error is returned by a modifier, the error is returned by ModifyRequest/Response and no further modifiers are run.", - "default": false, - "type": "boolean" - }, - "modifiers": { - "description": "The list of modifiers you want to execute in the declared order", - "type": "array", - "items": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json" - } - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "enum": [ - [ "request", "response" ], - [ "request" ], - [ "response" ] - ] - } - } - }, - "header.Append": { - "title": "Append a header", - "description": "\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "name", "value" ], - "properties": { - "name": { - "description": "Name of the header you want to append a value. Add the same name under the `input_headers` list to append more values to an existing header passed by the client. In addition, to see the header in the response, you must use `no-op`.", - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "enum": [ - [ "request", "response" ], - [ "request" ], - [ "response" ] - ] - }, - "value": { - "description": "The value you want to add or append.", - "type": "string" - } - } - }, - "header.Blacklist": { - "title": "Blacklist headers", - "description": "The header.Blacklist removes the listed headers under names in the request and response of the backend.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "names" ], - "properties": { - "names": { - "description": "List of all the headers you want to supress from the request or the response. If you want to see the headers in the client, you must use the `output_encoding: no-op`, and if you want the client headers to propagate to the backend, you need to use `input_headers` too.", - "type": "array", - "items": { - "type": "string" - } - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "enum": [ - [ "request", "response" ], - [ "request" ], - [ "response" ] - ] - } - } - }, - "header.Copy": { - "title": "Header Copy", - "description": "The header.Copy lets you duplicate a header using another name\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "from", "to" ], - "properties": { - "from": { - "description": "The origin header you want to copy. When the header is provided by the user it must be included in the `input_headers` list.", - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "enum": [ - [ "request", "response" ], - [ "request" ], - [ "response" ] - ] - }, - "to": { - "description": "The destination header you want to create. If this header is returned to the end-user you must use `no-op` in the `output_encoding` of the endpoint.", - "type": "string" - } - } - }, - "header.Filter": { - "title": "Header Filter", - "description": "The header.Filter executes its contained modifier if the request or response contain a header that matches the defined name and value. The value is optional, and only the header’s existence evaluates when undefined.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "modifier", "name" ], - "properties": { - "else": { - "description": "The modifier you want to execute when the condition does not match", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "modifier": { - "description": "The modifier you want to execute when the condition matches", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "name": { - "description": "Name of the header you want to check. You must add under `input_headers` the `name` included in the filter.", - "examples": [ "X-Some", "Content-Type" ], - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "enum": [ - [ "request", "response" ], - [ "request" ], - [ "response" ] - ] - }, - "value": { - "description": "Value of the header you want to check", - "type": "string" - } - } - }, - "header.Id": { - "title": "Header Id", - "description": "\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope" ], - "properties": { - "header": { - "title": "Header", - "description": "The header name you want to use to save the ID. In the case the header is already set, the header is unmodified.", - "default": "X-Krakend-Id", - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "const": [ "request" ] - } - } - }, - "header.Modifier": { - "title": "Header Modifier", - "description": "The header.Modifier adds a new header or changes the value of an existing one.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "name", "value" ], - "properties": { - "name": { - "description": "Name of the header you want to set", - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "enum": [ - [ "request", "response" ], - [ "request" ], - [ "response" ] - ] - }, - "value": { - "description": "Value of the header you want to set", - "type": "string" - } - } - }, - "header.RegexFilter": { - "title": "Header RegexFilter", - "description": "The header.RegexFilter checks that a regular expression (RE2 syntax) passes on the target header and, if it does, executes the modifier.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "modifier", "header", "regex" ], - "properties": { - "header": { - "description": "Name of the header you want to check. You must add under `input_headers` the `name` included in the filter.", - "examples": [ "X-Some", "Content-Type" ], - "type": "string" - }, - "modifier": { - "description": "The modifier you want to execute when the condition matches", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "regex": { - "description": "The regular expression you want to check against the header value", - "examples": [ ".*localhost.*", "^foo-[a-z]+$" ], - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "enum": [ - [ "request", "response" ], - [ "request" ], - [ "response" ] - ] - } - } - }, - "port.Filter": { - "title": "Port Filter", - "description": "The port.Filter executes its modifier only when the port matches the one used in the request. It does not support else.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "modifier", "port" ], - "properties": { - "else": { - "description": "The modifier you want to execute when the condition does not match", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "modifier": { - "description": "The modifier you want to execute when the condition matches", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "port": { - "description": "The port number you want to check", - "type": "integer" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "const": [ "request" ] - } - } - }, - "port.Modifier": { - "title": "Port Modifier", - "description": "The port.Modifier alters the request URL and Host header to use the provided port.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "oneOf": [ - { - "required": [ "scope", "port" ] - }, - { - "required": [ "scope", "defaultForScheme" ] - }, - { - "required": [ "scope", "remove" ] - } - ], - "properties": { - "defaultForScheme": { - "description": "Uses the default port of the schema. `80` for `http://` or `443` for `https://`. Other schemas are ignored.", - "type": "boolean" - }, - "port": { - "description": "Defines which port will be used.", - "type": "integer" - }, - "remove": { - "description": "Removes the port from the host string when `true`.", - "type": "boolean" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "const": [ "request" ] - } - } - }, - "priority.Group": { - "title": "Priority group", - "description": "The priority.Group contains the modifiers you want to execute, but the order in which they are declared is unimportant. Instead, each modifier adds a priority attribute that defines the order in which they are run.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "modifiers" ], - "properties": { - "modifiers": { - "description": "The list of modifiers you want to execute, order specified in the items using `priority`.", - "type": "array", - "items": { - "required": [ "priority", "modifier" ], - "properties": { - "modifier": { - "description": "The modifier definition you want to execute", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json" - }, - "priority": { - "description": "The assigned priority number", - "type": "integer" - } - } - } - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "enum": [ - [ "request", "response" ], - [ "request" ], - [ "response" ] - ] - } - } - }, - "querystring.Filter": { - "title": "QueryString Filter", - "description": "The querystring.Filter executes the modifier if the request or response contains a query string parameter that matches the defined name and value in the filter.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "modifier", "name" ], - "properties": { - "else": { - "description": "The modifier you want to execute when the condition does not match", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "modifier": { - "description": "The modifier you want to execute when the condition matches", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "name": { - "description": "Name of the query string you want to check", - "examples": [ "page", "limit" ], - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "enum": [ - [ "request", "response" ], - [ "request" ], - [ "response" ] - ] - }, - "value": { - "description": "Value of the query string you want to check", - "type": "string" - } - } - }, - "querystring.Modifier": { - "title": "Querystring Modifier", - "description": "The querystring.Modifier adds a new query string or modifies existing ones in the request.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "name", "value" ], - "properties": { - "name": { - "description": "Name of the query string you want to set", - "examples": [ "page", "limit" ], - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "const": [ "request" ] - }, - "value": { - "description": "The value of the query string you want to set", - "type": "string" - } - } - }, - "stash.Modifier": { - "title": "Stash Modifier", - "description": "The stash.Modifier creates a new header (or replaces an existing one with a matching name) containing the value of the original URL and all its query string parameters.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "headerName" ], - "properties": { - "headerName": { - "description": "The header you want to create. If this header is returned to the end-user you must use `no-op` in the `output_encoding` of the endpoint.", - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "enum": [ - [ "request", "response" ], - [ "request" ], - [ "response" ] - ] - } - } - }, - "url.Filter": { - "title": "URL Filter", - "description": "The url.Filter executes its contained modifier if the request URL matches all of the provided parameters.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "modifier" ], - "properties": { - "else": { - "description": "The modifier you want to execute when the condition does not match", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "host": { - "description": "The literal hostname that must match, including the port", - "examples": [ "localhost:8080" ], - "type": "string" - }, - "modifier": { - "description": "The modifier you want to execute when the condition matches", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "path": { - "description": "The `/path` of the URL, without query strings.", - "examples": [ "/path/to" ], - "type": "string" - }, - "query": { - "description": "The query strings you want to check. Use `key1=value1&key2=value2` to check that the request has exactly these keys and values (order is irrelevant, but content not). Suppose the request has more query strings than declared here because the `input_query_strings` allowed them to pass. In that case, the evaluation will be `false`, and the `else` modifier will be executed.", - "examples": [ "/path/to" ], - "type": "string" - }, - "scheme": { - "description": "The literal scheme it must match", - "examples": [ "http", "https" ], - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "enum": [ - [ "request", "response" ], - [ "request" ], - [ "response" ] - ] - } - } - }, - "url.Modifier": { - "title": "URL Modifier", - "description": "The url.Modifier allows you to change the URL despite what is set in the host and url_pattern combination.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope" ], - "properties": { - "host": { - "description": "The hostname part of the URL including the port", - "examples": [ "example.com", "localhost:8080" ], - "type": "string" - }, - "path": { - "description": "The path part of the URL", - "examples": [ "/path/to" ], - "type": "string" - }, - "query": { - "description": "Sets the query string parameters you want to pass, overwriting anything passed in the request. Notice that if you set a `query`, if the user passes other query string parameters listed under `input_query_strings`, they will be lost, and only the values passed in the modifier will be sent. For such uses, see the `querystring.Modifier`", - "examples": [ "param=1", "key1=val&key2=val" ], - "type": "string" - }, - "scheme": { - "description": "The scheme to apply", - "examples": [ "http", "https" ], - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "const": [ "request" ] - } - } - }, - "url.RegexFilter": { - "title": "URL RegexFilter", - "description": "The url.RegexFilter evaluates a regular expression (RE2 syntax) and executes the modifier desired when it matches, and the modifier declared under else when it does not.\n\nSee: https://www.krakend.io/docs/backends/martian/", - "type": "object", - "required": [ "scope", "modifier", "regex" ], - "properties": { - "else": { - "description": "The modifier you want to execute when the condition does not match", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "modifier": { - "description": "The modifier you want to execute when the condition matches", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1martian.json", - "type": "object" - }, - "regex": { - "description": "The regular expression you want to check against the URL", - "type": "string" - }, - "scope": { - "title": "Scope", - "description": "Scopes in which this modifier acts", - "const": [ "request" ] - } - } - } - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/modifier/response-body.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Response values modifier", - "description": "Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "type": "object", - "properties": { - "modifiers": { - "title": "Operations", - "description": "A list of modifiers you would like to apply to specific fields. The modifiers are evaluated and applied in sequential order.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "default": [], - "type": "array", - "items": { - "type": "object", - "maxProperties": 1, - "properties": { - "literal": { - "title": "Literal replacement", - "description": "A literal replacement of strings (case sensitive).\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "examples": [ - { - "field": "data.example", - "find": "findme", - "replace": "replaceme" - } - ], - "type": "object", - "required": [ "field", "find", "replace" ], - "properties": { - "field": { - "title": "Field to modify", - "description": "The field you want to modify. The field supports dot notation to access nested objects (it does not work with nested arrays).\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "examples": [ "data.credit_card" ], - "type": "string" - }, - "find": { - "title": "Find", - "description": "The exact string you want to replace.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "type": "string" - }, - "replace": { - "title": "Replace", - "description": "The replacement string you want to use for all matching results. \n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "lower": { - "title": "Lowercase", - "description": "Converts a given string to lowercase.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "examples": [ - { - "field": "surname" - } - ], - "type": "object", - "required": [ "field" ], - "properties": { - "field": { - "title": "Field to modify", - "description": "The field you want to modify. The field supports dot notation to access nested objects (it does not work with nested arrays).\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "examples": [ "user.surname" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "regexp": { - "title": "Regular expression modifier", - "description": "A list of regular expressions you would like to apply to specific fields. The expressions are evaluated and applied in sequential order.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "examples": [ - { - "field": "data.credit_card", - "find": "(^\\d{4})(.*)", - "replace": "${1}-XXXX" - } - ], - "type": "object", - "required": [ "field", "find", "replace" ], - "properties": { - "field": { - "title": "Field to modify", - "description": "The field you want to modify. The field supports dot notation to access nested objects (it does not work with nested arrays).\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "examples": [ "data.credit_card" ], - "type": "string" - }, - "find": { - "title": "Find", - "description": "The find expression or literal you want to use. The syntax of the regular expressions accepted is the same general syntax used by Perl, Python, and other languages. More precisely, it is the syntax accepted by RE2 and described at [https://golang.org/s/re2syntax](https://golang.org/s/re2syntax)\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "type": "string" - }, - "replace": { - "title": "Replace", - "description": "The literal string or expression you want to use as a replacement. Use `$` signs to replace captured groups. \n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "examples": [ "${1}-XXXX" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "trim": { - "title": "Trims by character", - "description": "Removes a specific set of characters from the beginning and the end of the string.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "examples": [ - { - "field": "description", - "find": "\n" - } - ], - "type": "object", - "required": [ "field", "find" ], - "properties": { - "field": { - "title": "Field to modify", - "description": "The field you want to modify. The field supports dot notation to access nested objects (it does not work with nested arrays).\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "examples": [ "description" ], - "type": "string" - }, - "find": { - "title": "Find", - "description": "The sequence of characters you want to trim in the response.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "examples": [ "\r\n", "\n", "\t", " " ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "upper": { - "title": "Uppercase", - "description": "Converts a given string to uppercase.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "examples": [ - { - "field": "surname" - } - ], - "type": "object", - "required": [ "field" ], - "properties": { - "field": { - "title": "Field to modify", - "description": "The field you want to modify. The field supports dot notation to access nested objects (it does not work with nested arrays).\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "examples": [ "user.surname" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/modifier/response-headers.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Response headers modifier", - "description": "Enterprise only. Allows you to transform response headers declaratively.\n\nSee: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/", - "type": "object", - "minProperties": 1, - "properties": { - "add": { - "title": "Headers to add", - "description": "The headers you want to add. Every key under `add` is the header name, and the values are declared in an array with all those you want to set. If the header didn't exist previously, it is created with the values you passed. If the header existed, then the new values are appended.\n\nSee: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/", - "examples": [ - { - "X-Hello": [ "World" ] - } - ], - "type": "object", - "minProperties": 1, - "patternProperties": { - "(.+)": { - "description": "Header name you want to add", - "type": "array", - "items": { - "description": "Header value you want to add", - "type": "string" - } - } - } - }, - "delete": { - "title": "Headers to delete", - "description": "The list of headers you want to delete. All headers listed will be missing in the response.\n\nSee: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/", - "examples": [ - [ "X-Krakend", "X-Krakend-Completed" ] - ], - "type": "array", - "minItems": 1, - "items": { - "description": "Header you want to delete", - "type": "string" - } - }, - "rename": { - "title": "Headers to rename", - "description": "The headers you want to rename. The key used under `rename` is the original header name, and the value the new header name. This operation is destructive, meaning that if you rename to a header name that already existed it will be replaced with the new header and value.\n\nSee: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/", - "examples": [ - { - "Header-A": "Header-A-New-Name" - } - ], - "type": "object", - "minProperties": 1, - "patternProperties": { - "(.+)": { - "description": "Header you want to rename", - "type": "string" - } - } - }, - "replace": { - "title": "Headers to replace", - "description": "The headers you want to replace. The key used under `replace` is the header name, and the value an array with all the header values you want to set. The replacement overwrites any other value that could exist in this header.\n\nSee: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/", - "examples": [ - { - "Cache-Control": [ "no-store" ], - "Vary": [ "foo", "bar", "foobar" ] - } - ], - "type": "object", - "minProperties": 1, - "patternProperties": { - "(.+)": { - "type": "array", - "items": { - "description": "Header value you want to replace", - "type": "string" - } - } - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/plugin/content-replacer.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Content Replacer", - "description": "Enterprise only. The content replacer plugin allows you to modify the response of your services by doing literal replacements or more sophisticated replacements with regular expressions.\n\nSee: See: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "deprecated": true, - "type": "object", - "minProperties": 1, - "additionalProperties": { - "type": "object", - "required": [ "find", "replace" ], - "properties": { - "find": { - "title": "Find", - "description": "The find expression or literal you want to use.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "type": "string" - }, - "regexp": { - "title": "Is a regexp?", - "description": "When you are passing regular expressions instead of literal values, set it to true.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "default": false, - "type": "boolean" - }, - "replace": { - "title": "Find", - "description": "The literal string or expression you want to use as a replacement.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/content-replacer/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "https://www.krakend.io/schema/v2.13/plugin/geoip.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "GeoIP", - "description": "Enterprise only. The GeoIP integration allows you load Maxmind's GeoIP2 City database (payment and free versions) and enrich all KrakenD calls to your backends with geo data.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/geoip/", - "type": "object", - "required": [ "citydb_path" ], - "properties": { - "citydb_path": { - "title": "CityDB path", - "description": "The path in the filesystem containing the database in GeoIP2 Binary (`.mmdb`) format. Relative to the working dir or absolute path.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/geoip/", - "examples": [ "path/to/GeoIP2-City.mmdb" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/plugin/http-client.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HTTP client plugins.\n\nSee: https://www.krakend.io/docs/extending/injecting-plugins/", - "type": "object", - "properties": { - "name": { - "title": "Plugin name", - "description": "The name of the plugin to load. Only one plugin is supported per backend.\n\nSee: https://www.krakend.io/docs/extending/injecting-plugins/", - "examples": [ "no-redirect", "http-logger", "static-filesystem" ], - "type": "string" - } - } - }, - "https://www.krakend.io/schema/v2.13/plugin/http-server.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HTTP Server plugins.\n\nSee: https://www.krakend.io/docs/extending/http-server-plugins/", - "type": "object", - "required": [ "name" ], - "properties": { - "geoip": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1geoip.json" - }, - "ip-filter": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1ip-filter.json" - }, - "jwk-aggregator": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1jwk-aggregator.json" - }, - "name": { - "title": "Plugin name", - "description": "An array with the names of plugins to load. The names are defined inside your plugin.\n\nSee: https://www.krakend.io/docs/extending/http-server-plugins/", - "examples": [ - [ "myplugin" ] - ], - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "redis-ratelimit": { - "deprecated": true, - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1redis-ratelimit.json" - }, - "static-filesystem": { - "deprecated": true, - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1static-filesystem.json" - }, - "url-rewrite": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1url-rewrite.json" - }, - "virtualhost": { - "deprecated": true, - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1virtualhost.json" - }, - "wildcard": { - "deprecated": true, - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1wildcard.json" - } - } - }, - "https://www.krakend.io/schema/v2.13/plugin/ip-filter.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "IP filter", - "description": "Enterprise only. The IP filtering plugin allows you to restrict the traffic to your API gateway based on the IP address. It works in two different modes (allow or deny) where you define the list of IPs (CIDR blocks) that are authorized to use the API, or that are denied from using the API.\n\nSee: https://www.krakend.io/docs/enterprise/throttling/ipfilter/", - "type": "object", - "required": [ "CIDR", "allow" ], - "properties": { - "CIDR": { - "title": "CIDR", - "description": "The CIDR blocks (list of IPs) you want to allow or deny.\n\nSee: https://www.krakend.io/docs/enterprise/throttling/ipfilter/", - "examples": [ - [ "192.168.0.0/24", "172.17.2.56/32" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "allow": { - "title": "Allow or deny mode", - "description": "When true, only the matching IPs are able to access the content. When false, all matching IPs are discarded.\n\nSee: https://www.krakend.io/docs/enterprise/throttling/ipfilter/", - "default": false, - "type": "boolean" - }, - "client_ip_headers": { - "title": "Client IP Headers", - "description": "A custom list of all headers that might contain the real IP of the client. The first matching IP in the list will be used. Default headers are (in order of checking): X-Forwarded-For, X-Real-IP, and X-Appengine-Remote-Addr.\n\nSee: https://www.krakend.io/docs/enterprise/throttling/ipfilter/", - "examples": [ - [ "X-Forwarded-For", "X-Real-IP", "X-Appengine-Remote-Addr" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "trusted_proxies": { - "title": "Trusted proxies", - "description": "A custom list of all the recognized machines/balancers that proxy the client to your application. This list is used to avoid spoofing when trying to get the real IP of the client.\n\nSee: https://www.krakend.io/docs/enterprise/throttling/ipfilter/", - "examples": [ - [ "10.0.0.0/16" ] - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/plugin/jwk-aggregator.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "JWK aggregator", - "description": "Enterprise only. The JWK aggregator plugin allows KrakenD to validate tokens issued by multiple Identity Providers.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/", - "type": "object", - "required": [ "port", "origins" ], - "properties": { - "cache": { - "title": "Cache", - "description": "When `true`, it stores the response of the Identity provider for the time specified in its `Cache-Control` header.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/", - "type": "boolean" - }, - "origins": { - "title": "Origins", - "description": "The list of all JWK URLs recognized as valid Identity Providers by the gateway.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/", - "type": "array", - "items": { - "type": "string" - } - }, - "port": { - "title": "Port", - "description": "The port of the local server doing the aggregation. The port is only accessible within the gateway machine using localhost, and it's never exposed to the external network. Choose any port that is free in the system.\n\nSee: https://www.krakend.io/docs/enterprise/authentication/multiple-identity-providers/", - "examples": [ 9876 ], - "type": "integer" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/plugin/middleware.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Enterprise only. Middleware plugins.\n\nSee: https://www.krakend.io/docs/extending/injecting-plugins/", - "type": "object", - "required": [ "name" ], - "properties": { - "name": { - "title": "Plugin name", - "description": "An array with the names of plugins to load. The names are defined inside your plugin.\n\nSee: https://www.krakend.io/docs/enterprise/extending/middleware-plugins/", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "https://www.krakend.io/schema/v2.13/plugin/redis-ratelimit.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "DEPRECATED. Redis ratelimit", - "description": "Enterprise only. The global rate limit functionality enables a Redis database store to centralize all KrakenD node counters. Instead of having each KrakenD node count its hits, the counters are global and stored in the database.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/", - "deprecated": true, - "type": "object", - "required": [ "host", "tokenizer", "burst", "rate", "period" ], - "properties": { - "burst": { - "title": "Burst", - "description": "How many requests a client can make above the rate specified during a peak.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/", - "type": "integer" - }, - "host": { - "title": "Redis host", - "description": "The URL to the Redis instance that stores the counters using the format `host:port`.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/", - "examples": [ "redis", "redis:6379" ], - "type": "string" - }, - "period": { - "title": "Period", - "description": "For how long the content lives in the cache. Usually in seconds, minutes, or hours. E.g., use `120s` or `2m` for two minutes\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "rate": { - "title": "Rate", - "description": "Number of allowed requests during the observed period.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/", - "type": "integer" - }, - "tokenizer": { - "title": "Tokenizer", - "description": "One of the preselected strategies to rate-limit users.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/", - "enum": [ "jwt", "ip", "url", "path", "header", "param", "cookie" ] - }, - "tokenizer_field": { - "title": "Tokenizer field", - "description": "The field used to set a custom field for the tokenizer (e.g., extracting the token from a custom header other than Authorization or using a claim from a JWT other than the jti).\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/global-rate-limit/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/plugin/req-resp-modifier.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Request-Response modifier plugins", - "type": "object", - "properties": { - "content-replacer": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1content-replacer.json" - }, - "ip-filter": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1ip-filter.json" - }, - "name": { - "title": "Plugin name", - "description": "An array with the names of plugins to load. The names are defined inside your plugin.\n\nSee: https://www.krakend.io/docs/extending/plugin-modifiers/", - "examples": [ "myplugin" ], - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "response-schema-validator": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1response-schema-validator.json" - } - } - }, - "https://www.krakend.io/schema/v2.13/plugin/response-schema-validator.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Response Schema Validator", - "description": "Enterprise only. The response schema validator plugin adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/", - "deprecated": true, - "type": "object", - "required": [ "schema" ], - "properties": { - "error": { - "title": "Error definition", - "description": "In case the validation fails, the error definition containing body and status.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/", - "examples": [ - { - "body": "We couldn't process you request, try again later.", - "status": 401 - } - ], - "type": "object", - "properties": { - "body": { - "title": "Error body", - "description": "The error message you want to show when the validation fails. Set it to an empty string `\"\"` to show the JSON-schema validation error.", - "default": "", - "type": "string" - }, - "status": { - "title": "Error code", - "description": "The HTTP status code you want to set back in the response.", - "default": 500, - "type": "integer" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "schema": { - "title": "JSON Schema", - "description": "Write your JSON schema directly in this field, with any number of fields or validations you need.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/", - "type": "object" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/plugin/static-filesystem.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Static Filesystem", - "description": "Enterprise only. Allows you to fetch and serve static content in two different use cases. When the plugin is used as an http server handler, the static content is for your end-users, giving them CSS, JS, images, or JSON files, to name a few examples. On the other side, when the plugin is used as an http client executor, the KrakenD endpoints use static content as if it were a backend.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/", - "deprecated": true, - "type": "object", - "required": [ "prefix", "path" ], - "properties": { - "path": { - "title": "Path", - "description": "The folder in the filesystem containing the static files. Relative to the working dir where KrakenD config is (e.g.: `./assets`) or absolute (e.g.: `/var/www/assets`).\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/", - "examples": [ "./static/" ], - "type": "string" - }, - "prefix": { - "title": "Prefix", - "description": "This is the beginning (prefix) of all URLs that are resolved using this plugin. All matching URLs won't be passed to the router, meaning that they are not considered endpoints. Make sure you are not overwriting valid endpoints. When the `prefix` is `/`, then **all traffic is served as static** and you must declare a prefix under `skip` (e.g.: `/api`) to match endpoints.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/", - "examples": [ "/media/assets" ], - "type": "string" - }, - "skip": { - "title": "Skip paths", - "description": "An array with all the prefix URLs that despite they could match with the `prefix`, you don't want to treat them as static content and pass them to the router.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/", - "examples": [ - [ "/media/ignore/this/directory", "/media/file.json" ] - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/plugin/url-rewrite.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "URL rewrite", - "description": "Enterprise only. Allows you to declare additional URLs other than the ones defined under the endpoints configuration, used as aliases of existing endpoints.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/", - "type": "object", - "anyOf": [ - { - "required": [ "literal" ] - }, - { - "required": [ "regexp" ] - } - ], - "properties": { - "literal": { - "title": "Literal match", - "description": "A map with the exact desired url and its mapping to an endpoint. If the endpoint has `{placeholders}` you need to write them, but the literal value `{placeholders}` is passed.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/", - "examples": [ - { - "/hi-there": "/hello", - "/whatsup": "/hello" - } - ], - "type": "object" - }, - "regexp": { - "title": "Regexp match", - "description": "A list of lists, containing the regular expression that defines the URL to be rewritten, and its endpoint destination. You can use the capturing groups with the syntax `${1}`, `${2}`, etc.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/url-rewrite/", - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/plugin/virtualhost.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "VirtualHost", - "description": "Enterprise only. The Virtual Host plugin allows you to run different configurations of KrakenD endpoints based on the host accessing the server.\n\nSee: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/", - "deprecated": true, - "type": "object", - "required": [ "hosts" ], - "properties": { - "hosts": { - "title": "Virtualhosts", - "description": "All recognized virtual hosts by KrakenD must be listed here. The values declared here must match the content of the `Host` header when passed by the client.\n\nSee: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/", - "examples": [ - [ "api-a.host.com", "api-b.host.com" ] - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/plugin/wildcard.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Wildcard", - "description": "Enterprise only. Enables wildcard processing of requests without declaring all endpoint subresrouces.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/wildcard/", - "type": "object", - "required": [ "endpoints" ], - "properties": { - "endpoints": { - "title": "Endpoints", - "description": "The key of the map is the KrakenD endpoint that receives all the wildcard traffic. The value is an array with all the user paths that match this wildcard (you don't need to declare the subresources).\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/wildcard/", - "examples": [ - { - "/__wildcard/foo": [ "/foo", "/aliasfoo" ] - } - ], - "type": "object" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/proxy.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Proxy option", - "type": "object", - "properties": { - "flatmap_filter": { - "title": "Flatmap (Array manipulation)", - "description": "The list of operations to **execute sequentially** (top down). Every operation is defined with an object containing two properties:\n\nSee: https://www.krakend.io/docs/backends/flatmap/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1proxy~1flatmap.json", - "type": "array" - }, - "shadow": { - "title": "Traffic shadowing or mirroring", - "description": "Mark this backend as a shadow backend. Sending copies of the traffic but ignore its responses.\n\nSee: https://www.krakend.io/docs/backends/shadow-backends/", - "default": true, - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/proxy/flatmap.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Flatmap (Array manipulation)", - "description": "The flatmap middleware allows you to manipulate collections (or arrays, or lists, you name it) from the backend response. While the basic manipulation operations allow you to work directly with objects, the collections require a different approach: the flatmap component.\n\nSee: https://www.krakend.io/docs/backend/flatmap/", - "examples": [ - { - "type": "move", - "args": [ "a.*.b1.*.c", "a.*.b1.*.d" ] - } - ], - "type": "array", - "items": { - "title": "Flatmap operation", - "type": "object", - "required": [ "type", "args" ], - "properties": { - "type": { - "title": "Type", - "description": "The types of operations are defined as follows.\n\nSee: https://www.krakend.io/docs/backends/flatmap/", - "enum": [ "move", "del", "append" ] - }, - "args": { - "title": "Args", - "description": "The arguments passed to the operation.\n\nSee: https://www.krakend.io/docs/backends/flatmap/", - "type": "array", - "items": { - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "https://www.krakend.io/schema/v2.13/qos/circuit-breaker-http.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Circuit Breaker", - "description": "Enterprise only. The HTTP circuit breaker prevents sending more traffic to a backend that is returning status codes that are considered errors.\n\nSee: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/", - "type": "object", - "required": [ "interval", "timeout", "max_errors", "valid_status_codes" ], - "properties": { - "interval": { - "title": "Interval", - "description": "Time window where the errors count, in seconds.\n\nSee: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/", - "type": "integer" - }, - "log_status_change": { - "title": "Log status change", - "description": "Whether to log the changes of state of this circuit breaker or not.\n\nSee: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/", - "default": false, - "type": "boolean" - }, - "max_errors": { - "title": "Max Errors", - "description": "The **CONSECUTIVE** (not total) number of errors within the `interval` window to consider the backend unhealthy. All HTTP status codes different than `20x` are considered an error, except for the `no-op` encoding that does not evaluate status codes and is limited to connectivity/networking, security and component errors. See the definition of error below.\n\nSee: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/", - "examples": [ 5 ], - "type": "integer" - }, - "name": { - "title": "Name", - "description": "A friendly name to follow this circuit breaker's activity in the logs.\n\nSee: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/", - "examples": [ "cb-backend-1" ], - "type": "string" - }, - "timeout": { - "title": "Timeout", - "description": "For how many seconds the circuit breaker will wait before testing again if the backend is healthy. This number of seconds can also be read as the **minimum cooldown** of the backend interaction.\n\nSee: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/", - "examples": [ 10 ], - "type": "integer" - }, - "valid_status_codes": { - "title": "Valid Status Codes", - "description": "A list of HTTP status codes that will be considered successful responses. Any response with a status code not in this list will be counted as an error by the circuit breaker.\n\nSee: https://www.krakend.io/docs/enterprise/backends/http-circuit-breaker/", - "examples": [ - [ 200, 201, 404 ] - ], - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "integer", - "maximum": 599, - "minimum": 100 - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/qos/circuit-breaker.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Circuit Breaker", - "description": "The circuit breaker prevents sending more traffic to a failing backend.\n\nSee: https://www.krakend.io/docs/backends/circuit-breaker/", - "type": "object", - "required": [ "interval", "timeout", "max_errors" ], - "properties": { - "interval": { - "title": "Interval", - "description": "Time window where the errors count, in seconds.\n\nSee: https://www.krakend.io/docs/backends/circuit-breaker/", - "type": "integer" - }, - "log_status_change": { - "title": "Log status change", - "description": "Whether to log the changes of state of this circuit breaker or not.\n\nSee: https://www.krakend.io/docs/backends/circuit-breaker/", - "default": false, - "type": "boolean" - }, - "max_errors": { - "title": "Max Errors", - "description": "The **CONSECUTIVE** (not total) number of errors within the `interval` window to consider the backend unhealthy. All HTTP status codes different than `20x` are considered an error, except for the `no-op` encoding that does not evaluate status codes and is limited to connectivity/networking, security and component errors. See the definition of error below.\n\nSee: https://www.krakend.io/docs/backends/circuit-breaker/", - "type": "integer" - }, - "name": { - "title": "Name", - "description": "A friendly name to follow this circuit breaker's activity in the logs.\n\nSee: https://www.krakend.io/docs/backends/circuit-breaker/", - "examples": [ "cb-backend-1" ], - "type": "string" - }, - "timeout": { - "title": "Timeout", - "description": "For how many seconds the circuit breaker will wait before testing again if the backend is healthy.\n\nSee: https://www.krakend.io/docs/backends/circuit-breaker/", - "type": "integer" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/qos/ratelimit/proxy.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Backend Ratelimit", - "description": "Restrict the rate of requests KrakenD makes to your backends.\n\nSee: https://www.krakend.io/docs/backends/rate-limit/", - "type": "object", - "required": [ "max_rate", "capacity" ], - "properties": { - "capacity": { - "title": "Capacity", - "description": "The capacity according to the [token bucket algorithm](https://www.krakend.io/docs/throttling/token-bucket/). Defines the maximum requests you can do in an instant (including the zero moment when you start the gateway), and can be larger or smaller than the `max_rate`. When unsure, use the same value of `max_rate`, so the maximum number of requests can be consumed at once.\n\nSee: https://www.krakend.io/docs/backends/rate-limit/", - "default": 1, - "type": "integer" - }, - "every": { - "title": "Time window", - "description": "Time period in which the counter works. For instance, if you set an `every` of `10m` and a `max_rate` of `5`, you are allowing 5 requests every ten minutes.\n\nSee: https://www.krakend.io/docs/endpoints/rate-limit/", - "default": "1s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "max_rate": { - "title": "Max rate", - "description": "Maximum requests per second you want to accept in this backend.\n\nSee: https://www.krakend.io/docs/backends/rate-limit/", - "examples": [ 0.5 ], - "type": "number" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/qos/ratelimit/redis.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "description": "Enterprise only. Redis-backed service ratelimit", - "type": "object", - "anyOf": [ - { - "required": [ "connection_pool", "max_rate" ] - }, - { - "required": [ "connection_pool", "client_max_rate" ] - }, - { - "required": [ "connection_name", "max_rate" ] - }, - { - "required": [ "connection_name", "client_max_rate" ] - } - ], - "properties": { - "capacity": { - "title": "Capacity", - "description": "Defines the maximum number of [tokens a bucket can hold](https://www.krakend.io/docs/throttling/token-bucket/), or said otherwise, how many requests will you accept from **all users together** at **any given instant**. When the gateway starts, the bucket is full. As requests from users come, the remaining tokens in the bucket decrease. At the same time, the `max_rate` refills the bucket at the desired rate until its maximum capacity is reached. The default value for the `capacity` is the `max_rate` value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as `max_rate`.\n\nSee: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/", - "default": 1, - "type": "integer" - }, - "client_capacity": { - "title": "Client capacity", - "description": "Defines the maximum number of [tokens a bucket can hold](https://www.krakend.io/docs/throttling/token-bucket/), or said otherwise, how many requests will you accept from **each individual user** at **any given instant**. Works just as `capacity`, but instead of having one bucket for all users, keeps a counter for every connected client and endpoint, and refills from `client_max_rate` instead of `max_rate`. The client is recognized using the `strategy` field (an IP address, a token, a header, etc.). The default value for the `client_capacity` is the `client_max_rate` value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as `client_max_rate`.\n\nSee: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/", - "default": 1, - "type": "integer" - }, - "client_max_rate": { - "title": "Client max rate", - "description": "Number of tokens you add to the [Token Bucket](https://www.krakend.io/docs/throttling/token-bucket/) for each individual user (*user quota*) in the time interval you want (`every`). The remaining tokens in the bucket are the requests a specific user can do. It keeps a counter for every client and endpoint. Keep in mind that every KrakenD instance keeps its counters in memory for **every single client**.\n\nSee: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/", - "type": "number" - }, - "connection_name": { - "title": "Connection Name", - "description": "The connection pool name or cluster name that is used by this ratelimit. The value must match what you configured in the [Redis Connection Pool](https://www.krakend.io/docs/enterprise/service-settings/redis-connection-pools/)", - "type": "string" - }, - "connection_pool": { - "title": "Connection Pool Name", - "description": "The connection pool name that is used by this ratelimit. The value must match what you configured in the [Redis Connection Pool](https://www.krakend.io/docs/enterprise/service-settings/redis-connection-pools/)", - "deprecated": true, - "type": "string" - }, - "every": { - "title": "Time window", - "description": "Time period in which the maximum rates operate. For instance, if you set an `every` of `10m` and a rate of `5`, you are allowing 5 requests every ten minutes.\n\nSee: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/", - "default": "1s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "key": { - "title": "Header or Param key", - "description": "Available when using `client_max_rate` and you have set a `strategy` equal to `header` or `param`. It makes no sense in other contexts. For `header` it is the header name containing the user identification (e.g., `Authorization` on tokens, or `X-Original-Forwarded-For` for IPs). When they contain a list of space-separated IPs, it will take the IP from the client that hit the first trusted proxy. For `param` it is the name of the placeholder used in the endpoint, like `id_user` for an endpoint `/user/{id_user}`.\n\nSee: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/", - "examples": [ "X-Tenant", "Authorization", "id_user" ], - "type": "string" - }, - "max_rate": { - "title": "Max rate", - "description": "Sets the maximum number of requests all users can do in the given time frame. Internally uses the [Token Bucket](https://www.krakend.io/docs/throttling/token-bucket/) algorithm. The absence of `max_rate` in the configuration or a `0` is the equivalent to no limitation. You can use decimals if needed.\n\nSee: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/", - "type": "number" - }, - "on_failure_allow": { - "title": "On Failure Allow?", - "description": "Whether you want to allow a request to continue when the Redis connection is failing or not. The default behavior blocks the request if Redis is not responding correctly", - "default": false, - "type": "boolean" - }, - "strategy": { - "title": "Strategy", - "description": "Available when using `client_max_rate`. Sets the strategy you will use to set client counters. Choose `ip` when the restrictions apply to the client's IP address, or set it to `header` when there is a header that identifies a user uniquely. That header must be defined with the `key` entry.\n\nSee: https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/", - "enum": [ "ip", "header", "param" ] - } - } - }, - "https://www.krakend.io/schema/v2.13/qos/ratelimit/router.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Endpoint ratelimit", - "type": "object", - "anyOf": [ - { - "required": [ "max_rate" ] - }, - { - "required": [ "client_max_rate" ] - } - ], - "properties": { - "capacity": { - "title": "Capacity", - "description": "Defines the maximum number of [tokens a bucket can hold](https://www.krakend.io/docs/throttling/token-bucket/), or said otherwise, how many requests will you accept from **all users together** at **any given instant**. When the gateway starts, the bucket is full. As requests from users come, the remaining tokens in the bucket decrease. At the same time, the `max_rate` refills the bucket at the desired rate until its maximum capacity is reached. The default value for the `capacity` is the `max_rate` value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as `max_rate`.\n\nSee: https://www.krakend.io/docs/endpoints/rate-limit/", - "default": 1, - "type": "integer" - }, - "cleanup_period": { - "title": "Cleanup Period", - "description": "The cleanup period is how often the routine(s) in charge of optimizing the memory dedicated will go iterate all counters looking for outdated TTL and remove them. A low value keeps the memory slightly decreasing, but as a trade-off, it will increase the CPU dedicated to achieving this optimization. This is an advanced micro-optimization setting that should be used with caution.\n\nSee: https://www.krakend.io/docs/endpoints/rate-limit/", - "default": "1m", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "cleanup_threads": { - "title": "Cleanup Threads", - "description": "These are the number of routines that search for and remove outdated rate limit counters. The more routine(s) you add, the faster the memory optimization is completed, but the more CPU it will consume. Generally speaking, a single thread is more than enough because the delete operation is very fast, even with a large number of counters. This is an advanced micro-optimization setting that you should use with caution.\n\nSee: https://www.krakend.io/docs/endpoints/rate-limit/", - "default": 1, - "type": "integer" - }, - "client_capacity": { - "title": "Client capacity", - "description": "Defines the maximum number of [tokens a bucket can hold](https://www.krakend.io/docs/throttling/token-bucket/), or said otherwise, how many requests will you accept from **each individual user** at **any given instant**. Works just as `capacity`, but instead of having one bucket for all users, keeps a counter for every connected client and endpoint, and refills from `client_max_rate` instead of `max_rate`. The client is recognized using the `strategy` field (an IP address, a token, a header, etc.). The default value for the `client_capacity` is the `client_max_rate` value expressed in seconds or 1 for smaller fractions. When unsure, use the same number as `client_max_rate`.\n\nSee: https://www.krakend.io/docs/endpoints/rate-limit/", - "default": 1, - "type": "integer" - }, - "client_max_rate": { - "title": "Client max rate", - "description": "Number of tokens you add to the [Token Bucket](https://www.krakend.io/docs/throttling/token-bucket/) for each individual user (*user quota*) in the time interval you want (`every`). The remaining tokens in the bucket are the requests a specific user can do. It keeps a counter for every client and endpoint. Keep in mind that every KrakenD instance keeps its counters in memory for **every single client**.\n\nSee: https://www.krakend.io/docs/endpoints/rate-limit/", - "type": "number" - }, - "every": { - "title": "Time window", - "description": "Time period in which the maximum rates operate. For instance, if you set an `every` of `10m` and a rate of `5`, you are allowing 5 requests every ten minutes.\n\nSee: https://www.krakend.io/docs/endpoints/rate-limit/", - "default": "1s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "key": { - "title": "Header or Param key", - "description": "Available when using `client_max_rate` and you have set a `strategy` equal to `header` or `param`. It makes no sense in other contexts. For `header` it is the header name containing the user identification (e.g., `Authorization` on tokens, or `X-Original-Forwarded-For` for IPs). When they contain a list of space-separated IPs, it will take the IP from the client that hit the first trusted proxy. For `param` it is the name of the placeholder used in the endpoint, like `id_user` for an endpoint `/user/{id_user}`.\n\nSee: https://www.krakend.io/docs/endpoints/rate-limit/", - "examples": [ "X-Tenant", "Authorization", "id_user" ], - "type": "string" - }, - "max_rate": { - "title": "Max rate", - "description": "Sets the maximum number of requests all users can do in the given time frame. Internally uses the [Token Bucket](https://www.krakend.io/docs/throttling/token-bucket/) algorithm. The absence of `max_rate` in the configuration or a `0` is the equivalent to no limitation. You can use decimals if needed.\n\nSee: https://www.krakend.io/docs/endpoints/rate-limit/", - "type": "number" - }, - "num_shards": { - "title": "Num Shards", - "description": "All rate limit counters are stored in memory in groups (shards). All counters in the same shard share a mutex (which controls that one counter is modified at a time), and this helps with contention. Having, for instance, 2048 shards (default) and 1M users connected concurrently (same instant) means that each user will need to coordinate writes in their counter with an average of under 500 other users (1M/2048=489). Lowering the shards might increase contention and latency but free additional memory. This is an advanced micro-optimization setting that should be used with caution.\n\nSee: https://www.krakend.io/docs/endpoints/rate-limit/", - "default": 2048, - "type": "integer" - }, - "strategy": { - "title": "Strategy", - "description": "Available when using `client_max_rate`. Sets the strategy you will use to set client counters. Choose `ip` when the restrictions apply to the client's IP address, or set it to `header` when there is a header that identifies a user uniquely. That header must be defined with the `key` entry.\n\nSee: https://www.krakend.io/docs/endpoints/rate-limit/", - "enum": [ "ip", "header", "param" ] - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/qos/ratelimit/tiered.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Tiered Rate Limit", - "description": "Enterprise only. Apply ratelimit based on tier match.", - "type": "object", - "required": [ "tier_key", "tiers" ], - "properties": { - "tier_key": { - "title": "Tier key", - "description": "The header name containing the tier name. The string you provide is case-insensitive. If you need to take the value from a place that is not a header (a token, an API key), you must use propagate functions in the components that convert values to internal headers.\n\nSee: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/", - "type": "string" - }, - "tiers": { - "title": "Tiers", - "description": "The list of all tier definitions and limits for each. Each item in the list is a tier object.\n\nSee: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/", - "type": "array", - "items": { - "type": "object", - "properties": { - "ratelimit": { - "title": "Ratelimit", - "description": "The rate limit definition. This is an object with the same attributes the [service rate limit](https://www.krakend.io/docs/enterprise/service-settings/service-rate-limit/) has.\n\nSee: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1qos~1ratelimit~1router.json", - "type": "object" - }, - "ratelimit_redis": { - "title": "Redis Ratelimit", - "description": "The stateful rate limit definition. This is an object with the same attributes the [stateful service rate limit](https://www.krakend.io/docs/enterprise/throttling/global-rate-limit/) has.\n\nSee: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1qos~1ratelimit~1redis.json", - "type": "object" - }, - "tier_value": { - "title": "Tier value", - "description": "The tier value. When you use `literal`, it is the tier name. When you use `policy`, it is the expression you want to evaluate to determine if the user matches this tier or not (see security policies for syntax).\n\nSee: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/", - "examples": [ - "gold", - "silver", - "value.matches('User-[a-zA-Z]+')" - ], - "default": "", - "type": "string" - }, - "tier_value_as": { - "title": "Tier value as", - "description": "Determines how to parse the value found in the tier header. When `literal` is used, the exact value of the header is compared against the tier name. When `policy` is used, the value is used to evaluate a policy. When `*` is used, all values will match. Make sure to put the `*` as the last tier; otherwise the rest will be ignored.\n\nSee: https://www.krakend.io/docs/enterprise/docs/enterprise/service-settings/tiered-rate-limit/", - "default": "literal", - "enum": [ "literal", "policy", "*" ] - } - } - } - } - } - }, - "https://www.krakend.io/schema/v2.13/redis.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Redis configuration", - "description": "Defines the Redis connection pools available to any functionality requiring Redis.\n\nSee: /docs/enterprise/throttling/global-rate-limit/", - "type": "object", - "properties": { - "clusters": { - "title": "Cluster definitions", - "description": "Defines all the clusters available to Redis functionality. The different components requiring Redis will access the pool based on its name", - "type": "array", - "items": { - "type": "object", - "required": [ "name", "addresses" ], - "properties": { - "addresses": { - "title": "Addresses", - "description": "The list of redis members that conform the cluster using the format `host:port`. All members must be WRITEABLE", - "examples": [ - [ "192.168.1.45:6379", "192.168.1.52:6379" ] - ], - "type": "array", - "items": { - "title": "Redis member", - "description": "The address of a Redis member in the cluster", - "type": "string" - } - }, - "client_name": { - "title": "Client name", - "description": "You can set how this connection shows in Redis when listing all the connections `CONN LIST`", - "examples": [ "krakend_pool" ], - "type": "string" - }, - "conn_max_idle_time": { - "title": "Connection Max Idle Time", - "description": "The maximum amount of time a connection may be idle. Should be less than server's timeout.Expired connections may be closed lazily before reuse. If <= 0, connections are not closed due to a connection's idle time.", - "default": "30m", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "conn_max_life_time": { - "title": "conn_max_life_time", - "description": "The maximum amount of time a connection may be reused. When the attribute is not declared, the connection does not expire", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "dial_timeout": { - "title": "Dial Timeout", - "description": "Dial timeout for establishing new connections", - "default": "5s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "max_active_conns": { - "title": "Max active conns", - "description": "Maximum number of connections allocated by the pool at a given time. When zero, there is no limit on the number of connections in the pool.", - "default": 0, - "type": "integer" - }, - "max_idle_conns": { - "title": "Max idle conns", - "description": "Maximum number of idle connections. The value `0` means connections not closed", - "default": 0, - "type": "integer" - }, - "max_redirects": { - "title": "Max redirects", - "description": "The maximum number of redirects to follow when requesting a key that is in another instance", - "default": 3, - "type": "integer" - }, - "max_retries": { - "title": "Max retries", - "description": "The number of times you want to retry a Redis command using a different connection from the pool, applying a random delay between `min_retry_backoff` and `max_retry_backoff`. Use `-1` to never retry (it might not be a good idea)", - "default": 3, - "type": "integer" - }, - "max_retry_backoff": { - "title": "Max retry backoff", - "description": "Every retry is executed increasing randomly starting at the `min_retry_backoff` until the `max_retry_backoff` is reached. This is the longest possible time.", - "default": "512ms", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "min_idle_conns": { - "title": "min_idle_conns", - "description": "Minimum number of idle connections which is useful when establishing new connection is slow. `0` means connections are not closed.", - "default": 0, - "type": "integer" - }, - "min_retry_backoff": { - "description": "Every retry is executed increasing randomly starting at the `min_retry_backoff` until the `max_retry_backoff` is reached. This is the shortest possible time.", - "default": "8ms", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "name": { - "title": "Connection name", - "description": "The connection pool name. This is an arbitrary name used to reference this connection in other parts of the configuration needing Redis.", - "examples": [ "shared_instance", "Redis_for_ratelimit" ], - "type": "string" - }, - "opentelemetry": { - "title": "OpenTelemetry", - "description": "The OpenTelemetry configuration establishing how to report Redis connection activity", - "type": "object", - "properties": { - "disable_metrics": { - "title": "Disable metrics", - "description": "Disables any metrics of this Redis pool", - "default": false, - "type": "boolean" - }, - "disable_traces": { - "title": "Disable traces", - "description": "Disables any traces of this Redis pool", - "default": false, - "type": "boolean" - }, - "traces_static_attributes": { - "title": "Static attributes", - "description": "Static attributes you want to pass for traces.", - "type": "array", - "items": { - "properties": { - "key": { - "title": "Key", - "description": "The key of the static attribute you want to send", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The value of the static attribute you want to send", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "password": { - "title": "password", - "description": "Sets the password to connect to Redis.", - "type": "string" - }, - "pool_size": { - "title": "Pool size", - "description": "The pool size defines the number of concurrent Redis commands that can be executed by this Redis pool. Take into account that this only saves the connection time to the server, but, Redis will still be a non-concurrent service. When `0` it maps to its default 10", - "default": 10, - "type": "integer" - }, - "pool_timeout": { - "title": "Pool timeout", - "description": "Amount of time the client waits for a connection if all connections are busy.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "tls": { - "title": "tls", - "description": "An object with any [client TLS configuration](https://www.krakend.io/docs/enterprise/service-settings/tls/#client-tls-settings) to this connection", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1client_tls.json", - "type": "object" - }, - "user_name": { - "title": "Username", - "description": "The username to connect to Redis", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "connection_pools": { - "title": "Connection Pools", - "description": "Defines all the connetion pools available to Redis functionality. The different components requiring Redis will access the pool based on its name", - "type": "array", - "items": { - "type": "object", - "required": [ "name", "address" ], - "properties": { - "address": { - "title": "Address", - "description": "The Redis host where you want to connect using the format `host:port`.", - "examples": [ "shared.redis.example.com" ], - "type": "string" - }, - "client_name": { - "title": "Client name", - "description": "You can set how this connection shows in Redis when listing all the connections `CONN LIST`", - "examples": [ "krakend_pool" ], - "type": "string" - }, - "conn_max_idle_time": { - "title": "Connection Max Idle Time", - "description": "The maximum amount of time a connection may be idle. Should be less than server's timeout.Expired connections may be closed lazily before reuse. If <= 0, connections are not closed due to a connection's idle time.", - "default": "30m", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "conn_max_life_time": { - "title": "conn_max_life_time", - "description": "The maximum amount of time a connection may be reused. When the attribute is not declared, the connection does not expire", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "db": { - "title": "DB", - "description": "The database number to select after connecting", - "default": 0, - "type": "integer" - }, - "dial_timeout": { - "title": "Dial Timeout", - "description": "Dial timeout for establishing new connections", - "default": "5s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "max_active_conns": { - "title": "Max active conns", - "description": "Maximum number of connections allocated by the pool at a given time. When zero, there is no limit on the number of connections in the pool.", - "default": 0, - "type": "integer" - }, - "max_idle_conns": { - "title": "Max idle conns", - "description": "Maximum number of idle connections. The value `0` means connections not closed", - "default": 0, - "type": "integer" - }, - "max_retries": { - "title": "Max retries", - "description": "The number of times you want to retry a Redis command using a different connection from the pool, applying a random delay between `min_retry_backoff` and `max_retry_backoff`. Use `-1` to never retry (it might not be a good idea)", - "default": 3, - "type": "integer" - }, - "max_retry_backoff": { - "title": "Max retry backoff", - "description": "Every retry is executed increasing randomly starting at the `min_retry_backoff` until the `max_retry_backoff` is reached. This is the longest possible time.", - "default": "512ms", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "min_idle_conns": { - "title": "min_idle_conns", - "description": "Minimum number of idle connections which is useful when establishing new connection is slow. `0` means connections are not closed.", - "default": 0, - "type": "integer" - }, - "min_retry_backoff": { - "description": "Every retry is executed increasing randomly starting at the `min_retry_backoff` until the `max_retry_backoff` is reached. This is the shortest possible time.", - "default": "8ms", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "name": { - "title": "Connection name", - "description": "The connection pool name. This is an arbitrary name used to reference this connection in other parts of the configuration needing Redis.", - "examples": [ "shared_instance", "Redis_for_ratelimit" ], - "type": "string" - }, - "opentelemetry": { - "title": "OpenTelemetry", - "description": "The OpenTelemetry configuration establishing how to report Redis connection activity", - "type": "object", - "properties": { - "disable_metrics": { - "title": "Disable metrics", - "description": "Disables any metrics of this Redis pool", - "default": false, - "type": "boolean" - }, - "disable_traces": { - "title": "Disable traces", - "description": "Disables any traces of this Redis pool", - "default": false, - "type": "boolean" - }, - "traces_static_attributes": { - "title": "Static attributes", - "description": "Static attributes you want to pass for traces.", - "type": "array", - "items": { - "properties": { - "key": { - "title": "Key", - "description": "The key of the static attribute you want to send", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The value of the static attribute you want to send", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "additionalProperties": false - }, - "password": { - "title": "password", - "description": "Sets the password to connect to Redis.", - "type": "string" - }, - "pool_size": { - "title": "Pool size", - "description": "The pool size defines the number of concurrent Redis commands that can be executed by this Redis pool. Take into account that this only saves the connection time to the server, but, Redis will still be a non-concurrent service. When `0` it maps to its default 10", - "default": 10, - "type": "integer" - }, - "pool_timeout": { - "title": "Pool timeout", - "description": "Amount of time the client waits for a connection if all connections are busy.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "tls": { - "title": "tls", - "description": "An object with any [client TLS configuration](https://www.krakend.io/docs/enterprise/service-settings/tls/#client-tls-settings) to this connection", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1client_tls.json", - "type": "object" - }, - "user_name": { - "title": "Username", - "description": "The username to connect to Redis", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/router.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Router Options", - "description": "The optional router configuration allows you to set global flags that change the way KrakenD processes the requests at the router layer.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "type": "object", - "properties": { - "app_engine": { - "title": "App Engine integration", - "description": "The app_engine boolean trusts headers starting with X-AppEngine... for better integration with that PaaS.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "type": "boolean" - }, - "auto_options": { - "title": "Automatic OPTIONS", - "description": "When true, enables the autogenerated OPTIONS endpoint for all the registered paths\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "type": "boolean" - }, - "decompress_gzip": { - "title": "Decompress Gzip", - "description": "Enterprise only. Decompresses any Gzipped content before sending it to the backend when the `Content-Encoding` has `gzip` in the first position. You can also set this value [per endpoint](https://www.krakend.io/docs/enterprise/endpoints/maximum-request-size/).\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "default": 0, - "type": "integer" - }, - "disable_access_log": { - "title": "Disable Access Log", - "description": "Stops registering access requests to KrakenD in the logs. You can still have a [Backend Log](https://www.krakend.io/docs/logging/#backend) if needed.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "default": false, - "type": "boolean" - }, - "disable_gzip": { - "title": "Disable gzip compression", - "description": "Enterprise only. All the output to the end user on the Enterprise Edition uses gzip when accepted by the client. Use this flag to remove gzip compression.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "default": false, - "type": "boolean" - }, - "disable_handle_method_not_allowed": { - "title": "Disable method not allowed", - "description": "Whether to checks if another method is allowed for the current route, if the current request can not be routed. If this is the case, the request is answered with Method Not Allowed and HTTP status code 405. If no other Method is allowed, the request is a 404.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "type": "boolean" - }, - "disable_health": { - "title": "Disable Health", - "description": "When true you don't have any exposed health endpoint. You can still use a TCP checker or build an endpoint yourself.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "default": false, - "type": "boolean" - }, - "disable_path_decoding": { - "title": "Disable method not allowed", - "description": "Disables automatic validation of the url params looking for url encoded ones.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "type": "boolean" - }, - "disable_redirect_fixed_path": { - "title": "Disable redirect fixed path", - "description": "If true, the router tries to fix the current request path, if no handle is registered for it\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "type": "boolean" - }, - "disable_redirect_trailing_slash": { - "title": "Disable redirect trailing slash", - "description": "Disables automatic redirection if the current route can't be matched but a handler for the path with (without) the trailing slash exists. Only works if `disable_redirect_fixed_path` is also set to true.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "type": "boolean" - }, - "error_body": { - "title": "Custom error body", - "description": "Sets custom error bodies for 404 and 405 errors.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "type": "object", - "properties": { - "404": { - "title": "404 errors", - "description": "Write any JSON object structure you would like to return to users when they request an endpoint not known by KrakenD. 404 Not Found errors.", - "type": "object" - }, - "405": { - "title": "405 errors", - "description": "Write any JSON object structure you would like to return to users", - "type": "object" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "forwarded_by_client_ip": { - "title": "Forwarded by client IP", - "description": "When set to true, the client IP will be parsed from the default request's headers, or the custom ones (`remote_ip_headers`). If the IP has passed through a **trusted proxy** (e.g.: a proxy, load balancer, or a third party application) it will be extracted. If no IP can be fetched, it falls back to the IP obtained from the request's remote address. When declared **you must** configure `trusted_proxies` too.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "default": false, - "type": "boolean" - }, - "health_path": { - "title": "Health endpoint path", - "description": "The path where you'd like to expose the health endpoint.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "default": "/__health", - "type": "string" - }, - "hide_version_header": { - "title": "Hide version header", - "description": "Removes the version of KrakenD used in the X-KrakenD-version headers.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "default": false, - "type": "boolean" - }, - "logger_skip_paths": { - "title": "Remove requests from logs", - "description": "Defines the set of paths that are removed from the logging.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "type": "array", - "items": { - "title": "Paths", - "type": "string" - } - }, - "max_multipart_memory": { - "title": "Memory available for Multipart forms", - "description": "Sets the maxMemory param that is given to http.Request's Multipart Form method call.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "type": "integer" - }, - "max_payload": { - "title": "Maximum Payload", - "description": "Enterprise only. Limits the maximum number of bytes a user can send to the gateway. `0` means no limit. You can also set this value [per endpoint](https://www.krakend.io/docs/enterprise/endpoints/maximum-request-size/).\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "default": 0, - "type": "integer" - }, - "remote_ip_headers": { - "title": "Remote IP headers", - "description": "List of headers used to obtain the client IP when `forwarded_by_client_ip` is set to `true` and the remote address is matched by at least one of the network origins of `trusted_proxies`.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "type": "array", - "items": { - "type": "string" - } - }, - "remove_extra_slash": { - "title": "Remove extra slash", - "description": "A parameter can be parsed from the URL even with extra slashes.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "default": false, - "type": "boolean" - }, - "return_error_msg": { - "title": "Returning the gateway error message", - "description": "When there is an error in the gateway (such as a timeout, a non-200 status code, etc.) it returns to the client the reason for the failure. The error is written in the body as is.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "default": false, - "type": "boolean" - }, - "trusted_proxies": { - "title": "Trusted Proxies", - "description": "List of network origins (IPv4 addresses, IPv4 CIDRs, IPv6 addresses or IPv6 CIDRs) from which to trust request's headers that contain alternative client IP when `forwarded_by_client_ip` is `true`. When declared **you must** configure `forwarded_by_client_ip` set to `true`, and optionally `remote_ip_headers`.\n\nSee: https://www.krakend.io/docs/service-settings/router-options/", - "type": "array", - "items": { - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/security/bot-detector.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Bot detector", - "description": "The bot detector module checks incoming connections to the gateway to determine if a bot made them, helping you detect and reject bots carrying out scraping, content theft, and form spam.\n\nSee: https://www.krakend.io/docs/throttling/botdetector/", - "type": "object", - "minProperties": 1, - "properties": { - "allow": { - "title": "Allow", - "description": "An array with EXACT MATCHES of trusted user agents that can connect.\n\nSee: https://www.krakend.io/docs/throttling/botdetector/", - "examples": [ "MyAndroidClient/1.0", "Pingdom.com_bot_version_1.1" ], - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "cache_size": { - "title": "Cache size", - "description": "Size of the LRU cache that helps speed the bot detection. The size is the mumber of users agents that you want to keep in memory.\n\nSee: https://www.krakend.io/docs/throttling/botdetector/", - "examples": [ 1000 ], - "type": "integer" - }, - "deny": { - "title": "Deny", - "description": "An array with EXACT MATCHES of undesired bots, to reject immediately.\n\nSee: https://www.krakend.io/docs/throttling/botdetector/", - "examples": [ "facebookexternalhit/1.1" ], - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "empty_user_agent_is_bot": { - "title": "Empty user agent is a bot?", - "description": "Whether to consider an empty user-agent a bot (and reject it) or not. \n\nSee: https://www.krakend.io/docs/throttling/botdetector/", - "default": false, - "type": "boolean" - }, - "patterns": { - "title": "Bot patterns", - "description": "An array with all the regular expressions that define bots. Matching bots are rejected.\n\nSee: https://www.krakend.io/docs/throttling/botdetector/", - "examples": [ "GoogleBot.*", "(facebookexternalhit)/.*" ], - "default": [], - "type": "array", - "items": { - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/security/cors.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "CORS", - "description": "Define Cross-Origin Resource Sharing (CORS) configuration to send additional HTTP headers to tell browsers if they can use resources from a different origin.\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "type": "object", - "properties": { - "allow_credentials": { - "title": "Allow credentials", - "description": "When requests can include user credentials like cookies, HTTP authentication or client side SSL certificates.\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "default": false, - "type": "boolean" - }, - "allow_headers": { - "title": "Allowed headers", - "description": "An array with the headers allowed, but `Origin`is always appended to the list. Requests with headers not in this list are rejected.\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "default": [], - "type": "array", - "items": { - "type": "string" - }, - "example": [ "Accept-Language" ] - }, - "allow_methods": { - "title": "Allowed methods", - "description": "An array with all the HTTP methods allowed, in uppercase. Possible values are `GET`, `HEAD`,`POST`,`PUT`,`PATCH`,`DELETE`, or `OPTIONS`\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "default": [ "GET", "HEAD", "POST" ], - "type": "array", - "items": { - "enum": [ - "GET", - "HEAD", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS" - ] - } - }, - "allow_origins": { - "title": "Allowed origins", - "description": "An array with all the origins allowed, the use of one `*` is permitted to allow groups of hosts. Examples of values are `https://example.com`, `https://example.*`, `https://*.example.com` `or just `*` (any origin).\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "default": [ "*" ], - "type": "array", - "items": { - "type": "string" - } - }, - "allow_private_network": { - "title": "Allow private network", - "description": "Indicates whether to accept cross-origin requests over a private network.\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "default": false, - "type": "boolean" - }, - "debug": { - "title": "Development flag", - "description": "Show debugging information in the logger, **use it only during development**.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "default": false, - "type": "boolean" - }, - "expose_headers": { - "title": "Expose headers", - "description": "List of headers that are safe to expose to the API of a CORS API specification.\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "default": [ "Content-Length", "Content-Type" ], - "type": "array", - "items": { - "type": "string" - } - }, - "max_age": { - "title": "Max Age", - "description": "For how long the response can be cached. For zero values the `Access-Control-Max-Age` header is not set.\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "default": "0h", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "options_passthrough": { - "title": "OPTIONS Passthrough", - "description": "Instructs preflight to let other potential next handlers to process the OPTIONS method. Turn this on when you set the [`auto_opts` flag in the router to `true`](https://www.krakend.io/docs/service-settings/router-options/#auto_options).\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "default": false, - "type": "boolean" - }, - "options_success_status": { - "title": "Success Status Codes", - "description": "The HTTP status code that is considered a success.\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "examples": [ 200 ], - "default": 204, - "type": "integer" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/security/http.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "HTTP Security", - "description": "Security through HTTP headers, including HSTS, HPKP, MIME-Sniffing prevention, Clickjacking protection, and others.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "type": "object", - "properties": { - "allowed_hosts": { - "title": "Allowed hosts", - "description": "When a request hits KrakenD, it will confirm if the value of the Host HTTP header is in the list. If so, it will further process the request. If the host is not in the allowed hosts list, KrakenD will simply reject the request.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "allowed_hosts_are_regex": { - "title": "Hosts are regexps", - "description": "Treat the allowed hosts list as regular expressions.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "default": false, - "type": "boolean" - }, - "browser_xss_filter": { - "title": "This feature enables the Cross-site scripting (XSS) filter in the user's browser.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "default": false, - "type": "boolean" - }, - "content_security_policy": { - "title": "Content-Security-Policy (CSP)", - "description": "The HTTP Content-Security-Policy (CSP) default-src directive serves as a fallback for the other CSP fetch directives.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "examples": [ "default-src 'self';" ], - "default": "", - "type": "string" - }, - "content_type_nosniff": { - "title": "Nosniff", - "description": "Enabling this feature will prevent the user's browser from interpreting files as something else than declared by the content type in the HTTP headers.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "default": false, - "type": "boolean" - }, - "custom_frame_options_value": { - "title": "Clickjacking protection. Frame-Options value", - "description": "You can add an X-Frame-Options header using custom_frame_options_value with the value of DENY (default behavior) or even set your custom value.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "examples": [ "ALLOW-FROM https://example.com" ], - "default": "", - "type": "string" - }, - "force_sts_header": { - "title": "Force STS header", - "description": "Force a STS Header even if using plain HTTP.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "default": false, - "type": "boolean" - }, - "frame_deny": { - "title": "Clickjacking protection", - "description": "Set to true to enable clickjacking protection, together with `custom_frame_options_value`.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "default": false, - "type": "boolean" - }, - "host_proxy_headers": { - "title": "SSL Host", - "description": "A set of header keys that may hold a proxied hostname value for the request.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "examples": [ - [ "X-Forwarded-Hosts" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "hpkp_public_key": { - "title": "HTTP Public Key Pinning (HPKP)", - "description": "HTTP Public Key Pinning (HPKP) is a security mechanism which allows HTTPS websites to resist impersonation by attackers using mis-issued or otherwise fraudulent certificates. (For example, sometimes attackers can compromise certificate authorities, and then can mis-issue certificates for a web origin.).\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "examples": [ - "pin-sha256=\"base64==\"; max-age=expireTime [; includeSubDomains][; report-uri=\"reportURI\"]" - ], - "default": "", - "type": "string" - }, - "is_development": { - "title": "Development flag", - "description": "This will cause the AllowedHosts, SSLRedirect, and STSSeconds/STSIncludeSubdomains options to be ignored during development. When deploying to production, be sure to set this to false.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "default": false, - "type": "boolean" - }, - "referrer_policy": { - "title": "Referrer Policy", - "description": "Allows the Referrer-Policy header with the value to be set with a custom value.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "default": "same-origin", - "type": "string" - }, - "ssl_host": { - "title": "SSL Host", - "description": "When the SSL redirect is true, the host where the request is redirected to.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "examples": [ "ssl.host.domain" ], - "default": "ssl.host.domain", - "type": "string" - }, - "ssl_proxy_headers": { - "title": "SSL Proxy Headers", - "description": "Header keys with associated values that would indicate a valid https request. Useful when using Nginx, e.g: `\"X-Forwarded-Proto\": \"https\"`\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "examples": [ - { - "X-Forwarded-Proto": "https" - } - ], - "type": "object" - }, - "ssl_redirect": { - "title": "SSL redirect", - "description": "Redirect any request that is not using HTTPS\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "default": true, - "type": "boolean" - }, - "sts_include_subdomains": { - "title": "Strict-Transport-Security include_subdomains", - "description": "Set to true when you want the `includeSubdomains` be appended to the Strict-Transport-Security header.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "default": false, - "type": "boolean" - }, - "sts_seconds": { - "title": "HTTP Strict Transport Security (HSTS) seconds", - "description": "Enable this policy by setting the `max-age` of the `Strict-Transport-Security` header. Setting to `0` disables HSTS.\n\nSee: https://www.krakend.io/docs/service-settings/security/", - "default": 0, - "type": "integer" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/security/policies.json": { - "$schema": "http://json-schema.org/draft-07/schema#", - "title": "Securiy Policies", - "description": "Enterprise only. The policies engine allows you to write custom sets of policies that are validated during requests, responses, or token validation.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "type": "object", - "anyOf": [ - { - "required": [ "req" ] - }, - { - "required": [ "resp" ] - }, - { - "required": [ "jwt" ] - } - ], - "properties": { - "auto_join_policies": { - "title": "Auto-join policies", - "description": "When true, all policies of the same type concatenate with an AND operation to evaluate a single expression. Performs faster, but its harder the debug.", - "default": false, - "type": "boolean" - }, - "debug": { - "title": "Debug", - "description": "When true, all the inputs and evaluation results are printed in the console.", - "default": false, - "type": "boolean" - }, - "disable_macros": { - "title": "Disable advanced macros", - "description": "Advanced macros can be disabled in those policies not needing them for a faster evaluation.", - "default": false, - "type": "boolean" - }, - "jwt": { - "title": "JWT policies", - "description": "All the policies applied in the JWT context (token validation). **You must configure `auth/validator`** for the policies to run, otherwise they will be skipped. Any policy failing will generate a `401 Unauthorized` error. Works in the `endpoint` context only, and is not available under `backend`.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "type": "object", - "required": [ "policies" ], - "properties": { - "policies": { - "title": "Policies", - "description": "An array with all the policies to evaluate. Each policy is represented as a string\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "type": "array", - "minItems": 1, - "items": { - "title": "The policy you want to evaluate", - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "req": { - "title": "Request policies", - "description": "All the policies applied in the request context.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "type": "object", - "required": [ "policies" ], - "properties": { - "error": { - "type": "object", - "properties": { - "body": { - "title": "Error body", - "description": "Leave an empty string to use the validation error, or write a string with the error response body. This error is NOT returned in the response, but in the application logs, unless you enable `return_detailed_errors` in the `router` section. You can add escaped JSON, XML, etc in the string and add a Content-Type.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "default": "", - "type": "string" - }, - "content_type": { - "title": "Content-Type", - "description": "The Content-Type header you'd like to send with the error response. When unset, uses `text/plain` by default.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "default": "text/plain", - "type": "string" - }, - "status": { - "title": "HTTP status code", - "description": "The HTTP status code you want to return when the validation fails.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "default": 500, - "type": "integer" - } - } - }, - "policies": { - "title": "Policies", - "description": "An array with all the policies to evaluate. Each policy is represented as a string\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "type": "array", - "minItems": 1, - "items": { - "title": "The policy you want to evaluate", - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "resp": { - "title": "Response policies", - "description": "All the policies applied in the response context.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "type": "object", - "required": [ "policies" ], - "properties": { - "error": { - "type": "object", - "properties": { - "body": { - "title": "Error body", - "description": "Leave an empty string to use the validation error, or write a string with the error response body. This error is NOT returned in the response, but in the application logs, unless you enable `return_detailed_errors` in the `router` section. You can add escaped JSON, XML, etc in the string and add a Content-Type.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "default": "", - "type": "string" - }, - "content_type": { - "title": "Content-Type", - "description": "The Content-Type header you'd like to send with the error response. When unset, uses `text/plain` by default.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "default": "text/plain", - "type": "string" - }, - "status": { - "title": "HTTP status code", - "description": "The HTTP status code you want to return when the validation fails.\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "default": 500, - "type": "integer" - } - } - }, - "policies": { - "title": "Policies", - "description": "An array with all the policies to evaluate. Each policy is represented as a string\n\nSee: https://www.krakend.io/docs/enterprise/security-policies/", - "type": "array", - "minItems": 1, - "items": { - "title": "The policy you want to evaluate", - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/server/static-filesystem.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Static Filesystem", - "description": "Enterprise only. Allows you to fetch and serve static content by registering a static web server for a set of defined paths (the prefixes).\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/", - "type": "object", - "required": [ "prefix", "path" ], - "properties": { - "directory_listing": { - "description": "Whether to allow directory listings or not", - "default": false, - "type": "boolean" - }, - "path": { - "title": "Path", - "description": "The folder in the filesystem containing the static files. Relative to the working dir where KrakenD config is (e.g.: `./assets`) or absolute (e.g.: `/var/www/assets`).\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/", - "examples": [ "./static/" ], - "type": "string" - }, - "prefix": { - "title": "Prefix", - "description": "This is the beginning (prefix) of all URLs that are resolved using this plugin. All matching URLs won't be passed to the router, meaning that they are not considered endpoints. Make sure you are not overwriting valid endpoints. When the `prefix` is `/`, then **all traffic is served as static** and you must declare a prefix under `skip` (e.g.: `/api`) to match endpoints.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/", - "examples": [ "/media/assets" ], - "type": "string" - }, - "skip": { - "title": "Skip paths", - "description": "An array with all the prefix URLs that despite they could match with the `prefix`, you don't want to treat them as static content and pass them to the router.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/serve-static-content/", - "examples": [ - [ "/media/ignore/this/directory", "/media/file.json" ] - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/server/virtualhost.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "VirtualHost", - "description": "Enterprise only. The Virtual Host server allows you to run different configurations of KrakenD endpoints based on the host accessing the server.\n\nSee: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/", - "type": "object", - "oneOf": [ - { - "required": [ "hosts" ] - }, - { - "required": [ "aliased_hosts" ] - } - ], - "properties": { - "aliased_hosts": { - "title": "Virtualhosts with alias", - "description": "A map of all recognized virtual hosts where the key is the alias and the value the host name, including the port if it's not 443 or 80. The values declared here must match the content of the `Host` header passed by the client. The alias must be an alphanumeric string.\n\nSee: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/", - "examples": [ - { - "user_api": "users.svc.example.com:9000" - } - ], - "type": "object", - "properties": { - "[a-z0-9_]+": { - "title": "Virtualhost", - "description": "The key of this map must compile with the regexp `a-z0-9_` and the host name is the string that matches the value sent by the user in the `Host` header.", - "type": "string" - } - } - }, - "hosts": { - "title": "Virtualhosts", - "description": "All recognized virtual hosts by KrakenD must be listed here. The values declared here must match the content of the `Host` header when passed by the client.\n\nSee: https://www.krakend.io/docs/enterprise/service-settings/virtual-hosts/", - "examples": [ - [ "api-a.example.com", "api-b.example.com" ] - ], - "type": "array", - "items": { - "type": "string" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/service_extra_config.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Schema definition for service extra_config", - "type": "object", - "properties": { - "ai/mcp": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1ai~1mcp.json" - }, - "auth/api-keys": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1auth~1api-keys.json" - }, - "auth/basic": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1auth~1basic.json" - }, - "auth/revoker": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1auth~1revoker.json" - }, - "auth/validator": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1auth~1jose.json" - }, - "documentation/openapi": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1documentation~1openapi.json" - }, - "documentation/postman": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1documentation~1postman.json" - }, - "governance/processors": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1governance~1processors.json" - }, - "governance/quota": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1governance~1quota.json" - }, - "grpc": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1grpc.json" - }, - "modifier/lua-endpoint": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1lua.json" - }, - "modifier/response-headers": { - "title": "Response Headers modifier", - "description": "Enterprise only. Allows you to transform response headers declaratively.\n\nSee: https://www.krakend.io/docs/enterprise/service-settings/response-headers-modifier/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1response-headers.json" - }, - "plugin/http-server": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1http-server.json" - }, - "qos/ratelimit/service": { - "title": "Service Rate-limiting", - "description": "Enterprise only. The service rate limit feature allows you to set the maximum requests per second a user or group of users can do to KrakenD and works analogously to the endpoint rate limit.\n\nSee: https://www.krakend.io/docs/enterprise/service-settings/service-rate-limit/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1qos~1ratelimit~1router.json" - }, - "qos/ratelimit/service/redis": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1qos~1ratelimit~1redis.json" - }, - "qos/ratelimit/tiered": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1qos~1ratelimit~1tiered.json" - }, - "redis": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1redis.json" - }, - "router": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1router.json" - }, - "security/bot-detector": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1security~1bot-detector.json" - }, - "security/cors": { - "title": "Cross Origin Resource Sharing", - "description": "When KrakenD endpoints are consumed from a browser, you might need to enable the Cross-Origin Resource Sharing (CORS) module as browsers restrict cross-origin HTTP requests initiated from scripts.\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "default": { - "allow_methods": [ "POST", "GET" ], - "allow_origins": [ "http://foobar.com" ], - "max_age": "12h" - }, - "type": "object", - "required": [ "allow_origins" ], - "properties": { - "allow_credentials": { - "title": "Allow_credentials", - "description": "When requests can include user credentials like cookies, HTTP authentication or client side SSL certificates\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "default": true, - "type": "boolean" - }, - "allow_headers": { - "title": "Allowed headers", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "allow_methods": { - "title": "Allowed methods", - "description": "The array of all HTTP methods accepted, in uppercase.\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "type": "array", - "uniqueItems": true, - "items": { - "title": "Object in array", - "description": "\n\nSee: https://www.krakend.io", - "enum": [ - "GET", - "HEAD", - "POST", - "PUT", - "PATCH", - "DELETE", - "OPTIONS" - ] - } - }, - "allow_origins": { - "title": "Allowed origins", - "description": "An array with all the origins allowed, examples of values are https://example.com, or * (any origin).\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "type": "array", - "items": { - "title": "Allowed origins list", - "examples": [ "*", "https://example.com" ], - "type": "string" - } - }, - "debug": { - "title": "Show debug", - "description": "Show debugging information in the logger, to be used only during development.\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "default": true, - "type": "boolean" - }, - "expose_headers": { - "title": "Expose headers", - "description": "Headers that are safe to expose to the API of a CORS API specification-\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "max_age": { - "title": "Max age", - "description": "For how long the response can be cached.\n\nSee: https://www.krakend.io/docs/service-settings/cors/", - "examples": [ "12h" ], - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - } - } - }, - "security/http": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1security~1http.json" - }, - "server/static-filesystem": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1server~1static-filesystem.json" - }, - "server/virtualhost": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1server~1virtualhost.json" - }, - "telemetry/gelf": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1gelf.json" - }, - "telemetry/influx": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1influx.json" - }, - "telemetry/logging": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1logging.json" - }, - "telemetry/logstash": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1logstash.json" - }, - "telemetry/metrics": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1metrics.json" - }, - "telemetry/moesif": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1moesif.json" - }, - "telemetry/newrelic": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1newrelic.json" - }, - "telemetry/opencensus": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1opencensus.json" - }, - "telemetry/opentelemetry": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1opentelemetry.json" - }, - "telemetry/opentelemetry-security": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1opentelemetry-security.json" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/telemetry/backend_log.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Enterprise only. Improved logging", - "description": "Enables the Backend Log capabilities.\n\nSee: https://www.krakend.io/enterprise/docs/logging/", - "type": "object", - "minProperties": 1, - "properties": { - "custom_format": { - "title": "Backend Log Format", - "description": "Specify the custom format of the Backend Logs.\n\nSee: https://www.krakend.io/enterprise/docs/logging/", - "examples": [ - "%{time:kitchen} | (╯°□°)╯( ┻━┻ %{statusCode} | %{method} %{host} %{path}\n" - ], - "default": "%{prefix}%{time} |%{statusCode}| %{latencyMs} | %{method} %{host} %{path}\n", - "type": "string" - }, - "log_with_level": { - "title": "Backend Log Level", - "description": "What type of **reporting level** do you want to set at the backends? The options below go from more verbose to least. Use the `DEBUG` level in the development stages but not in production. Some components can add extra verbosity while in DEBUG mode and send **multiline content**, which is not always suitable for automated log parsing.\n\nSee: https://www.krakend.io/enterprise/docs/logging/", - "enum": [ "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL" ] - }, - "no_value": { - "title": "Backend Log No Value", - "description": "When the variable does not resolve to any value, the string you want to write in the log. If the string is set to an empty value, a dash `-` is printed.\n\nSee: https://www.krakend.io/enterprise/docs/logging/", - "examples": [ "-", "null", "no_value", "" ], - "default": "-", - "type": "string" - }, - "prefix": { - "title": "Backend Log Prefix", - "description": "Adds the defined string at the beginning of every logged line, so you can quickly filter messages with external tools later on.\n\nSee: https://www.krakend.io/enterprise/docs/logging/", - "examples": [ ">>> " ], - "default": "", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/telemetry/gelf.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "GELF", - "description": "Send structured events in GELF format to your Graylog Cluster.\n\nSee: https://www.krakend.io/docs/logging/graylog-gelf/", - "type": "object", - "required": [ "address", "enable_tcp" ], - "properties": { - "address": { - "title": "Address", - "description": "The address (including the port) of your Graylog cluster (or any other service that receives GELF inputs). E.g., `myGraylogInstance:12201`\n\nSee: https://www.krakend.io/docs/logging/graylog-gelf/", - "type": "string" - }, - "enable_tcp": { - "title": "Enable TCP", - "description": "Set to false (recommended) to use UDP, or true to use TCP. TCP performance is worst than UDP under heavy load.\n\nSee: https://www.krakend.io/docs/logging/graylog-gelf/", - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/telemetry/influx.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Telemetry via influx", - "description": "Enables the extended logging capabilities.\n\nSee: https://www.krakend.io/docs/telemetry/influxdb-native/", - "type": "object", - "required": [ "address", "ttl" ], - "properties": { - "address": { - "title": "Address", - "description": "The complete url of the influxdb including the port if different from defaults in http/https.\n\nSee: https://www.krakend.io/docs/telemetry/influxdb-native/", - "type": "string" - }, - "buffer_size": { - "title": "Points in buffer", - "description": "The buffer size is a protection mechanism that allows you to temporarily store datapoints for later reporting when Influx is unavailable. If the buffer is `0`, reported metrics that fail are discarded immediately. If the buffer is a positive number, KrakenD creates a buffer with the number of datapoints set. When the buffer is full because the Influx server keeps failing, newer datapoints replace older ones in the buffer.\n\nSee: https://www.krakend.io/docs/telemetry/influxdb-native/", - "type": "integer", - "minimum": 0 - }, - "db": { - "title": "DB name", - "description": "Name of the InfluxDB database (Influx v1) or the bucket name (Influx v2).\n\nSee: https://www.krakend.io/docs/telemetry/influxdb-native/", - "default": "krakend", - "type": "string" - }, - "password": { - "title": "Password", - "description": "Password to authenticate to InfluxDB. In Influx v2, you also need to add grant access with `influx v1 auth`.\n\nSee: https://www.krakend.io/docs/telemetry/influxdb-native/", - "type": "string" - }, - "ttl": { - "title": "TTL", - "description": "TTL against Influx.\n\nSee: https://www.krakend.io/docs/telemetry/influxdb-native/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit" - }, - "username": { - "title": "Username", - "description": "Username to authenticate to InfluxDB.\n\nSee: https://www.krakend.io/docs/telemetry/influxdb-native/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/telemetry/logging.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Logging", - "description": "Enables the extended logging capabilities.\n\nSee: https://www.krakend.io/docs/logging/", - "type": "object", - "required": [ "level" ], - "properties": { - "format": { - "title": "Application log format", - "description": "Specify the format of the application logs: default, logstash, or custom.\nThe custom format needs an additional key \"custom_format\".\n\nSee: https://www.krakend.io/docs/logging/", - "examples": [ "default", "logstash", "custom" ], - "default": "default", - "type": "string" - }, - "access_log_custom_format": { - "title": "Access log custom format", - "description": "Enterprise only. You can write the access log pattern you would like to use. Add a newline `\\n` at the end of the pattern. See the variables you can use.\n\nSee: https://www.krakend.io/docs/logging/", - "examples": [ - "%{prefix} %{time} [AccessLog] |%{statusCode}| %{latencyMs} | %{clientIP} | %{method} %{path}\n" - ], - "default": "", - "type": "string" - }, - "access_log_format": { - "title": "Access log format", - "description": "Enterprise only. Enable a formatter for the access log. You can write your own pattern using the `custom` value, or you can use one of the predefined ones.\n\nSee: https://www.krakend.io/docs/logging/", - "default": "", - "enum": [ "default", "httpdCommon", "httpdCombine", "json", "custom" ] - }, - "access_log_missing_key_marker": { - "title": "Access log format missing key", - "description": "Enterprise only. When you use a custom access log format, the variable you are trying to print could be empty. For instance, you have added in the format `%{header.Authorization}` but the header is missing in the request. In this case, the printed value is what you configure here. If the string is set to an empty value, a dash `-` is printed. \n\nSee: https://www.krakend.io/docs/logging/", - "examples": [ - "%{default}", - "%{httpdCommon}", - "%{prefix} %{time} [AccessLog] |%{statusCode}| %{latencyMs} | %{clientIP} | %{method} %{path}\n" - ], - "default": "-", - "type": "string" - }, - "backend": { - "title": "Backend log format", - "description": "Enterprise only. Add a specific [Backend Log](https://www.krakend.io/docs/enterprise/logging/#backend-log). Useful to see status codes, headers, and other information that come from your backends.\n\nSee: https://www.krakend.io/docs/enterprise/logging/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1telemetry~1backend_log.json", - "type": "object" - }, - "custom_format": { - "title": "Custom format", - "description": "Lets you write a custom logging pattern using variables, e.g: `%{message}`.\n\nSee: https://www.krakend.io/docs/logging/", - "type": "string" - }, - "level": { - "title": "Log Level", - "description": "What type of **reporting level** do you expect from the application? The options below go from more verbose to least. Use the `DEBUG` level in the development stages but not in production. Some components can add extra verbosity while in DEBUG mode and send **multiline content**, which is not always suitable for automated log parsing.\n\nSee: https://www.krakend.io/docs/logging/", - "enum": [ "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL" ] - }, - "prefix": { - "title": "Prefix", - "description": "Adds the defined string at the beginning of every logged line, so you can quickly filter messages with external tools later on. It's recommended to always add a prefix `[INSIDE BRACKETS]` to make use of predefined dashboards.\n\nSee: https://www.krakend.io/docs/logging/", - "type": "string" - }, - "stdout": { - "title": "Logs to stdout", - "description": "Set to true to send logs to stdout.\n\nSee: https://www.krakend.io/docs/logging/", - "default": false, - "type": "boolean" - }, - "syslog": { - "title": "Logs to syslog", - "description": "Set to true to send logs to syslog.\n\nSee: https://www.krakend.io/docs/logging/", - "default": false, - "type": "boolean" - }, - "syslog_facility": { - "title": "Syslog facility", - "description": "When using syslog, the facility tells KrakenD where to send the messages as set by the locals of the [syslog standard](https://www.rfc-editor.org/rfc/rfc5424.html).\n\nSee: https://www.krakend.io/docs/logging/", - "default": "local3", - "enum": [ - "local0", - "local1", - "local2", - "local3", - "local4", - "local5", - "local6", - "local7" - ] - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/telemetry/logstash.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Logstash", - "description": "Enables logstash when the extra_config \"telemetry/logging\" is also present.\n\nSee: https://www.krakend.io/docs/logging/logstash/", - "type": "object", - "required": [ "enabled" ], - "properties": { - "enabled": { - "title": "Enabled", - "default": true, - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/telemetry/metrics.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Extended metrics", - "description": "Collects extended metrics to push to InfluxDB or expose them in the /__stats/ endpoint.\n\nSee: https://www.krakend.io/docs/telemetry/extended-metrics/", - "type": "object", - "properties": { - "backend_disabled": { - "title": "Backend disabled", - "description": "Skip any metrics happening in the backend layer. Disabling layers saves memory consumption but reduces visibility.\n\nSee: https://www.krakend.io/docs/telemetry/extended-metrics/", - "default": false, - "type": "boolean" - }, - "collection_time": { - "title": "Collection time", - "description": "The time window to consolidate collected metrics. Metrics are updated in their internal counters all the time, but the `/__stats/` endpoint, or the Influx reporter, won't see them updated until this window completes.\n\nSee: https://www.krakend.io/docs/telemetry/extended-metrics/", - "default": "60s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "endpoint_disabled": { - "title": "Endpoint disabled", - "description": "When true do not publish the /__stats/ endpoint. Metrics won't be accessible via the endpoint but still collected (and you can send them to Influx for instance).\n\nSee: https://www.krakend.io/docs/telemetry/extended-metrics/", - "default": false, - "type": "boolean" - }, - "listen_address": { - "title": "Listen address", - "description": "Change the listening address where the metrics endpoint is exposed.\n\nSee: https://www.krakend.io/docs/telemetry/extended-metrics/", - "default": ":8090", - "type": "string", - "pattern": "^:[0-9]+$" - }, - "proxy_disabled": { - "title": "Proxy disabled", - "description": "Skip any metrics happening in the proxy layer (traffic against your backends). Disabling layers saves memory consumption but reduces visibility.\n\nSee: https://www.krakend.io/docs/telemetry/extended-metrics/", - "default": false, - "type": "boolean" - }, - "router_disabled": { - "title": "Router disabled", - "description": "Skip any metrics happening in the router layer (activity in KrakenD endpoints). Disabling layers saves memory consumption but reduces visibility.\n\nSee: https://www.krakend.io/docs/telemetry/extended-metrics/", - "default": false, - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/telemetry/moesif.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Moesif integration", - "description": "The Moesif integration helps you understand and monetize API usage with a robust analytics and billing platform.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "type": "object", - "required": [ "application_id", "user_id_headers" ], - "properties": { - "application_id": { - "title": "Collector Application ID", - "description": "The Collector Application ID is used to send events, actions, users, and companies to Moesif's Collector API. Moesif provides it under the 'API Keys' section.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "type": "string" - }, - "batch_size": { - "title": "Batch Size", - "description": "Number of events you will send on every batch reporting asynchronously to Moesif. For high throughput you will need to increase this value.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "default": 200, - "type": "integer" - }, - "debug": { - "title": "Enable debug", - "description": "Set to true when configuring Moesif for the first time while in development, to see the activity in the logs. Set to false in production.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "default": false, - "type": "boolean" - }, - "event_queue_size": { - "title": "Event Queue Size", - "description": "Sends the number of events you can hold in-memory to send them asynchronously to Moesif. If the throughput of your API generates more events than the size of the queue, the exceeding events will be discarded and not reported.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "default": 1000000, - "type": "integer" - }, - "identify_company": { - "title": "Identify company", - "description": "It sets which strategy you want to use to identify the company. Identifying the company helps you efficiently govern your API. Choose the system you wish to apply (**declare only one property**). The claim value you access must be of type string. You can access nested structured using the dot `.` separator. When using dots, literals with an exact match containing the dot are checked first.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "type": "object", - "maxProperties": 1, - "properties": { - "header": { - "title": "Company in Header", - "description": "The company is identified using a header. Provide the header name.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "examples": [ "X-Tenant" ], - "type": "string" - }, - "jwt_claim": { - "title": "Company in Claim", - "description": "The company is stored in a claim inside the JWT. The claim must return a string.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "examples": [ "company_id" ], - "type": "string" - }, - "query_string": { - "title": "Company in Query String", - "description": "The company is always passed inside a query string when calling any URL. Provide the query string name.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "examples": [ "company" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "log_body": { - "title": "Send the body", - "description": "Send the body of all endpoints and requests to Moesif.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "default": true, - "type": "boolean" - }, - "metadata": { - "title": "Metadata", - "description": "A free-form object that allows you to push custom metadata along with events. The custom metadata appears in Moesif under a key `krakend`, you can use nesting if needed.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "examples": [ - { - "instance_id": "1234abcd", - "region": "us-west-1" - } - ], - "type": "object" - }, - "request_body_masks": { - "title": "Request body masks", - "description": "The list of fields in the request body that you want to mask before sending them to Moesif. You can set `log_body` to `false` to prevent any body being sent.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "examples": [ - [ "password", "credit_card" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "request_header_masks": { - "title": "Request header masks", - "description": "The list of request headers that you want to mask their values before sending them to Moesif.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "examples": [ - [ "Authorization" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "response_body_masks": { - "title": "Response body masks", - "description": "The list of fields in the response body that you want to mask before sending them to Moesif. You can set `log_body` to `false` to prevent any body being sent.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "examples": [ - [ "password", "credit_card" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "response_header_masks": { - "title": "Response header masks", - "description": "The list of response headers that you want to mask their values before sending them to Moesif.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "examples": [ - [ "Cookie" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "should_skip": { - "title": "Should Skip", - "description": "Defines an expression expressed as [Security Policy](https://www.krakend.io/docs/enterprise/security-policies/) that avoids reporting to Moesif when the result of the evaluation is `true`.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "examples": [ - "( req_method=='GET' || req_path.startsWith('/bar/')) && hasHeader('X-Something')" - ], - "default": [], - "type": "string" - }, - "timer_wake_up_seconds": { - "title": "Timer Wake Up", - "description": "Specifies how often a background thread runs to send events to Moesif. Value in seconds.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "default": 2, - "type": "integer" - }, - "user_id_headers": { - "title": "User ID headers", - "description": "Defines the list of possible headers that can identify a user uniquely. When the header is `Authorization`, it automatically extracts the username if it contains an `Authorization: Basic` value with no additional configuration. If, on the other hand, you use tokens and pass an `Authorization: Bearer`, it will extract the user ID from the JWT claim defined under `user_id_jwt_claim`. If there are multiple headers in the list, all of them are tested in the given order, and the first existing header in the list is used to extract the user ID (successfully or not).\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "examples": [ - [ "X-User-ID", "Authorization" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "user_id_jwt_claim": { - "title": "User ID JWT claim", - "description": "When using JWT tokens, it defines which claim contains the user ID. The claim value you access must be of type string. You can access nested structured using the dot `.` separator. When using dots, literals with an exact match containing the dot are checked first.\n\nSee: https://www.krakend.io/docs/enterprise/governance/moesif/", - "examples": [ "sub", "user.id" ], - "default": "sub", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/telemetry/newrelic.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "NewRelic exporter", - "description": "The New Relic integration lets you push KrakenD metrics and distributed traces to your New Relic dashboard. It uses internally the official New Relic SDK and brings its features to your APM dashboard.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/newrelic/", - "type": "object", - "required": [ "license" ], - "properties": { - "debug": { - "title": "Enable debug", - "description": "Set to true when configuring New Relic for the first time while in development, to see the activity in the logs. Set to false in production.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/newrelic/", - "default": false, - "type": "boolean" - }, - "headers_to_pass": { - "title": "Headers to pass", - "description": "Defines an explicit list of headers sent during the client request that will be reported to NewRelic, in addition to the default headers NewRelic sets. Setting the `[\"*\"]` value will send all headers sent by the client to NewRelic. Whether you declare this setting or not, you will usually receive from the NewRelic SDK the `Accept`, `Content-Type`, `User-Agent`, and `Referer` headers.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/newrelic/", - "examples": [ - [ "*" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "license": { - "title": "License key", - "description": "The API key provided by New Relic to push data into your account.\n\nSee: https://www.krakend.io/docs/enterprise/telemetry/newrelic/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/telemetry/opencensus.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Telemetry via Opencensus", - "description": "Enables the extended logging capabilities.\n\nSee: https://www.krakend.io/docs/telemetry/opencensus/", - "type": "object", - "required": [ "exporters" ], - "properties": { - "enabled_layers": { - "title": "Enabled Layers", - "description": "Lets you specify what data you want to export. All layers are enabled by default unless you declare this section.", - "properties": { - "backend": { - "title": "Report backend", - "description": "Reports the activity between KrakenD and your services", - "default": false, - "type": "boolean" - }, - "pipe": { - "title": "Report pipe", - "description": "Reports the activity at the beginning of the proxy layer. It gives a more detailed view of the internals of the pipe between end-users and KrakenD, having into account merging of different backends.", - "default": false, - "type": "boolean" - }, - "router": { - "title": "Report router", - "description": "Reports the activity between end-users and KrakenD", - "default": false, - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "exporters": { - "title": "Exporters", - "description": "The exporter(s) you would like to enable. See each exporter configuration in its own section.", - "type": "object", - "minProperties": 1, - "properties": { - "datadog": { - "title": "Datadog", - "description": "Datadog is a monitoring and security platform for developers, IT operations teams and business in the cloud.\n\nSee: https://www.krakend.io/docs/telemetry/datadog/", - "type": "object", - "required": [ - "namespace", - "service", - "trace_address", - "stats_address", - "tags", - "global_tags", - "disable_count_per_buckets" - ], - "properties": { - "disable_count_per_buckets": { - "title": "Disable count per buckets", - "description": "Specifies whether to emit count_per_bucket metrics.\n\nSee: https://www.krakend.io/docs/telemetry/datadog/", - "default": false, - "type": "boolean" - }, - "global_tags": { - "title": "Global tags", - "description": "A set of tags (key/value) that will automatically be applied to all exported spans.\n\nSee: https://www.krakend.io/docs/telemetry/datadog/", - "examples": [ - { - "env": "prod" - } - ], - "type": "object" - }, - "namespace": { - "title": "Namespace", - "description": "The namespace to which metric keys are appended.\n\nSee: https://www.krakend.io/docs/telemetry/datadog/", - "type": "string" - }, - "service": { - "title": "Service", - "description": "Service specifies the service name used for tracing\n\nSee: https://www.krakend.io/docs/telemetry/datadog/", - "examples": [ "gateway" ], - "type": "string" - }, - "stats_address": { - "title": "Stats address", - "description": "Specifies the host[:port] address for DogStatsD. To enable ingestion using Unix Domain Socket (UDS) mount your UDS path and reference it in the stats_address using a path like `unix:///var/run/datadog/dsd.socket`.\n\nSee: https://www.krakend.io/docs/telemetry/datadog/", - "examples": [ "localhost:8125" ], - "default": "localhost:8125", - "type": "string" - }, - "tags": { - "title": "Tags", - "description": "Specifies a set of global tags to attach to each metric.\n\nSee: https://www.krakend.io/docs/telemetry/datadog/", - "type": "array", - "items": { - "type": "string" - } - }, - "trace_address": { - "title": "Trace address", - "description": "Specifies the host[:port] address of the Datadog Trace Agent.\n\nSee: https://www.krakend.io/docs/telemetry/datadog/", - "default": "localhost:8126", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "influxdb": { - "title": "Influxdb", - "description": "Exports data to InfluxDB: A time series database designed to handle high write and query loads.\n\nSee: https://www.krakend.io/docs/telemetry/influxdb/", - "type": "object", - "required": [ "address", "db" ], - "properties": { - "address": { - "title": "Address", - "description": "The URL (including port) where your InfluxDB is installed.\n\nSee: https://www.krakend.io/docs/telemetry/influxdb/", - "examples": [ "http://192.168.99.100:8086" ], - "type": "string" - }, - "db": { - "title": "DB name", - "description": "The database name\n\nSee: https://www.krakend.io/docs/telemetry/influxdb/", - "examples": [ "krakend" ], - "type": "string" - }, - "password": { - "title": "Password", - "description": "The password to access the database\n\nSee: https://www.krakend.io/docs/telemetry/influxdb/", - "examples": [ "kr4k3nd" ], - "type": "string" - }, - "timeout": { - "title": "Timeout", - "description": "The maximum time you will wait for InfluxDB to respond.\n\nSee: https://www.krakend.io/docs/telemetry/influxdb/", - "examples": [ "2s" ], - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "username": { - "title": "Username", - "description": "The influxdb username to access the database\n\nSee: https://www.krakend.io/docs/telemetry/influxdb/", - "examples": [ "krakend" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "jaeger": { - "title": "Jaeger", - "description": "Submit spans to a Jaeger Collector (HTTP) with `endpoint` or to a Jaeger Agent (UDP) with `agent_endpoint`. \n\nSee https://www.krakend.io/docs/telemetry/jaeger/", - "type": "object", - "oneOf": [ - { - "required": [ "endpoint", "service_name" ] - }, - { - "required": [ "agent_endpoint", "service_name" ] - } - ], - "properties": { - "agent_endpoint": { - "title": "Agent Endpoint", - "description": "The address where the Jaeger Agent is (Thrift over UDP), e.g., `jaeger:6831`\n\nSee: https://www.krakend.io/docs/telemetry/jaeger/", - "examples": [ "http://192.168.99.100:14268/api/traces" ], - "type": "string" - }, - "buffer_max_count": { - "title": "Buffer max count", - "description": "Total number of traces to buffer in memory\n\nSee: https://www.krakend.io/docs/telemetry/jaeger/", - "type": "integer" - }, - "endpoint": { - "title": "Collector Endpoint", - "description": "The full URL including port indicating where your Jaeger Collector is (Thrift over HTTP/S), e.g., `http://jaeger:14268/api/traces`\n\nSee: https://www.krakend.io/docs/telemetry/jaeger/", - "examples": [ "http://192.168.99.100:14268/api/traces" ], - "type": "string" - }, - "service_name": { - "title": "Service name", - "description": "The service name registered in Jaeger\n\nSee: https://www.krakend.io/docs/telemetry/jaeger/", - "examples": [ "krakend" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "logger": { - "title": "Logger", - "description": "Opencensus can export data to the system logger as another exporter. Recommended to use `telemetry/logging` instead.\n\nSee: https://www.krakend.io/docs/telemetry/logger/", - "type": "object", - "properties": { - "spans": { - "title": "Spans", - "description": "Whether to log the spans or not", - "default": false, - "type": "boolean" - }, - "stats": { - "title": "Stats", - "description": "Whether to log the statistics or not", - "default": false, - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "ocagent": { - "title": "Ocagent", - "description": "Exporting metrics, logs, and events to the OpenCensus Agent.\n\nSee: https://www.krakend.io/docs/telemetry/ocagent/", - "type": "object", - "required": [ "address", "service_name" ], - "properties": { - "address": { - "title": "Address", - "description": "The address of your Azure Monitor collector.\n\nSee: https://www.krakend.io/docs/telemetry/ocagent/", - "examples": [ "localhost:55678" ], - "type": "string" - }, - "enable_compression": { - "title": "Enable compression", - "description": "Whether to send data compressed or not.\n\nSee: https://www.krakend.io/docs/telemetry/ocagent/", - "default": false, - "type": "boolean" - }, - "headers": { - "title": "Headers", - "description": "List of keys and values for the headers sent. Keys and values must be of type string.\n\nSee: https://www.krakend.io/docs/telemetry/ocagent/", - "examples": [ - { - "header1": "value1" - } - ], - "type": "object" - }, - "insecure": { - "title": "Insecure", - "description": "Whether the connection can be established in plain (insecure) or not.\n\nSee: https://www.krakend.io/docs/telemetry/ocagent/", - "default": false, - "type": "boolean" - }, - "reconnection": { - "title": "Reconnection", - "description": "The reconnection time\n\nSee: https://www.krakend.io/docs/telemetry/ocagent/", - "default": "2s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - }, - "service_name": { - "title": "Service name", - "description": "An identifier of your service, e.g, `krakend`.\n\nSee: https://www.krakend.io/docs/telemetry/ocagent/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "prometheus": { - "title": "Prometheus", - "description": "Prometheus is an open-source systems monitoring and alerting toolkit.", - "type": "object", - "required": [ "port" ], - "properties": { - "namespace": { - "title": "Namespace", - "description": "Sets the domain the metric belongs to.\n\nSee: https://www.krakend.io/docs/telemetry/prometheus/", - "type": "string" - }, - "port": { - "title": "Port", - "description": "Port on which the Prometheus exporter should listen\n\nSee: https://www.krakend.io/docs/telemetry/prometheus/", - "examples": [ 9091 ], - "type": "integer" - }, - "tag_host": { - "title": "Tag host", - "description": "Whether to send the host as a metric or not.\n\nSee: https://www.krakend.io/docs/telemetry/prometheus/", - "default": false, - "type": "boolean" - }, - "tag_method": { - "title": "Tag method", - "description": "Whether to send the HTTP method as a metric or not.\n\nSee: https://www.krakend.io/docs/telemetry/prometheus/", - "default": true, - "type": "boolean" - }, - "tag_path": { - "title": "Tag path", - "description": "Whether to send the path as a metric or not.\n\nSee: https://www.krakend.io/docs/telemetry/prometheus/", - "default": false, - "type": "boolean" - }, - "tag_statuscode": { - "title": "Tag status code", - "description": "Whether to send the status code as a metric or not.\n\nSee: https://www.krakend.io/docs/telemetry/prometheus/", - "default": false, - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "stackdriver": { - "title": "Stackdriver", - "description": "Export metrics and traces to Google Cloud", - "type": "object", - "required": [ "project_id", "default_labels" ], - "properties": { - "default_labels": { - "title": "Default_labels", - "description": "A map object. Enter here any label that will be assigned by default to the reported metric so you can filter later on Stack Driver.\n\nSee: https://www.krakend.io/docs/telemetry/stackdriver/", - "examples": [ - { - "env": "production" - } - ], - "type": "object" - }, - "metric_prefix": { - "title": "Metric_prefix", - "description": "A prefix that you can add to all your metrics for better organization.\n\nSee: https://www.krakend.io/docs/telemetry/stackdriver/", - "type": "string" - }, - "project_id": { - "title": "Project_id", - "description": "The identifier of your Google Cloud project. The `project_id` **is not the project name**. You can omit this value from the configuration if you have an application credential file for Google.\n\nSee: https://www.krakend.io/docs/telemetry/stackdriver/", - "examples": [ "ID" ], - "default": "", - "type": "string", - "pattern": "^.*$" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "xray": { - "title": "AWS X-ray", - "description": "AWS X-Ray is a service offered by Amazon that provides an end-to-end view of requests as they travel through your application, and shows a map of your application's underlying components.", - "type": "object", - "oneOf": [ - { - "required": [ - "region", - "version", - "access_key_id", - "secret_access_key" - ] - }, - { - "required": [ "region", "version", "use_env" ] - } - ], - "required": [ "region", "version" ], - "properties": { - "access_key_id": { - "title": "AWS access key id", - "description": " Your access key ID provided by Amazon. Needed when `use_env` is unset or set to false.\n\nSee: https://www.krakend.io/docs/telemetry/xray/", - "type": "string" - }, - "region": { - "title": "Region", - "description": "The AWS geographical region, e.g, `us-east-1`.\n\nSee: https://www.krakend.io/docs/telemetry/xray/", - "examples": [ "eu-west-1" ], - "type": "string" - }, - "secret_access_key": { - "title": "AWS secret access key", - "description": "Your secret access key provided by Amazon. Needed when `use_env` is unset or set to false.\n\nSee: https://www.krakend.io", - "type": "string" - }, - "use_env": { - "title": "Use_env", - "description": "When true the AWS credentials (access_key_id and secret_access_key) are taken from environment vars. Don't specify them then.\n\nSee: https://www.krakend.io/docs/telemetry/xray/", - "default": false, - "type": "boolean" - }, - "version": { - "title": "Version", - "description": "The version of the AWS X-Ray service to use.\n\nSee: https://www.krakend.io/docs/telemetry/xray/", - "default": "KrakenD-opencensus", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "zipkin": { - "title": "Zipkin", - "description": "Export telemetry data to a Zipkin collector", - "type": "object", - "required": [ "collector_url", "service_name" ], - "properties": { - "collector_url": { - "title": "Collector URL", - "description": "The URL (including port and path) where your Zipkin is accepting the spans, e.g., `http://zipkin:9411/api/v2/spans`\n\nSee: https://www.krakend.io/docs/telemetry/zipkin/", - "examples": [ "http://192.168.99.100:9411/api/v2/spans" ], - "type": "string" - }, - "service_name": { - "title": "Service name", - "description": "The service name registered in Zipkin.\n\nSee: https://www.krakend.io/docs/telemetry/zipkin/", - "examples": [ "krakend" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "reporting_period": { - "title": "Reporting period", - "description": "The number of seconds passing between reports. If duration is less than or equal to zero, it enables the default behavior of each exporter.\n\nSee: https://www.krakend.io/docs/telemetry/opencensus/", - "default": 0, - "type": "integer" - }, - "sample_rate": { - "title": "Sample rate", - "description": "A number between 0 (no requests at all) and 100 (all requests) representing the percentage of sampled requests you want to send to the exporter. **Sampling the 100% of the requests is generally discouraged** when the relationship between traffic and dedicated resources is sparse.\n\nSee: https://www.krakend.io/docs/telemetry/opencensus/", - "default": 0, - "type": "integer", - "maximum": 100, - "minimum": 0 - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/telemetry/opentelemetry-backend.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OpenTelemetry Backend Override", - "description": "Enterprise only. Overrides metrics and traces declared by the OpenTelemetry service.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/", - "type": "object", - "properties": { - "backend": { - "title": "Report backend activity", - "description": "Reports the activity between KrakenD and each of your backend services. This is the more granular layer.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "object", - "properties": { - "metrics": { - "type": "object", - "properties": { - "detailed_connection": { - "title": "Detailed HTTP connection metrics", - "description": "Whether you want to enable detailed metrics for the HTTP connection phase or not. Includes times to connect, DNS querying, and the TLS handshake.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "disable_stage": { - "title": "Disable this stage", - "description": "Whether to turn off the metrics or not. Setting this to `true` means stop reporting any data.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "read_payload": { - "title": "Detailed payload read", - "description": "Whether you want to enable metrics for the response reading payload or not (HTTP connection not taken into account).\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "round_trip": { - "title": "Detailed Round Trip", - "description": "Whether you want to enable metrics for the actual HTTP request for the backend or not (manipulation not taken into account). This is the time your backend needs to produce a result.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "static_attributes": { - "title": "static attributes", - "description": "a list of tags or labels you want to associate with these metrics.\n\nsee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "examples": [ - [ - { - "key": "my_metric_attr", - "value": "my_metric_val" - } - ] - ], - "type": "array", - "items": { - "type": "object", - "required": [ "key", "value" ], - "properties": { - "key": { - "title": "key", - "description": "the key, tag, or label name you want to use.\n\nsee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - }, - "value": { - "title": "value", - "description": "the static value you want to assign to this key.\n\nsee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - } - }, - "additionalproperties": false, - "patternproperties": { - "^[@$_#]": {} - } - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "traces": { - "type": "object", - "properties": { - "detailed_connection": { - "title": "Detailed HTTP connection", - "description": "Whether you want to add detailed trace attributes for the HTTP connection phase or not. Includes times to connect, DNS querying, and the TLS handshake.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "disable_stage": { - "title": "Disable this stage", - "description": "Whether to turn off the traces or not. Setting this to `true` means stop reporting any data.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "read_payload": { - "title": "Detailed payload read", - "description": "Whether you want to add trace attributes for the response reading payload or not (HTTP connection not taken into account).\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "report_headers": { - "title": "Report headers", - "description": "Whether you want to report the final headers that reached the backend.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "round_trip": { - "title": "Detailed Round Trip", - "description": "Whether you want to add trace attributes for the actual HTTP request for the backend or not (manipulation not taken into account). This is the time your backend needs to produce a result.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "static_attributes": { - "title": "static attributes", - "description": "a list of tags or labels you want to associate with these metrics.\n\nsee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "examples": [ - [ - { - "key": "my_metric_attr", - "value": "my_metric_val" - } - ] - ], - "type": "array", - "items": { - "type": "object", - "required": [ "key", "value" ], - "properties": { - "key": { - "title": "key", - "description": "the key, tag, or label name you want to use.\n\nsee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - }, - "value": { - "title": "value", - "description": "the static value you want to assign to this key.\n\nsee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - } - }, - "additionalproperties": false, - "patternproperties": { - "^[@$_#]": {} - } - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/telemetry/opentelemetry-endpoint.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OpenTelemetry Endpoint Override", - "description": "Enterprise only. Overrides metrics and traces declared by the OpenTelemetry service.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/", - "type": "object", - "properties": { - "backend": { - "title": "Report backend activity", - "description": "Enterprise only. Reports the activity between KrakenD and each of your backend services. This is the more granular layer.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "object", - "properties": { - "metrics": { - "type": "object", - "properties": { - "detailed_connection": { - "title": "Detailed HTTP connection metrics", - "description": "Whether you want to enable detailed metrics for the HTTP connection phase or not. Includes times to connect, DNS querying, and the TLS handshake.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "disable_stage": { - "title": "Disable this stage", - "description": "Whether to turn off the metrics or not. Setting this to `true` means stop reporting any data.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "read_payload": { - "title": "Detailed payload read", - "description": "Whether you want to enable metrics for the response reading payload or not (HTTP connection not taken into account).\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "round_trip": { - "title": "Detailed Round Trip", - "description": "Whether you want to enable metrics for the actual HTTP request for the backend or not (manipulation not taken into account). This is the time your backend needs to produce a result.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "static_attributes": { - "title": "Static attributes", - "description": "A list of tags or labels you want to associate with these metrics.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "examples": [ - [ - { - "key": "my_metric_attr", - "value": "my_metric_val" - } - ] - ], - "type": "array", - "items": { - "type": "object", - "required": [ "key", "value" ], - "properties": { - "key": { - "title": "Key", - "description": "The key, tag, or label name you want to use.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The static value you want to assign to this key.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "traces": { - "type": "object", - "properties": { - "detailed_connection": { - "title": "Detailed HTTP connection", - "description": "Whether you want to add detailed trace attributes for the HTTP connection phase or not. Includes times to connect, DNS querying, and the TLS handshake.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "disable_stage": { - "title": "Disable this stage", - "description": "Whether to turn off the traces or not. Setting this to `true` means stop reporting any data.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "read_payload": { - "title": "Detailed payload read", - "description": "Whether you want to add trace attributes for the response reading payload or not (HTTP connection not taken into account).\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "report_headers": { - "title": "Report headers", - "description": "Whether you want to report the final headers that reached the backend.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "round_trip": { - "title": "Detailed Round Trip", - "description": "Whether you want to add trace attributes for the actual HTTP request for the backend or not (manipulation not taken into account). This is the time your backend needs to produce a result.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "static_attributes": { - "title": "Static attributes", - "description": "A list of tags or labels you want to associate to these traces.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "examples": [ - [ - { - "key": "my_trace_attr", - "value": "my_trace_val" - } - ] - ], - "type": "array", - "items": { - "type": "object", - "required": [ "key", "value" ], - "properties": { - "key": { - "title": "Key", - "description": "The key, tag, or label name you want to use.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The static value you want to assign to this key.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "exporters_override": { - "title": "Exporters override", - "description": "Enterprise only. Override exporter configuration for this endpoint", - "type": "object", - "properties": { - "metric_exporters": { - "title": "Metrics exporters", - "description": "Overrides the metrics exporters used in this endpoint", - "examples": [ - [ "local_prometheus" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "metric_reporting_period": { - "title": "Reporting period", - "description": "Override how often you want to report and flush the metrics in seconds.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/", - "type": "integer" - }, - "trace_exporters": { - "title": "Trace exporters", - "description": "Overrides the trace exporters used in this endpoint", - "examples": [ - [ "debug_jaeger", "newrelic", "local_tempo" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "trace_sample_rate": { - "title": "Trace sample rate", - "description": "Overrides the sample rate for traces defines the percentage of reported traces. This option is key to reduce the amount of data generated (and resource usage), while you still can debug and troubleshoot issues. For instance, a number of `0.25` will report a 25% of the traces seen in the system.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/", - "examples": [ 0.25 ], - "type": "number", - "maximum": 1, - "minimum": 0 - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "global": { - "title": "Replace global configuration", - "description": "Overrides the global configuration for this endpoint.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/", - "properties": { - "metrics_static_attributes": { - "title": "Static attributes", - "description": "Static attributes you want to pass for metrics. Overrides the `metrics_static_attributes` defined at the service level.", - "type": "array", - "items": { - "properties": { - "key": { - "title": "Key", - "description": "The key of the static attribute you want to send", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The value of the static attribute you want to send", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "traces_static_attributes": { - "title": "Static attributes", - "description": "Static attributes you want to pass for traces. Overrides the `traces_static_attributes` defined at the service level.", - "type": "array", - "items": { - "properties": { - "key": { - "title": "Key", - "description": "The key of the static attribute you want to send", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The value of the static attribute you want to send", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "proxy": { - "title": "Report proxy activity", - "description": "Reports the activity at the beginning of the proxy layer, including spawning the required requests to multiple backends, merging, endpoint transformation and any other internals of the proxy between the request processing and the backend communication\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/", - "type": "object", - "properties": { - "disable_metrics": { - "title": "Disable metrics", - "description": "Whether you want to disable all metrics in this endpoint or not.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/", - "default": false, - "type": "boolean" - }, - "disable_traces": { - "title": "Disable traces", - "description": "Whether you want to disable all traces in this endpoint or not.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry-by-endpoint/", - "default": false, - "type": "boolean" - }, - "metrics_static_attributes": { - "title": "Static attributes", - "description": "Static attributes you want to pass for metrics.", - "type": "array", - "items": { - "properties": { - "key": { - "title": "Key", - "description": "The key of the static attribute you want to send", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The value of the static attribute you want to send", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "report_headers": { - "title": "Report headers", - "description": "Whether you want to report all headers that passed from the request to the proxy layer (`input_headers` policy in the endpoint plus KrakenD's headers).\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "traces_static_attributes": { - "title": "Static attributes", - "description": "Static attributes you want to pass for traces.", - "type": "array", - "items": { - "properties": { - "key": { - "title": "Key", - "description": "The key of the static attribute you want to send", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The value of the static attribute you want to send", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/telemetry/opentelemetry-security.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OpenTelemetry Security", - "description": "Enables the security layer needed to use OpenTelemetry through the Internet, like pushing data to a SaaS provider.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry-security/", - "type": "object", - "required": [ "otlp" ], - "properties": { - "otlp": { - "title": "OTLP exporters", - "description": "The list of OTLP exporters that require authentication. Set at least one object to push metrics and traces to an external collector using OTLP.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry-security/", - "type": "array", - "minItems": 1, - "items": { - "required": [ "name", "headers" ], - "properties": { - "headers": { - "title": "Headers", - "description": "The custom headers you will send to authenticate requests. Each key is the header name you will add to all outgoing reports.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry-security/", - "type": "object", - "properties": { - ".*": { - "title": "Header value", - "description": "The value of the header, usually an API token.", - "type": "string" - } - } - }, - "name": { - "title": "Name", - "description": "The **exact name** you used to define the exporter under `telemetry/opentelemetry`.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry-security/", - "examples": [ "newrelic", "remote_datadog" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/telemetry/opentelemetry.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "OpenTelemetry", - "description": "Enables metrics and traces using OpenTelemetry.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "object", - "required": [ "exporters" ], - "properties": { - "deploy_env": { - "title": "Deploy Environment", - "description": "The environment you are deploying, this can be useful for deployment tracking. The string can have any value that makes sense to you to identify the running environment.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "examples": [ "development", "testing", "staging", "production" ], - "default": "", - "type": "string" - }, - "exporters": { - "title": "Exporters", - "description": "The places where you will send telemetry data. You can declare multiple exporters even when they are of the same type. For instance, when you have a self-hosted Grafana and would like to migrate to its cloud version and check the double reporting during the transition. There are two families of exporters: `otlp` or `prometheus`.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "object", - "minProperties": 1, - "properties": { - "otlp": { - "title": "OTLP exporters", - "description": "The list of OTLP exporters you want to use. Set at least one object to push metrics and traces to an external collector using OTLP.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "array", - "minItems": 1, - "items": { - "required": [ "name", "host" ], - "properties": { - "custom_metric_reporting_period": { - "title": "Custom metric reporting period", - "description": "Whether you want to override the global `metric_reporting_period` attribute set for all exporters or not. Value in seconds. A missing attribute, or set to `0` means using whatever value was used in `metric_reporting_period` at the global level.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": 0, - "type": "integer" - }, - "disable_metrics": { - "title": "Disable metrics", - "description": "Disable metrics in this exporter (leaving only traces if any). It won't report any metrics when the flag is `true`.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "disable_traces": { - "title": "Disable traces", - "description": "Disable traces in this exporter (leaving only metrics if any). It won't report any metrics when the flag is `true`.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "host": { - "title": "Host", - "description": "The host where you want to push the data. It can be a sidecar or a remote collector.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - }, - "name": { - "title": "Name", - "description": "A unique name to identify this exporter.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "examples": [ "local_prometheus", "remote_grafana" ], - "type": "string" - }, - "port": { - "title": "Port", - "description": "A custom port to send the data. The port defaults to 4317 for gRPC unless you enable `use_http`, which defaults to 4318.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": 4317, - "type": "integer", - "maximum": 65535, - "minimum": 0 - }, - "use_http": { - "title": "Use HTTP", - "description": "Whether this exporter uses HTTP instead of gRPC.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "prometheus": { - "title": "Prometheus exporter", - "description": "Set here at least the settings for one Prometheus exporter. Each exporter will start a local port that offers metrics to be pulled from KrakenD.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "array", - "minItems": 1, - "items": { - "required": [ "name" ], - "properties": { - "custom_metric_reporting_period": { - "title": "Custom metric reporting period", - "description": "Whether you want to override the global `metric_reporting_period` attribute set for all exporters or not. Value in seconds. A missing attribute, or set to `0` means using whatever value was used in `metric_reporting_period` at the global level.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": 0, - "type": "integer" - }, - "disable_metrics": { - "title": "Disable metrics", - "description": "Leave this exporter declared but disabled (useful in development). It won't report any metrics when the flag is `true`.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "go_metrics": { - "title": "Go Metrics", - "description": "Whether you want fine-grained details of Go language metrics or not.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "boolean" - }, - "listen_ip": { - "title": "Listen IP", - "description": "The IP address that KrakenD listens to in IPv4 or IPv6. You can, for instance, expose the Prometheus metrics only in a private IP address. An empty string, or no declaration means listening on all interfaces. The inclusion of `::` is intended for IPv6 format only (**this is not the port**). Examples of valid addresses are `192.0.2.1` (IPv4), `2001:db8::68` (IPv6). The values `::` and `0.0.0.0` listen to all addresses, which are valid for IPv4 and IPv6 simultaneously.", - "examples": [ "172.12.1.1", "::1" ], - "default": "0.0.0.0", - "type": "string" - }, - "name": { - "title": "Name", - "description": "A unique name to identify this exporter.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "examples": [ "local_prometheus", "remote_grafana" ], - "type": "string" - }, - "port": { - "title": "Port", - "description": "The port in KrakenD where Prometheus will connect to.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": 9090, - "type": "integer", - "maximum": 65535, - "minimum": 0 - }, - "process_metrics": { - "title": "Process Metrics", - "description": "Whether this exporter shows detailed metrics about the running process like CPU or memory usage or not.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "boolean" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "histograms": { - "title": "Histograms", - "description": "Use an histogram bucket configuration different from the defaults to define the detail of histogram metrics (decrease or increase their size). You don't need to set this attribute unless you want full control of the histogram definition.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "object", - "properties": { - "size_buckets": { - "title": "Size buckets", - "description": "The size of the buckets in bytes you want to use for the histograms.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": [ - 128, - 256, - 512, - 1024, - 4096, - 8192, - 16384, - 32768, - 65536, - 262144, - 524288, - 1048576, - 4194304, - 16777216, - 67108864 - ], - "type": "array", - "items": { - "type": "number" - } - }, - "time_buckets": { - "title": "Time buckets", - "description": "The duration of buckets in seconds you want to use for the histograms.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": [ - 0.01, - 0.02, - 0.05, - 0.075, - 0.1, - 0.125, - 0.15, - 0.175, - 0.2, - 0.25, - 0.3, - 0.35, - 0.5, - 0.75, - 1.0, - 1.5, - 2.0, - 3.5, - 5.0, - 10.0 - ], - "type": "array", - "items": { - "type": "number" - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "layers": { - "title": "Layers", - "description": "A request and response flow passes through three different layers. This attribute lets you specify what data you want to export in each layer. All layers are enabled by default unless you declare this section.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "object", - "properties": { - "backend": { - "title": "Report backend activity", - "description": "Reports the activity between KrakenD and each of your backend services. This is the more granular layer.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "object", - "properties": { - "metrics": { - "type": "object", - "properties": { - "detailed_connection": { - "title": "Detailed HTTP connection metrics", - "description": "Whether you want to enable detailed metrics for the HTTP connection phase or not. Includes times to connect, DNS querying, and the TLS handshake.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "disable_stage": { - "title": "Disable this stage", - "description": "Whether to turn off the metrics or not. Setting this to `true` means stop reporting any data.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "read_payload": { - "title": "Detailed payload read", - "description": "Whether you want to enable metrics for the response reading payload or not (HTTP connection not taken into account).\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "round_trip": { - "title": "Detailed Round Trip", - "description": "Whether you want to enable metrics for the actual HTTP request for the backend or not (manipulation not taken into account). This is the time your backend needs to produce a result.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "static_attributes": { - "title": "Static attributes", - "description": "A list of tags or labels you want to associate with these metrics.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "examples": [ - [ - { - "key": "my_metric_attr", - "value": "my_metric_val" - } - ] - ], - "type": "array", - "items": { - "type": "object", - "required": [ "key", "value" ], - "properties": { - "key": { - "title": "Key", - "description": "The key, tag, or label name you want to use.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The static value you want to assign to this key.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "traces": { - "type": "object", - "properties": { - "detailed_connection": { - "title": "Detailed HTTP connection", - "description": "Whether you want to add detailed trace attributes for the HTTP connection phase or not. Includes times to connect, DNS querying, and the TLS handshake.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "disable_stage": { - "title": "Disable this stage", - "description": "Whether to turn off the traces or not. Setting this to `true` means stop reporting any data.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "read_payload": { - "title": "Detailed payload read", - "description": "Whether you want to add trace attributes for the response reading payload or not (HTTP connection not taken into account).\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "report_headers": { - "title": "Report headers", - "description": "Whether you want to report the final headers that reached the backend.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "round_trip": { - "title": "Detailed Round Trip", - "description": "Whether you want to add trace attributes for the actual HTTP request for the backend or not (manipulation not taken into account). This is the time your backend needs to produce a result.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "skip_headers": { - "title": "Skip headers", - "description": "A list of headers you want to skip when reporting the headers that reached the backend. This is useful to avoid reporting sensitive data.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "examples": [ - [ "X-Backend-Secret", "X-All-Secret" ] - ], - "type": "array", - "items": { - "type": "string" - } - }, - "static_attributes": { - "title": "Static attributes", - "description": "A list of tags or labels you want to associate to these traces.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "examples": [ - [ - { - "key": "my_trace_attr", - "value": "my_trace_val" - } - ] - ], - "type": "array", - "items": { - "type": "object", - "required": [ "key", "value" ], - "properties": { - "key": { - "title": "Key", - "description": "The key, tag, or label name you want to use.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The static value you want to assign to this key.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "global": { - "title": "Report global activity", - "description": "Reports the activity between end-users and KrakenD\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "object", - "properties": { - "disable_metrics": { - "title": "Disable global metrics", - "description": "Whether you want to disable all metrics happening in the global layer or not.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "disable_propagation": { - "title": "Disable propagation", - "description": "Whether you want to ignore previous propagation headers to KrakenD. When the flag is set to `true`, spans from a previous layer will never be linked to the KrakenD trace.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "disable_traces": { - "title": "Disable global trace", - "description": "Whether you want to disable all traces happening in the global layer or not.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "metrics_static_attributes": { - "title": "Static attributes", - "description": "Static attributes you want to pass for metrics.", - "type": "array", - "items": { - "properties": { - "key": { - "title": "Key", - "description": "The key of the static attribute you want to send", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The value of the static attribute you want to send", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "report_headers": { - "title": "Report headers", - "description": "Whether you want to send all headers that the consumer passed in the request or not.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "semantic_convention": { - "title": "Semantic convention naming", - "description": "The semantic convention naming you want to use. The default is an empty string which uses the original naming convention prior to 1.27. For the semantic convention of 1.27 and higher, use `1.27`\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "enum": [ "", "1.27" ] - }, - "traces_static_attributes": { - "title": "Static attributes", - "description": "Static attributes you want to pass for traces.", - "type": "array", - "items": { - "properties": { - "key": { - "title": "Key", - "description": "The key of the static attribute you want to send", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The value of the static attribute you want to send", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "proxy": { - "title": "Report proxy activity", - "description": "Reports the activity at the beginning of the proxy layer, including spawning the required requests to multiple backends, merging, endpoint transformation and any other internals of the proxy between the request processing and the backend communication\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "object", - "properties": { - "disable_metrics": { - "title": "Disable proxy metrics", - "description": "Whether you want to disable all metrics happening in the proxy layer or not.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "disable_traces": { - "title": "Disable proxy trace", - "description": "Whether you want to disable all traces happening in the proxy layer or not.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "metrics_static_attributes": { - "title": "Static attributes", - "description": "Static attributes you want to pass for metrics.", - "type": "array", - "items": { - "properties": { - "key": { - "title": "Key", - "description": "The key of the static attribute you want to send", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The value of the static attribute you want to send", - "type": "string" - } - }, - "additionalProperties": false - } - }, - "report_headers": { - "title": "Report headers", - "description": "Whether you want to report all headers that passed from the request to the proxy layer (`input_headers` policy in the endpoint plus KrakenD's headers).\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": false, - "type": "boolean" - }, - "traces_static_attributes": { - "title": "Static attributes", - "description": "Static attributes you want to pass for traces.", - "type": "array", - "items": { - "properties": { - "key": { - "title": "Key", - "description": "The key of the static attribute you want to send", - "type": "string" - }, - "value": { - "title": "Value", - "description": "The value of the static attribute you want to send", - "type": "string" - } - }, - "additionalProperties": false - } - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "metric_reporting_period": { - "title": "Reporting period", - "description": "How often you want to report and flush the metrics in seconds. This setting is only used by `otlp` exporters.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "default": 30, - "type": "integer" - }, - "service_name": { - "title": "Service Name", - "description": "A friendly name identifying metrics reported by this installation. When unset, it uses the `name` attribute in the root level of the configuration.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - }, - "service_version": { - "title": "Service Version", - "description": "The version you are deploying, this can be useful for deployment tracking.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "type": "string" - }, - "skip_paths": { - "title": "Skip Paths", - "description": "The paths you don't want to report. Use the literal value used in the `endpoint` definition, including any `{placeholders}`. In the `global` layer, this attribute works only on metrics, because traces are initiated before there is an endpoint to match against. If you do not want any path skipped, just add an array with an empty string `[\"\"]`.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "examples": [ "/foo/{bar}" ], - "default": [ "/__health", "/__debug/", "/__echo/", "/__stats/" ], - "type": "array", - "items": { - "type": "string" - } - }, - "trace_sample_rate": { - "title": "Trace sample rate", - "description": "The sample rate for traces defines the percentage of reported traces. This option is key to reduce the amount of data generated (and resource usage), while you still can debug and troubleshoot issues. For instance, a number of `0.25` will report a 25% of the traces seen in the system.\n\nSee: https://www.krakend.io/docs/telemetry/opentelemetry/", - "examples": [ 0.25 ], - "default": 1, - "type": "number", - "maximum": 1, - "minimum": 0 - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/timeunits.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Time units / Duration patterns", - "$defs": { - "timeunit": { - "title": "Duration", - "description": "The amount of time you want to assign followed by its unit (e.g.: `2s`, `200ms`). Valid time units are: ns, us, (or µs), ms, s, m, h.", - "type": "string", - "pattern": "^[0-9]+(ns|ms|us|µs|s|m|h)$" - } - } - }, - "https://www.krakend.io/schema/v2.13/tls.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "TLS/SSL", - "description": "Enabling TLS for HTTPS and HTTP/2.\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "anyOf": [ - { - "type": "object", - "required": [ "keys" ] - }, - { - "type": "null" - } - ], - "properties": { - "ca_certs": { - "title": "CA certificates (for mTLS)", - "description": "An array with all the CA certificates you would like to load to KrakenD **when using mTLS**, in addition to the certificates present in the system's CA. Each certificate in the list is a relative or absolute path to the PEM file. If you have a format other than PEM, you must convert the certificate to PEM using a conversion tool. See also `disable_system_ca_pool` to avoid system's CA.\n\nSee: https://www.krakend.io/docs/authorization/mutual-authentication/", - "examples": [ - [ "ca.pem" ] - ], - "default": [], - "type": "array", - "items": { - "type": "string" - } - }, - "cipher_suites": { - "title": "Cipher Suites", - "description": "The list of cipher suites as defined in the documentation.\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "default": [ 4865, 4866, 4867 ], - "type": "array", - "uniqueItems": true, - "items": { - "type": "integer" - } - }, - "curve_preferences": { - "title": "Curve identifiers", - "description": "The list of all the identifiers for the curve preferences. Use `23` for CurveP256, `24` for CurveP384 or `25` for CurveP521.\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "default": [ 23, 24, 25 ], - "type": "array", - "uniqueItems": true, - "items": { - "enum": [ 23, 24, 25 ] - } - }, - "disable_system_ca_pool": { - "title": "Disable system's CA", - "description": "Ignore any certificate in the system's CA. The only certificates loaded will be the ones in the `ca_certs` list when true.\n\nSee: https://www.krakend.io/docs/service-settings/http-server-settings/", - "default": false, - "type": "boolean" - }, - "disabled": { - "title": "Disable TLS", - "description": "A flag to disable TLS (useful while in development).\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "default": false, - "type": "boolean" - }, - "enable_mtls": { - "title": "Enable Mutual Authentication", - "description": "Whether to enable or not Mutual Authentication. When mTLS is enabled, **all KrakenD endpoints** require clients to provide a known client-side X.509 authentication certificate. KrakenD relies on the system’s CA to validate certificates.\n\nSee: https://www.krakend.io/docs/authorization/mutual-authentication/", - "default": false, - "type": "boolean" - }, - "keys": { - "description": "An array with all the key pairs you want the TLS to work with. You can support multiple and unrelated domains in a single process.", - "type": "array", - "minItems": 1, - "items": { - "properties": { - "private_key": { - "title": "Private key", - "description": "Absolute path to the private key, or relative to the current [working directory](https://www.krakend.io/docs/configuration/working-directory/).\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "examples": [ "/path/to/key.pem", "./certs/key.pem" ], - "default": "./certs/key.pem", - "type": "string" - }, - "public_key": { - "title": "Public key", - "description": "Absolute path to the public key, or relative to the current [working directory](https://www.krakend.io/docs/configuration/working-directory/).\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "examples": [ "/path/to/cert.pem", "./certs/cert.pem" ], - "default": "./certs/cert.pem", - "type": "string" - } - } - } - }, - "max_version": { - "title": "Maximum TLS version", - "description": "Maximum TLS version supported.\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "default": "TLS13", - "enum": [ "SSL3.0", "TLS10", "TLS11", "TLS12", "TLS13" ] - }, - "min_version": { - "title": "Minimum TLS version", - "description": "Minimum TLS version supported. When specifiying very old and insecure versions under TLS12 you must provide the `ciphers_list`.\n\nSee: https://www.krakend.io/docs/service-settings/tls/", - "default": "TLS13", - "enum": [ "SSL3.0", "TLS10", "TLS11", "TLS12", "TLS13" ] - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/validation/cel.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Common Expression Language (CEL) validations", - "description": "The Common Expression Language (CEL) middleware enables expression evaluation, when an expression returns false, KrakenD does not return the content as the condition has failed. Otherwise, if all expressions returned true, the content is served.\n\nSee: https://www.krakend.io/docs/endpoints/common-expression-language-cel/", - "type": "array", - "minItems": 1, - "items": { - "title": "Object in array", - "type": "object", - "required": [ "check_expr" ], - "properties": { - "check_expr": { - "title": "Check expression", - "description": "The expression that evaluates as a boolean, you can write here any conditional. If the result of the expression is `true`, the execution continues. See in the docs how to use additional variables to retrieve data from requests, responses, and tokens.\n\nSee: https://www.krakend.io/docs/endpoints/common-expression-language-cel/", - "examples": [ "int(req_params.Id) % 3 == 0" ], - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "https://www.krakend.io/schema/v2.13/validation/response-json-schema.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Response Schema Validator", - "description": "Enterprise only. The response schema validator adds a schema validation before the gateway returns the response to the end-user or before it’s merged in the endpoint with the rest of the backends.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/", - "type": "object", - "required": [ "schema" ], - "properties": { - "error": { - "title": "Error definition", - "description": "In case the validation fails, the error definition containing body and status.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/", - "examples": [ - { - "body": "We couldn't process you request, try again later.", - "status": 401 - } - ], - "type": "object", - "properties": { - "body": { - "title": "Error body", - "description": "The error message you want to show when the validation fails. Set it to an empty string `\"\"` to show the JSON-schema validation error.", - "default": "", - "type": "string" - }, - "content_type": { - "title": "Content-Type", - "description": "The Content-Type header you want to set back in the response when you are setting a custom `body`", - "examples": [ "application/json" ], - "default": "text/plain", - "type": "string" - }, - "status": { - "title": "Error code", - "description": "The HTTP status code you want to set back in the response.", - "default": 500, - "type": "integer" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "schema": { - "title": "JSON Schema", - "description": "Write your JSON schema directly in this field, with any number of fields or validations you need.\n\nSee: https://www.krakend.io/docs/enterprise/endpoints/response-schema-validator/", - "type": "object" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/websocket.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Schema definition for Websockets", - "description": "Enterprise only. Enables websocket communication.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "type": "object", - "properties": { - "backoff_strategy": { - "title": "Backoff strategy", - "description": "When the connection to your event source gets interrupted for whatever reason, KrakenD keeps trying to reconnect until it succeeds or until it reaches the max_retries. The backoff strategy defines the delay in seconds in between consecutive failed retries. Defaults to 'fallback'\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": "fallback", - "enum": [ - "linear", - "linear-jitter", - "exponential", - "exponential-jitter", - "fallback" - ] - }, - "connect_event": { - "title": "Notify connections", - "description": "Whether to send notification events to the backend or not when a user establishes a new Websockets connection.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": false, - "type": "boolean" - }, - "disable_otel_metrics": { - "title": "Disable OpenTelemetry metrics", - "description": "Disables the OpenTelemetry metrics for the websocket connections.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": false, - "type": "boolean" - }, - "disconnect_event": { - "title": "Notify disconnections", - "description": "Whether to send notification events to the backend or not when users disconnect from their Websockets connection.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": false, - "type": "boolean" - }, - "enable_direct_communication": { - "title": "Direct Communication (no multiplexing)", - "description": "When the value is set to `true` the communication is set one to one, and disables multiplexing. One client to KrakenD opens one connection to the backend. This mode of operation is sub-optimal in comparison to multiplexing.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": false, - "type": "boolean" - }, - "input_headers": { - "title": "Allowed Headers In", - "description": "Defines which input headers are allowed to pass to the backend. You don't need to declare the `input_headers` at the endpoint. Use `*` to pass all headers (not recommended, use explicit values instead). There are a few headers that won't be propagated regardless of your configuration, which are: `Upgrade`, `Connection`, `Sec-Websocket-Extensions`, `Sec-Websocket-Version`, and `Sec-Websocket-Key`.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "examples": [ "Authorization", "User-Agent", "Accept", "*" ], - "default": [], - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "max_message_size": { - "title": "Maximum message size", - "description": "Sets the maximum size of messages **in bytes** sent by or returned to the client. Messages larger than this value are discarded by KrakenD and the client disconnected.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": 512, - "type": "integer" - }, - "max_retries": { - "title": "Max retries", - "description": "The maximum number of times you will allow KrakenD to retry reconnecting to a broken websockets server. When the maximum retries are reached, the gateway gives up the connection for good. Minimum value is `1` retry, or use `<= 0` for unlimited retries.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": 0, - "type": "integer" - }, - "message_buffer_size": { - "title": "Message buffer size", - "description": "Sets the maximum number of messages **each end-user** can have in the buffer waiting to be processed. As this is a per-end-user setting, you must forecast how many consumers of KrakenD websockets you will have. The default value may be too high (memory consumption) if you expect thousands of clients consuming simultaneously.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": 256, - "type": "integer" - }, - "ping_period": { - "title": "Ping frequency", - "description": "Sets the time between pings checking the health of the system.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": "54s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit" - }, - "pong_wait": { - "title": "Pong timeout", - "description": "Sets the maximum time KrakenD will until the pong times out.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": "60s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit" - }, - "read_buffer_size": { - "title": "Read buffer size", - "description": "Connections buffer network input and output to reduce the number of system calls when reading messages. You can set the maximum buffer size for reading in bytes.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": 1024, - "type": "integer" - }, - "return_error_details": { - "title": "Return error details", - "description": "Provides an error `{'error':'reason here'}` to the client when KrakenD was unable to send the message to the backend.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": false, - "type": "boolean" - }, - "subprotocols": { - "title": "Subprotocols", - "description": "The list of subprotocols that the client can use to connect to the websocket.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "examples": [ - [ "streamlit" ] - ], - "default": [], - "type": "array", - "uniqueItems": true, - "items": { - "type": "string" - } - }, - "timeout": { - "title": "Timeout", - "description": "Sets the read timeout for the backend. After a read has timed out, the websocket connection is terminated and KrakenD will try to reconnect according the `backoff_strategy`. Minimum accepted time is one minute. This flag only applies when you use ' enable_direct_communication`.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": "5m", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit" - }, - "write_buffer_size": { - "title": "Write buffer size", - "description": "Connections buffer network input and output to reduce the number of system calls when writing messages. You can set the maximum buffer size for writing in bytes.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": 1024, - "type": "integer" - }, - "write_wait": { - "title": "Write timeout", - "description": "Sets the maximum time KrakenD will wait until the write times out.\n\nSee: https://www.krakend.io/docs/enterprise/websockets/", - "default": "10s", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/workflow.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Workflow Object", - "type": "object", - "required": [ "endpoint", "backend" ], - "properties": { - "backend": { - "title": "Backend", - "description": "List of all the [backend objects](https://www.krakend.io/docs/backends/) called within this workflow. Each backend can initiate another workflow if needed.", - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1backend.json", - "type": "object" - } - }, - "concurrent_calls": { - "title": "Concurrent calls", - "description": "The concurrent requests are an excellent technique to improve the response times and decrease error rates by requesting in parallel the same information multiple times. Yes, you make the same request to several backends instead of asking to just one. When the first backend returns the information, the remaining requests are canceled.\n\nSee: https://www.krakend.io/docs/endpoints/concurrent-requests/", - "default": 1, - "type": "integer", - "maximum": 5, - "minimum": 1 - }, - "endpoint": { - "title": "Workflow endpoint name", - "description": "An endpoint name for the workflow that will be used in logs. The name will be appended to the string `/__workflow/` in the logs, and although it does not receive traffic under this route, it is necessary when you want to pass URL `{params}` to the nested backends.\n\nSee: https://www.krakend.io/docs/endpoints/", - "examples": [ "/workflow-1/{param1}" ], - "type": "string" - }, - "extra_config": { - "title": "Extra configuration", - "description": "Configuration entries for additional components that are executed within this endpoint, during the request, response or merge operations.", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1workflow_extra_config.json", - "type": "object" - }, - "ignore_errors": { - "title": "Ignore errors", - "description": "Allow the workflow to continue with the rest of declared actions when there are errors (like security policies, network errors, etc). The default behavior of KrakenD is to abort an execution that has errors as soon as possible. If you use conditional backends and similar approaches, you might want to allow the gateway to go through all steps.\n\nSee: https://www.krakend.io/docs/endpoints/", - "default": false - }, - "output_encoding": { - "title": "Output encoding", - "description": "The gateway can work with several content types, even allowing your clients to choose how to consume the content. See the [supported encodings](https://www.krakend.io/docs/endpoints/content-types/)", - "default": "json", - "enum": [ - "json", - "json-collection", - "yaml", - "fast-json", - "xml", - "negotiate", - "string", - "no-op" - ] - }, - "timeout": { - "title": "Timeout", - "description": "The duration you write in the timeout represents the **whole duration of the pipe**, so it counts the time all your backends take to respond and the processing of all the components involved in the endpoint (the request, fetching data, manipulation, etc.). By default the timeout is taken from the parent endpoint, if redefined **make sure that is smaller than the endpoint's**", - "examples": [ "2s", "1500ms" ], - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1timeunits.json/$defs/timeunit", - "type": "string" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "https://www.krakend.io/schema/v2.13/workflow_extra_config.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "title": "Schema definition for extra_config of workflows", - "type": "object", - "properties": { - "modifier/jmespath": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1jmespath.json" - }, - "modifier/lua-proxy": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1lua.json" - }, - "modifier/request-body-generator": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1body-generator.json" - }, - "modifier/response-body-generator": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1modifier~1body-generator.json" - }, - "plugin/req-resp-modifier": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1plugin~1req-resp-modifier.json" - }, - "proxy": { - "title": "Proxy", - "type": "object", - "properties": { - "combiner": { - "title": "Custom combiner", - "description": "For custom builds of KrakenD only", - "examples": [ "combiner_name" ], - "type": "string" - }, - "flatmap_filter": { - "title": "Flatmap (Array manipulation)", - "description": "The list of operations to **execute sequentially** (top down). Every operation is defined with an object containing two properties:\n\nSee: https://www.krakend.io/docs/backends/flatmap/", - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1proxy~1flatmap.json", - "type": "array" - }, - "sequential": { - "title": "Sequential proxy", - "description": "The sequential proxy allows you to chain backend requests, making calls dependent one of each other.\n\nSee: https://www.krakend.io/docs/endpoints/sequential-proxy/", - "default": true, - "type": "boolean" - }, - "sequential_propagated_params": { - "title": "Sequential propagated parameters", - "description": "The list of parameters you want to propagate from a previous response to the next request. Parameters are accessible by Lua scripts, CEL, security policies, the body generator, or plugins. When you add a `resp`-like parameter in this list, the parameter becomes available to the components mentioned in subsequent calls, **uppercasing the first letter**. For instance, if you add `resp0_user`, you can access in the second, third, etc. backends in Lua to `req:params('Resp0_user')`.The format of the parameters must start with `respX_` or `respX`, where `X` is the backend index from which you want to take the parameter. If you don't set the underscore `_`, you set the whole payload as a parameter. For instance, `resp0` sets a parameter `Resp0` to use in Lua or a Body generator and contains **the entire payload of the backend 0** (as a string). In this extreme case, you must use `no-op` in the backend's output (even the endpoint has a `json` output encoding) and you should access the value in Lua or a plugin. Note that access to **nested parameters** uses a single string with the dot notation inside, e.g.: `req_params['Resp0_f1.f2.f3']` (CEL and Security Policies), or `{{ index .req_params \"Resp0_f1.f2.f3\" }}` (body generators).\n\nSee: https://www.krakend.io/docs/endpoints/sequential-proxy/", - "examples": [ - [ "resp0" ], - [ "resp1_my_field", "resp0_user_id" ] - ], - "type": "array", - "items": { - "title": "Propagated parameter name", - "description": "A `resp`-like string that references the field you want to set a parameter and use it in the next backend call.", - "type": "string", - "pattern": "^resp[0-9]+(_[^\\s]+)?$" - } - }, - "static": { - "title": "Static response", - "description": "The static proxy injects static data in the final response when the selected strategy matches.\n\nSee: https://www.krakend.io/docs/endpoints/static-proxy/", - "type": "object", - "required": [ "data", "strategy" ], - "properties": { - "data": { - "title": "Data", - "description": "The static data (as a JSON object) that you will return.\n\nSee: https://www.krakend.io/docs/endpoints/static-proxy/", - "type": "object" - }, - "strategy": { - "title": "Strategy", - "description": "One of the supported strategies\n\nSee: https://www.krakend.io/docs/endpoints/static-proxy/", - "enum": [ - "always", - "success", - "complete", - "errored", - "incomplete" - ] - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - }, - "security/policies": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1security~1policies.json" - }, - "validation/cel": { - "$ref": "#/$defs/https%3A~1~1www.krakend.io~1schema~1v2.13~1validation~1cel.json" - }, - "validation/json-schema": { - "title": "Validating the body with the JSON Schema", - "description": "apply automatic validations using the JSON Schema vocabulary before the content passes to the backends. The json schema component allows you to define validation rules on the body, type definition, or even validate the fields' values.\n\nSee: https://www.krakend.io/docs/endpoints/json-schema/", - "type": "object" - } - }, - "patternProperties": { - "^[@$_#]": {} - }, - "additionalProperties": false - } - }, - "definitions": {} -} diff --git a/benchmark/files/2019_09_omc_json_v2.json b/benchmark/files/2019_09_omc_json_v2.json deleted file mode 100644 index 0e38da56b..000000000 --- a/benchmark/files/2019_09_omc_json_v2.json +++ /dev/null @@ -1,4484 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://movielabs.com/omc/json/schema/v2.0", - "title": "OMC-JSON schema v2.0", - "oneOf": [ - {"$ref": "#/$defs/core/properties/rootObject"}, - {"$ref": "#/$defs/core/properties/rootArray"} - ], - "$defs": { - "Asset": { - "type": "object", - "title": "Asset Definitions", - "properties": { - "Asset": { - "type": ["object"], - "title": "Asset", - "description": "A physical or digital object or collection of objects specific to the creation of the Creative Work.", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Asset" - }, - "identifier": { - "title": "Identifier", - "$ref": "#/$defs/Utility/properties/identifier" - }, - "name": { - "type": [ - "string", - "null" - ], - "title": "Asset name", - "description": "A human readable name for the asset" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Asset description", - "description": "A human readable description of the asset" - }, - "version": { - "type": "object", - "title": "Asset Version Information", - "description": "A particular form, variant, or representation of an Asset that differs in some way from its source Asset.", - "additionalProperties": false, - "properties": { - "versionNumber": {"$ref": "#/$defs/Utility/properties/versionNumber"}, - "name": { - "type": "string", - "title": "A name for this specific version of the Asset" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Asset description", - "description": "A human readable description of the version" - }, - "annotation": { - "type": "array", - "items": {"$ref": "#/$defs/Utility/properties/note"}, - "description": "A collection of notes specific to this version" - }, - "DerivationOf": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/Asset"} - ] - }, - "RevisionOf": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/Asset"} - ] - }, - "VariantOf": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/Asset"} - ] - }, - "Alternative": { - "type": "array", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/Asset"} - ] - } - }, - "Derivation": { - "type": "array", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/Asset"} - ] - } - }, - "Revision": { - "type": "array", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/Asset"} - ] - } - }, - "Variant": { - "type": "array", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/Asset"} - ] - } - }, - "customData": {"$ref": "#/$defs/core/properties/customData"} - } - }, - "provenance": { - "$ref": "#/$defs/Utility/properties/provenance", - "title": "Provenance" - }, - "Asset": { - "type": [ - "array", - "null" - ], - "title": "Asset Group", - "description": "The set of Assets that make up an an asset group and has a structuralType of 'assetGroup'", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/Asset"} - ] - } - }, - "AssetSC": { - "title": "Structural Characteristics", - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/AssetSC"} - ] - }, - "assetFC": { - "title": "Asset Functional Characteristics", - "$ref": "#/$defs/Asset/properties/assetFC" - }, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "Depiction": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Depiction"} - ] - } - }, - "customData": { - "title": "Custom Data", - "$ref": "#/$defs/core/properties/customData" - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ] - }, - "AssetSC": { - "type": "object", - "title": "Asset Structural Characteristics", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "AssetSC" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "version": { - "type": "object", - "properties": { - "versionNumber": {"$ref": "#/$defs/Utility/properties/versionNumber"}, - "name": { - "type": "string", - "title": "A name for this specific version of the Asset" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Asset description", - "description": "A human readable description of the version" - }, - "annotation": { - "type": "array", - "items": {"$ref": "#/$defs/Utility/properties/note"}, - "description": "A collection of notes specific to this version" - }, - "DerivationOf": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/AssetSC"} - ] - }, - "RepresentationOf": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/AssetSC"} - ] - }, - "RevisionOf": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/AssetSC"} - ] - }, - "Deriviation": { - "type": "array", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/AssetSC"} - ] - } - }, - "Representation": { - "type": "array", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/AssetSC"} - ] - } - }, - "Revision": { - "type": "array", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/AssetSC"} - ] - } - }, - "customData": {"$ref": "#/$defs/core/properties/customData"} - }, - "additionalProperties": false, - "title": "Asset Structural Version Information", - "description": "A particular form, variant, or representation of an Asset that differs in some way from its source Asset." - }, - "provenance": { - "$ref": "#/$defs/Utility/properties/provenance", - "title": "Provenance" - }, - "name": { - "type": [ - "string", - "null" - ], - "title": "Participant name", - "description": "A human readable name for the participant, primarily for use as a label" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Description", - "description": "A brief description of the participant" - }, - "structuralType": { - "type": [ - "string", - "null" - ], - "title": "Structural Type", - "description": "A structured description of the the assets form", - "examples": [ - "assetGroup", - "digital.image", - "analog.movingImage" - ] - }, - "structuralProperties": { - "type": [ - "object", - "null" - ], - "title": "Structural Properties", - "description": "A set of properties that describe the asset in this form", - "properties": { - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "linkset": {"$ref": "#/$defs/Asset/properties/AssetSC/$defs/linkset"}, - "fileDetails": {"$ref": "#/$defs/Asset/properties/AssetSC/$defs/fileDetails"}, - "dimensions": {"$ref": "#/$defs/Asset/properties/AssetSC/$defs/dimensions"}, - "assetGroup": {"$ref": "#/$defs/Asset/properties/AssetSC/$defs/assetGroup"} - }, - "additionalProperties": false - }, - "isAnalog": { - "type": [ - "boolean", - "null" - ], - "title": "Is Analog", - "description": "True if the Asset is an Analog Asset." - }, - "Carrier": { - "title": "Carrier", - "description": "For describing the physical storage device on which the digital assence is stored", - "oneOf": [ - {"type": "null"}, - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Infrastructure/properties/Infrastructure"} - ] - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "Describes the form of an Asset along with the attributes specific to that asset’s form", - "$defs": { - "linkset": { - "type": "object", - "properties": { - "recordType": { - "type": [ - "string", - "null" - ] - }, - "mediaType": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false, - "title": "Linkset", - "description": "When used with resolution system returning a linkset additional information can help disambiguate multiple linksets in the response." - }, - "fileDetails": { - "type": "object", - "properties": { - "fileName": { - "type": [ - "string", - "null" - ] - }, - "filePath": { - "type": [ - "string", - "null" - ] - }, - "fileExtension": { - "type": [ - "string", - "null" - ] - }, - "mediaType": { - "type": [ - "string", - "null" - ] - } - }, - "additionalProperties": false, - "title": "File Details", - "description": "Where opaque identifiers are used it can be useful to express naming for use in traditional file systems" - }, - "dimensions": {"$ref": "#/$defs/Utility/properties/unitOfMeasurement/properties/dimensions"}, - "assetGroup": { - "type": "object", - "properties": { - "isOrdered": { - "type": [ - "boolean", - "null" - ] - } - }, - "additionalProperties": false, - "title": "Asset Group", - "description": "Structural properties of an Asset Group" - } - } - }, - "assetFC": { - "oneOf": [ - { - "type": "null", - "description": "Allow for null" - }, - { - "$ref": "#/$defs/Asset/properties/assetFC/$defs/empty", - "title": "Allow for empty object, no functional characteristics" - }, - { - "$ref": "#/$defs/Asset/properties/assetFC/$defs/generic", - "title": "A generic schema allowing any functional type and properties" - }, - { - "$ref": "#/$defs/Asset/properties/assetFC/$defs/scd", - "title": "Functional characteristics for a Sequence Chronology Descriptor" - } - ], - "title": "Asset Functional Characteristics", - "description": "Describes the use or purpose of an Asset within the production process", - "$defs": { - "empty": { - "type": "object", - "additionalProperties": false, - "properties": { - "customData": {"$ref": "#/$defs/core/properties/customData"} - } - }, - "generic": { - "type": "object", - "additionalProperties": false, - "properties": { - "functionalType": { - "type": "string", - "not": { - "enum": ["scd"] - } - }, - "functionalProperties": { - "type": [ - "object", - "null" - ], - "additionalProperties": true - }, - "customData": {"$ref": "#/$defs/core/properties/customData"} - }, - "required": ["functionalType"] - }, - "scd": { - "type": "object", - "properties": { - "functionalType": { - "type": "string", - "const": "scd" - }, - "functionalProperties": { - "type": "object", - "properties": { - "component": { - "type": "array", - "items": { - "type": "object", - "properties": { - "sourceStart": { - "type": [ - "string", - "null" - ] - }, - "sourceEnd": { - "type": [ - "string", - "null" - ] - }, - "recordStart": { - "type": [ - "string", - "null" - ] - }, - "recordEnd": { - "type": [ - "string", - "null" - ] - }, - "duration": { - "type": [ - "string", - "null" - ] - }, - "Shot": { - "type": "object", - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/Asset"} - ] - } - } - } - } - }, - "additionalProperties": false - }, - "customData": {"$ref": "#/$defs/core/properties/customData"} - }, - "additionalProperties": false, - "required": ["functionalType"] - } - } - } - }, - "additionalProperties": false - }, - "Infrastructure": { - "type": "object", - "properties": { - "Infrastructure": { - "type": "object", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Infrastructure" - }, - "identifier": { - "title": "Identifier", - "$ref": "#/$defs/Utility/properties/identifier" - }, - "name": { - "type": [ - "string", - "null" - ], - "title": "Asset name", - "description": "A human readable name for the asset" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Asset description", - "description": "A human readable description of the asset" - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "InfrastructureSC": { - "title": "Structural Characteristics", - "$ref": "#/$defs/Infrastructure/properties/InfrastructureSC" - }, - "infrastructureFC": { - "title": "Functional Characteristics", - "$ref": "#/$defs/Infrastructure/properties/infrastructureFC" - }, - "Context": { - "title": "Asset Context", - "$ref": "#/$defs/MediaCreationContext/properties/Context" - } - }, - "additionalProperties": true, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "title": "Infrastructure", - "description": "The underlying systems and framework required for the production of the Creative Work; it is generally not specific to a particular Creative Work." - }, - "InfrastructureSC": { - "type": "object", - "title": "Infrastructure Structural Characteristics", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "InfrastructureSC" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "structuralType": { - "type": [ - "string", - "null" - ], - "title": "Structural Type", - "description": "A structured description of the the assets form", - "examples": [ - "assetGroup", - "digital.image", - "analog.movingImage" - ] - }, - "structuralProperties": { - "type": [ - "object", - "null" - ], - "title": "Structural Properties", - "description": "A set of properties that describe the infrastructure in this form", - "properties": { - "customData": {"$ref": "#/$defs/core/properties/customData"} - }, - "additionalProperties": true - }, - "customData": {"$ref": "#/$defs/core/properties/customData"} - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "Describes the form of the Infrastructure along with the attributes specific to that infrastructure's form" - }, - "infrastructureFC": { - "type": "object", - "title": "Infrastructure Functional Characteristics", - "properties": { - "functionalType": { - "type": [ - "string", - "null" - ], - "title": "Functional Type", - "description": "The use or purpose of a Task within the production process." - }, - "functionalProperties": { - "type": [ - "object", - "null" - ], - "title": "Functional Properties", - "description": "A set of properties that describe the tasks functional use", - "properties": { - "customData": {"$ref": "#/$defs/core/properties/customData"} - }, - "additionalProperties": true - }, - "customData": {"$ref": "#/$defs/core/properties/customData"} - }, - "additionalProperties": true, - "description": "Describes the use or purpose of an Infrastructure within the production process" - } - }, - "title": "Infrastructure Definitions", - "additionalProperties": false - }, - "MediaCreationContext": { - "type": "object", - "properties": { - "Character": { - "type": "object", - "title": "Character", - "description": "A sentient entity (usually a person but not always) in the script whose specific identity is consequential to the narrative. A Character is generally identified by a specific name.", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Character" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Asset name", - "description": "The primary name used for the character" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Character Description", - "description": "A brief description of the character" - }, - "characterName": { - "title": "Character Name", - "$ref": "#/$defs/Utility/properties/completeName" - }, - "profile": { - "type": "object", - "title": "Profile", - "properties": { - "physicalCharacteristics": { - "type": "object", - "title": "Physical Characteristics", - "description": "Allows for the the description of certain physical characteristics on a character, things that might be useful to an art department, wardrobe or casting for example.", - "properties": { - "species": { - "type": "string", - "title": "Species", - "description": "A species to which this character belongs", - "examples": [ - "Human", - "Borg", - "Goblin", - "Frog" - ] - }, - "hairColor": { - "type": "string", - "title": "Hair Color", - "description": "The hair color of the character", - "examples": [ - "Brown", - "Pink", - "Blonde", - "" - ] - }, - "hairLength": { - "type": "string", - "title": "Hair Length", - "description": "The length of hair of the character" - }, - "eyeColor": { - "type": "string", - "title": "Eye Color", - "description": "The color of the characters eyes" - }, - "weight": { - "title": "weight", - "$ref": "#/$defs/Utility/properties/unitOfMeasurement/properties/weight" - }, - "height": { - "title": "height", - "$ref": "#/$defs/Utility/properties/unitOfMeasurement/properties/linearDistance" - } - }, - "additionalProperties": true - }, - "gender": {"$ref": "#/$defs/Utility/properties/gender"}, - "background": { - "type": "object", - "title": "background", - "additionalProperties": true - } - }, - "additionalProperties": false - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "Depiction": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Depiction"} - ] - } - }, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ] - }, - "Context": { - "type": "object", - "title": "Context", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Context" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Context name", - "description": "A human readable name for the Context" - }, - "description": { - "type": "object", - "title": "Description", - "description": "A brief description of the context" - }, - "contextType": { - "type": [ - "string", - "null" - ], - "title": "Context Type", - "description": "A classifiaction of the type of context represented", - "examples": [ - "narrative", - "production" - ] - }, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/Context" - } - ] - } - }, - "For": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/Asset"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Character"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"}, - {"$ref": "#/$defs/MediaCreationContext/properties/CreativeWork"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Depiction"}, - {"$ref": "#/$defs/Participant/properties/Participant"}, - {"$ref": "#/$defs/MediaCreationContext/properties/SpecialAction"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeAudio"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Effect"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeLocation"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeObject"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeScene"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeStyling"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeWardrobe"}, - {"$ref": "#/$defs/MediaCreationContext/properties/ProductionLocation"}, - {"$ref": "#/$defs/MediaCreationContext/properties/ProductionScene"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Sequence"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Slate"} - ] - }, - "title": "Context For", - "description": "The entities for which this Context applies to" - }, - "customData": { - "title": "Custom Data", - "$ref": "#/$defs/core/properties/customData" - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - }, - "contributor": { - "type": [ - "object", - "null" - ], - "properties": { - "Participant": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/Participant/properties/Participant" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - } - } - }, - "contributesTo": { - "type": [ - "object", - "null" - ], - "properties": { - "CreativeWork": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/CreativeWork" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - } - } - }, - "features": { - "type": [ - "object", - "null" - ], - "properties": { - "Character": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/Character"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "SpecialAction": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/SpecialAction"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "NarrativeAudio": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeAudio"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "Effect": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/Effect"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "NarrativeLocation": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeLocation"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "NarrativeObject": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeObject"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "NarrativeStyling": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeStyling"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "NarrativeWardrobe": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeWardrobe"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - } - } - }, - "featuresIn": { - "type": [ - "object", - "null" - ], - "properties": { - "NarrativeScene": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/NarrativeScene" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - } - } - }, - "for": { - "type": [ - "object", - "null" - ], - "properties": { - "Asset": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/Asset/properties/Asset"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "CreativeWork": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/CreativeWork"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "NarrativeScene": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeScene"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "ProductionScene": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/ProductionScene"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "Sequence": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/Sequence"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "Slate": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/Slate"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - } - } - }, - "has": { - "type": [ - "object", - "null" - ], - "properties": { - "Asset": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/Asset/properties/Asset"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "Infrastructure": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "$ref": "#/$defs/Infrastructure/properties/Infrastructure", - "type": "object" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "SpecialAction": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/SpecialAction"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "NarrativeLocation": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeLocation"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "NarrativeScene": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeScene"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "Participant": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "$ref": "#/$defs/Participant/properties/Participant", - "type": "object" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "ProductionScene": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/ProductionScene"}, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "Sequence": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "$ref": "#/$defs/MediaCreationContext/properties/Sequence", - "type": "object" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "Slate": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "$ref": "#/$defs/MediaCreationContext/properties/Slate", - "type": "object" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - } - } - }, - "neededBy": { - "type": [ - "object", - "null" - ], - "properties": { - "Character": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/Character" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - } - } - }, - "needs": { - "type": [ - "object", - "null" - ], - "properties": { - "NarrativeAudio": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/NarrativeAudio" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "SpecialAction": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/SpecialAction" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "Effect": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/Effect" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "NarrativeObject": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/NarrativeObject" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "NarrativeStyling": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/NarrativeStyling" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "NarrativeWardrobe": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/NarrativeWardrobe" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - } - } - }, - "releated": { - "type": [ - "object", - "null" - ], - "properties": { - "ProductionScene": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/ProductionScene" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - } - } - }, - "represents": { - "type": [ - "object", - "null" - ], - "properties": { - "NarrativeScene": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/NarrativeScene" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - } - } - }, - "representedBy": { - "type": [ - "object", - "null" - ], - "properties": { - "ProductionScene": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/ProductionScene" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - } - } - }, - "usedIn": { - "type": [ - "object", - "null" - ], - "properties": { - "Depiction": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/Depiction" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "ProductionLocation": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/ProductionLocation" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "ProductionScene": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/ProductionScene" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - } - } - }, - "uses": { - "type": [ - "object", - "null" - ], - "properties": { - "Asset": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/Asset/properties/Asset" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "Depiction": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/Depiction" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "Infrastructure": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/Infrastructure/properties/Infrastructure" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - }, - "ProductionLocation": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - { - "type": "object", - "$ref": "#/$defs/MediaCreationContext/properties/ProductionLocation" - }, - {"$ref": "#/$defs/core/properties/reference"} - ] - } - } - } - } - }, - "additionalProperties": true, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "Informs scope within the construction process of a Creative Work." - }, - "CreativeWork": { - "type": "object", - "title": "Creative Work", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "CreativeWork" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "title": { - "type": "object", - "title": "Creative Work Title", - "properties": { - "workingTitle": { - "type": [ - "string", - "null" - ], - "title": "Creative Work Working Title", - "description": "The working title of the work" - }, - "officialTitle": { - "type": [ - "string", - "null" - ], - "title": "Creative Work Official Title", - "description": "The official title of the work" - }, - "internalTitle": { - "type": [ - "string", - "null" - ], - "title": "Creative Work Internal Title", - "description": "The internal title of the work" - } - }, - "additionalProperties": true - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Creative Work Description", - "description": "A brief description of the creative work" - }, - "approximateLength": { - "title": "Approximate Length", - "$ref": "#/$defs/Utility/properties/time/properties/periodInTime/properties/durationTime" - }, - "originalLanguage": { - "type": [ - "array", - "null" - ], - "title": "Original Languages", - "items": {"$ref": "#/$defs/Utility/properties/language"} - }, - "countryOfOrigin": { - "type": [ - "array", - "null" - ], - "title": "Country Of Origin", - "items": {"$ref": "#/$defs/Utility/properties/country"} - }, - "customData": { - "title": "Custom Data", - "$ref": "#/$defs/core/properties/customData" - }, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "A uniquely identified production." - }, - "Depiction": { - "type": "object", - "title": "Depiction", - "properties": { - "schemaVersion": {"$ref": "#/$defs/core/properties/schemaVersion"}, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Depiction" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Depiction Styling Name", - "description": "A human readable name for the styling" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Depiction Description", - "description": "A brief description of the depiction or portrayal" - }, - "depictionType": { - "type": "string", - "title": "Object type", - "description": "A categorization of the type of depiction", - "enum": [ - "depiction", - "portrayal" - ] - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "Depicts": { - "type": "object", - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Character"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeLocation"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeObject"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeStyling"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeWardrobe"} - ] - }, - "Depictor": { - "type": "object", - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/Asset"}, - {"$ref": "#/$defs/Participant/properties/Participant"} - ] - }, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "The representation of something from a narrative entity by a production entity in the Creative Work, specified or implied by the Script." - }, - "Effect": { - "type": "object", - "title": "Effect", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Effect" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Narrative Effect Name", - "description": "A human readable name for the effect" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Narrative Object Description", - "description": "A brief description of the narrative effect" - }, - "effectType": { - "type": "string", - "title": "Object type", - "description": "A categorization of the type of effect.", - "enum": [ - "effect", - "specialEffect", - "visualEffect" - ] - }, - "customData": { - "title": "Custom Data", - "$ref": "#/$defs/core/properties/customData" - }, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "An on screen visual effect considered essential to the narrative." - }, - "NarrativeAudio": { - "type": "object", - "title": "Narrative Audio", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "NarrativeAudio" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Narrative Object Name", - "description": "A human readable name for the audio clip" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Narrative Audio Description", - "description": "A brief description of the narrative audio" - }, - "narrativeType": { - "type": "string", - "title": "Object type", - "description": "A categorization of the type of audio.", - "enum": [ - "audio", - "soundEffect", - "music" - ] - }, - "Depiction": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Depiction"} - ] - } - }, - "customData": { - "title": "Custom Data", - "$ref": "#/$defs/core/properties/customData" - }, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "A named piece of audio significant to the narrative." - }, - "NarrativeLocation": { - "type": "object", - "title": "Narrative Location", - "properties": { - "schemaVersion": {"$ref": "#/$defs/core/properties/schemaVersion"}, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "NarrativeLocation" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Narrative Location Name", - "description": "A human readable name for the location" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Narrative Location Description", - "description": "A brief description of the narrative location" - }, - "Location": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Utility/properties/Location"} - ] - }, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "Depiction": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Depiction"} - ] - } - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "A location specified or implied by the narrative." - }, - "NarrativeObject": { - "type": "object", - "title": "Narrative Object", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "NarrativeObject" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Narrative Object Name", - "description": "A human readable name for the object" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Narrative Object Description", - "description": "A brief description of the narrative object" - }, - "narrativeType": { - "type": "string", - "title": "Object type", - "description": "A departmental categorization for the object.", - "enum": [ - "narrativeObject", - "narrativeProp", - "narrativeGreenery", - "narrativeVehicle", - "narrativeSetDressing" - ] - }, - "customData": { - "title": "Custom Data", - "$ref": "#/$defs/core/properties/customData" - }, - "size": { - "type": [ - "string", - "null" - ], - "title": "Size" - }, - "quantity": { - "type": [ - "string", - "number" - ], - "title": "Quantity" - }, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "Depiction": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Depiction"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "A named object related to or interacting with characters that is implied or understood to be necessary for the narrative. Includes items like props, wardrobe, set dressing and vehicles." - }, - "NarrativeScene": { - "type": "object", - "title": "Narrative Scene", - "properties": { - "schemaVersion": {"$ref": "#/$defs/core/properties/schemaVersion"}, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "NarrativeScene" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": "string", - "title": "Scene Name", - "description": "A human readable name for the scene" - }, - "sceneName": { - "type": "object", - "title": "Narrative Scene Name", - "description": "A human readable name for the scene", - "properties": { - "fullName": { - "type": [ - "string", - "null" - ], - "title": "Scene full name", - "description": "A full descriptive name for the scene" - }, - "altName": { - "type": [ - "string", - "null" - ], - "title": "Scene alternate name", - "description": "An alternate, often shorter, name used in applications to identify the scenes" - } - }, - "additionalProperties": true - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Narrative Scene Description", - "description": "A brief description of the narrative scene" - }, - "sceneNumber": { - "type": [ - "string", - "null" - ], - "title": "Scene Number", - "description": "A number used in the script to refer to the scene" - }, - "slugline": { - "type": "array", - "title": "Slugline", - "items": { - "type": "object", - "title": "Slugline", - "description": "An arbitrary note or comment pertaining to the entity", - "properties": { - "title": { - "type": [ - "string", - "null" - ], - "title": "Title", - "description": "A title for the note or annotation" - }, - "text": { - "type": [ - "string", - "null" - ], - "title": "Text", - "description": "The text of the note or annotation" - } - }, - "additionalProperties": false - } - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "Taken from the narrative itself and traditionally defined by creative intent and typically a unity of time, place, action, or theme." - }, - "NarrativeStyling": { - "type": "object", - "title": "Narrative Styling", - "properties": { - "schemaVersion": {"$ref": "#/$defs/core/properties/schemaVersion"}, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "NarrativeStyling" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Narrative Styling Name", - "description": "A human readable name for the styling" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Narrative Styling Description", - "description": "A brief description of the narrative styling" - }, - "narrativeType": { - "type": "string", - "title": "Object type", - "description": "A categorization of the type styling.", - "enum": [ - "narrativeStyling", - "narrativeHair", - "narrativeMakeup", - "narrativeProsthetics" - ] - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "Depiction": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Depiction"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "Styling required to prepare an actor for their role" - }, - "NarrativeWardrobe": { - "type": "object", - "title": "Narrative Wardrobe", - "properties": { - "schemaVersion": {"$ref": "#/$defs/core/properties/schemaVersion"}, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "NarrativeWardrobe" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Narrative Styling Name", - "description": "A human readable name for the styling" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Narrative Wardrobe Description", - "description": "A brief description of the narrative wardrobe" - }, - "narrativeType": { - "type": "string", - "title": "Object type", - "description": "A categorization of the type wardrobe", - "enum": ["narrativeWardrobe"] - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "Depiction": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Depiction"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "The clothing for a Character in the narrative." - }, - "ProductionLocation": { - "type": "object", - "title": "Production Location", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "ProductionLocation" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Production Location Name", - "description": "A human readable name for the location" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Production Location Description", - "description": "A brief description of the production location" - }, - "locationType": { - "type": "string", - "description": "Describes whether this is production location or more specifically a shooting location", - "enum": [ - "production", - "shooting" - ], - "default": "production" - }, - "Location": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Utility/properties/Location"} - ] - }, - "customData": { - "title": "Custom Data", - "$ref": "#/$defs/core/properties/customData" - }, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "A real place that is used to depict the Narrative Location or used for creating the production." - }, - "ProductionScene": { - "type": "object", - "title": "Production Scene", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "ProductionScene" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Asset name", - "description": "A human readable name for the production scene" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Asset description", - "description": "A human readable description of the production scene" - }, - "sceneName": { - "title": "Scene Name", - "$ref": "#/$defs/Utility/properties/basicName" - }, - "sceneHeader": { - "type": [ - "string", - "null" - ], - "title": "Scene Header", - "description": "Used when referring to the Production Scene. It is generally synonymous with Slugline and is used to divide a Script into scenes." - }, - "sceneDescriptor": { - "type": [ - "string", - "null" - ], - "title": "Scene Descriptor", - "description": "An alphanumeric reference to a Production Scene" - }, - "sceneNumber": { - "type": [ - "null", - "string" - ], - "title": "Scene Number", - "description": "A number tied to a Slugline when a Script is locked" - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "Defined either by explicit divisions in the structure of the Script, e.g., by a Slugline, or by additional capture for use in the Creative Work that is not tied to any particular Scene in the Script." - }, - "Sequence": { - "type": "object", - "title": "Sequence", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Sequence" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Sequence Name", - "description": "A human readable name for the editorial sequence" - }, - "description": { - "type": [ - "string", - "null" - ], - "description": "A brief description of the sequence", - "title": "Sequence description" - }, - "provenance": { - "$ref": "#/$defs/Utility/properties/provenance", - "title": "Provenance" - }, - "version": { - "type": "object", - "title": "Sequence Version Information", - "description": "A particular form, variant, or representation of an Asset that differs in some way from its source Asset.", - "additionalProperties": false, - "properties": { - "versionNumber": {"$ref": "#/$defs/Utility/properties/versionNumber"}, - "name": { - "type": "string", - "title": "A name for this specific version of the Asset" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Asset description", - "description": "A human readable description of the version" - }, - "annotation": { - "type": "array", - "items": {"$ref": "#/$defs/Utility/properties/note"}, - "description": "A collection of notes specific to this version" - }, - "VariantOf": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Sequence"} - ] - }, - "RevisionOf": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Sequence"} - ] - }, - "Variant": { - "type": "array", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Sequence"} - ] - } - }, - "Alternative": { - "type": "array", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Sequence"} - ] - } - }, - "Revision": { - "type": "array", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Sequence"} - ] - } - }, - "customData": {"$ref": "#/$defs/core/properties/customData"} - } - }, - "sequenceType": { - "type": "string", - "title": "Sequence Type", - "enum": [ - "vfx", - "editorial", - "image", - "animation", - "color" - ] - }, - "SCD": { - "title": "Sequence Chronology Descriptor", - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/Asset"} - ] - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "A sequence of shots linked to creative intent." - }, - "Slate": { - "type": "object", - "title": "Slate", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Slate" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "slateUID": { - "type": "string", - "title": "Slate UID", - "description": "Slate Unique Identifier" - }, - "cameraLabel": { - "type": [ - "string", - "null" - ], - "title": "Camera Label", - "description": "Label for the Camera responsible for the Capture, usually related to the role and responsibility of the group operating it and usually a single upper-case letter starting with A." - }, - "cameraUnit": { - "type": [ - "string", - "null" - ], - "title": "Camera Unit", - "description": "A group of Participants responsible for shooting some element of a Scene, e.g., a Main Unit or Second Unit." - }, - "cameraRoll": { - "type": [ - "string", - "null" - ], - "title": "Camera Roll", - "description": "Identifier for a group of events captured together on the same camera on the same media." - }, - "soundRoll": { - "type": [ - "string", - "null" - ], - "title": "Sound Roll", - "description": "Identifier for a group of audio events captured together on the same recording device and same media." - }, - "shootDate": { - "title": "Shoot Date", - "$ref": "#/$defs/Utility/properties/time/properties/date", - "description": "The date of capture or creation" - }, - "shootDay": { - "type": [ - "number", - "string", - "null" - ], - "title": "Shoot Day", - "description": "The number of the day on the shooting schedule." - }, - "recordingFPS": { - "type": [ - "number", - "null" - ], - "title": "Recording FPS", - "description": "Frames per second recorded by the camera." - }, - "CreativeWork": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/CreativeWork"} - ] - }, - "Director": { - "type": [ - "array", - "null" - ], - "title": "Director", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Participant/properties/Participant"} - ] - } - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "Used to capture key identifying information about what is being recorded on any given setup and take." - }, - "SpecialAction": { - "type": "object", - "title": "Special Action", - "properties": { - "schemaVersion": {"$ref": "#/$defs/core/properties/schemaVersion"}, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "NarrativeAction" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Narrative Action Name", - "description": "A human readable name for the action" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Narrative Object Description", - "description": "A brief description of the narrative action" - }, - "actionType": { - "type": "string", - "title": "Object type", - "description": "A categorization of the type action.", - "enum": [ - "action", - "stunt", - "choreography", - "fight", - "motionCapture", - "marine", - "aerial" - ] - }, - "customData": { - "title": "Custom Data", - "$ref": "#/$defs/core/properties/customData" - }, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "An action or set of actions that are performed and require additional choreography or supervision." - } - }, - "additionalProperties": false, - "title": "Media Creation Context Definitions" - }, - "Participant": { - "type": "object", - "title": "Participant Definitions", - "properties": { - "Participant": { - "type": "object", - "title": "Participant", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Participant" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Participant name", - "description": "A human readable name for the participant, primarily for use as a label" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Description", - "description": "A brief description of the participant" - }, - "ParticipantSC": { - "type": "object", - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Participant/properties/Person"}, - {"$ref": "#/$defs/Participant/properties/Department"}, - {"$ref": "#/$defs/Participant/properties/Organization"}, - {"$ref": "#/$defs/Participant/properties/Service"} - ], - "title": "Participant Structural Characteristics", - "description": "Describes the form of a Participant along with the attributes specific to that Participant’s form." - }, - "participantFC": { - "type": "object", - "title": "Participant Functional Characteristics", - "properties": { - "functionalType": { - "type": [ - "string", - "null" - ], - "title": "Functional Type" - }, - "jobTitle": { - "type": [ - "string", - "null" - ], - "title": "Job Title", - "description": "A formal name for the position a Person holds in relation to the production, usually associated with a specific set of responsibilities." - }, - "Role": { - "type": "array", - "description": "", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Participant/properties/Role"} - ] - } - } - }, - "additionalProperties": true, - "description": "The use or purpose of a Participant within the production process" - }, - "contact": { - "title": "Participant Contact", - "$ref": "#/$defs/Utility/properties/contact", - "description": "Contact information for the Participant" - }, - "Participant": { - "type": "array", - "title": "Participant", - "description": "Any Participants that are members of this Participant group", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Participant/properties/Participant"} - ] - } - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "Context": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "Depiction": { - "type": [ - "array", - "null" - ], - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Depiction"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "The entities (people, organizations, and services) that are responsible for the production of the Creative Work." - }, - "Person": { - "type": "object", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Person" - }, - "identifier": { - "type": "array", - "title": "Identifier", - "description": "An identifier uniquely identifies an entity within a particular scope.", - "items": { - "type": "object", - "properties": { - "identifierScope": { - "type": "string", - "title": "Identifier Scope", - "description": "The universe within which an identifier is valid and unique." - }, - "identifierValue": { - "type": "string", - "title": "Identifier Value", - "description": "A string of characters that uniquely identifies an object within a particular scope." - } - }, - "additionalProperties": false, - "required": [ - "identifierScope", - "identifierValue" - ] - } - }, - "structuralType": { - "type": "string", - "const": "person" - }, - "name": { - "type": [ - "string", - "null" - ], - "title": "Person name", - "description": "A human readable name for the person, convenient for use in UI's etc." - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Description", - "description": "A brief description of the person" - }, - "jobTitle": { - "type": [ - "string", - "null" - ], - "title": "Job Title", - "description": "A persons job title (as distinct from a specific role)" - }, - "Location": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Utility/properties/Location"} - ] - }, - "gender": {"$ref": "#/$defs/Utility/properties/gender"}, - "contact": { - "$ref": "#/$defs/Utility/properties/contact", - "title": "Person Contact", - "description": "Contact information for the Person" - }, - "personName": { - "$ref": "#/$defs/Utility/properties/completeName", - "title": "Person Name", - "description": "The canonical name or set of names and titles for the Person" - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "title": "Person", - "description": "People are the individuals that are associated with the production" - }, - "Department": { - "type": "object", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Department" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "structuralType": { - "type": "string", - "const": "department" - }, - "name": { - "type": [ - "string", - "null" - ], - "title": "Department name", - "description": "A human readable name for the department, primarily for use as a label" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Description", - "description": "A brief description of the department" - }, - "departmentName": {"$ref": "#/$defs/Utility/properties/basicName"}, - "Location": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Utility/properties/Location"} - ] - }, - "contact": {"$ref": "#/$defs/Utility/properties/contact"}, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "title": "Department", - "description": "Part of a larger Organization with a particular set of responsibilities on the production." - }, - "Organization": { - "type": "object", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Organization" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "structuralType": { - "type": "string", - "const": "organization" - }, - "name": { - "type": [ - "string", - "null" - ], - "title": "Organization name", - "description": "A human readable name for the organization, primarily for use as a label" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Description", - "description": "A brief description of the organization" - }, - "organizationName": {"$ref": "#/$defs/Utility/properties/basicName"}, - "contact": {"$ref": "#/$defs/Utility/properties/contact"}, - "Location": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Utility/properties/Location"} - ] - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "title": "Organization", - "description": "A legal entity or groups of people associated with the production.. with a particular purpose relative to the production." - }, - "Service": { - "type": "object", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Service" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "structuralType": { - "type": "string", - "const": "service" - }, - "name": { - "type": [ - "string", - "null" - ], - "title": "Service name", - "description": "A human readable name for the service, primarily for use as a label" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Description", - "description": "A brief description of the service" - }, - "serviceName": {"$ref": "#/$defs/Utility/properties/basicName"}, - "contact": {"$ref": "#/$defs/Utility/properties/contact"}, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "title": "Service", - "description": "A computer driven agent that can perform tasks given the proper context and structured data." - }, - "Role": { - "type": "object", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Role" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "name": { - "type": [ - "string", - "null" - ], - "title": "Role Name", - "examples": [ - "Director", - "Producer", - "Composer", - "Art Department" - ] - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Role Description" - }, - "roleType": { - "type": "string", - "title": "Role Type", - "description": "The specific role, typically used in authorization systems" - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "title": "Role", - "description": "A set of properties that define the role of a participant within the production" - } - }, - "additionalProperties": false - }, - "Task": { - "type": "object", - "properties": { - "Task": { - "type": "object", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Task" - }, - "identifier": { - "title": "Identifier", - "$ref": "#/$defs/Utility/properties/identifier" - }, - "name": { - "type": [ - "string", - "null" - ], - "title": "Asset name", - "description": "A human readable name for the asset" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Asset description", - "description": "A human readable description of the asset" - }, - "TaskSC": { - "title": "Structural Characteristics", - "$ref": "#/$defs/Task/properties/TaskSC" - }, - "taskFC": { - "title": "Functional Characteristics", - "$ref": "#/$defs/Task/properties/taskFC" - }, - "Context": { - "title": "Asset Context", - "$ref": "#/$defs/MediaCreationContext/properties/Context" - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "title": "Task", - "description": "A piece of work to be done and completed as a step in the production process.", - "additionalProperties": true, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ] - }, - "TaskSC": { - "type": "object", - "title": "Task Structural Characteristics", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "TaskSC" - }, - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"}, - "structuralType": { - "type": [ - "string", - "null" - ], - "title": "Structural Type", - "description": "A structured description of the the assets form", - "examples": [ - "assetGroup", - "digital.image", - "analog.movingImage" - ] - }, - "structuralProperties": { - "type": [ - "object", - "null" - ], - "title": "Structural Properties", - "description": "A set of properties that describe the asset in this form", - "properties": { - "customData": {"$ref": "#/$defs/core/properties/customData"} - }, - "additionalProperties": true - }, - "customData": {"$ref": "#/$defs/core/properties/customData"}, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": true, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "description": "Describes the form of Task along with the attributes specific to that task’s form" - }, - "taskFC": { - "type": "object", - "title": "Task Functional Characteristics", - "properties": { - "functionalType": { - "type": [ - "string", - "null" - ], - "title": "Functional Type", - "description": "The use or purpose of a Task within the production process." - }, - "functionalProperties": { - "type": [ - "object", - "null" - ], - "title": "Functional Properties", - "description": "A set of properties that describe the tasks functional use", - "properties": { - "customData": {"$ref": "#/$defs/core/properties/customData"} - }, - "additionalProperties": true - }, - "customData": {"$ref": "#/$defs/core/properties/customData"} - }, - "additionalProperties": true, - "description": "Describes the use or purpose of an Asset within the production process" - } - }, - "title": "Task Definitions", - "additionalProperties": false - }, - "Utility": { - "type": "object", - "properties": { - "unitOfMeasurement": { - "type": "object", - "properties": { - "weight": { - "title": "weight", - "description": "Encode a measurement of weight using the imperial or metric system", - "oneOf": [ - {"type": "null"}, - { - "type": "string", - "description": "Encode weight using the metric system of measurement (kilogram, gram)", - "pattern": "^(\\d+kg)?(\\d+g)?$", - "examples": ["3kg7g"] - }, - { - "type": "string", - "description": "Encode weight using the imperial system of measurement (pounds, ounces)", - "pattern": "^(\\d+lb)?(\\d+oz)?$", - "examples": ["12lb14oz"] - } - ] - }, - "dimensions": { - "type": "object", - "title": "dimensions", - "description": "Encode a set of measurements to describe a 2 or 3 dimensional object (metric, imperial or pixels)", - "properties": { - "height": { - "description": "The height or X axis of the object", - "oneOf": [ - {"type": "null"}, - { - "description": "Encode distance using the metric system of measurement (kilometer, meter, centimetre, millimeter", - "pattern": "^-?(\\d+km)?(\\d+m)?(\\d+cm)?(\\d+mm)?$", - "examples": [ - "100m", - "6km2m56cm12mm" - ], - "type": "string" - }, - { - "description": "Encode distance using the imperial system of measurement (miles, feet, inches)", - "pattern": "^-?(\\d+mi)?(\\d+ft)?(\\d+in)?$", - "examples": [ - "2000ft", - "2mi12ft6in" - ], - "type": "string" - }, - { - "description": "Encode a measurement of the number of pixels, typically in a digital image", - "pattern": "^(\\d+px)$", - "examples": ["250px"], - "type": "string" - } - ] - }, - "width": { - "description": "The width or X axis of the object", - "oneOf": [ - {"type": "null"}, - { - "type": "string", - "description": "Encode distance using the metric system of measurement (kilometer, meter, centimetre, millimeter", - "pattern": "^-?(\\d+km)?(\\d+m)?(\\d+cm)?(\\d+mm)?$", - "examples": [ - "100m", - "6km2m56cm12mm" - ] - }, - { - "type": "string", - "description": "Encode distance using the imperial system of measurement (miles, feet, inches)", - "pattern": "^-?(\\d+mi)?(\\d+ft)?(\\d+in)?$", - "examples": [ - "2000ft", - "2mi12ft6in" - ] - }, - { - "type": "string", - "description": "Encode a measurement of the number of pixels, typically in a digital image", - "pattern": "^(\\d+px)$", - "examples": ["250px"] - } - ] - }, - "depth": { - "description": "The depth or Z axis of the object", - "oneOf": [ - {"type": "null"}, - { - "type": "string", - "description": "Encode distance using the metric system of measurement (kilometer, meter, centimetre, millimeter", - "pattern": "^-?(\\d+km)?(\\d+m)?(\\d+cm)?(\\d+mm)?$", - "examples": [ - "100m", - "6km2m56cm12mm" - ] - }, - { - "type": "string", - "description": "Encode distance using the imperial system of measurement (miles, feet, inches)", - "pattern": "^-?(\\d+mi)?(\\d+ft)?(\\d+in)?$", - "examples": [ - "2000ft", - "2mi12ft6in" - ] - }, - { - "type": "string", - "description": "Encode a measurement of the number of pixels, typically in a digital image", - "pattern": "^(\\d+px)$", - "examples": ["250px"] - } - ] - } - } - }, - "linearDistance": { - "title": "Linear Distance", - "description": "Encode a measurement of distance using the imperial or metric system", - "oneOf": [ - {"type": "null"}, - { - "type": "string", - "description": "Encode distance using the metric system of measurement (kilometer, meter, centimetre, millimeter", - "pattern": "^-?(\\d+km)?(\\d+m)?(\\d+cm)?(\\d+mm)?$", - "examples": [ - "100m", - "6km2m56cm12mm" - ] - }, - { - "type": "string", - "description": "Encode distance using the imperial system of measurement (miles, feet, inches)", - "pattern": "^-?(\\d+mi)?(\\d+ft)?(\\d+in)?$", - "examples": [ - "2000ft", - "2mi12ft6in" - ] - } - ] - } - }, - "additionalProperties": false - }, - "identifier": { - "type": "array", - "title": "Identifier", - "description": "An identifier uniquely identifies an entity within a particular scope.", - "items": { - "type": "object", - "properties": { - "identifierScope": { - "type": "string", - "title": "Identifier Scope", - "description": "The universe within which an identifier is valid and unique." - }, - "identifierValue": { - "type": "string", - "title": "Identifier Value", - "description": "A string of characters that uniquely identifies an object within a particular scope." - } - }, - "additionalProperties": false, - "required": [ - "identifierScope", - "identifierValue" - ] - }, - "minItems": 1 - }, - "address": { - "type": [ - "object", - "null" - ], - "title": "Address", - "properties": { - "street": { - "type": [ - "string", - "null" - ], - "title": "Street Address", - "description": "The street address", - "examples": ["1600 Amphitheater Parkway"] - }, - "locality": { - "type": [ - "string", - "null" - ], - "title": "Address locality", - "description": "The locality in which the street address is, and which is in the region.", - "examples": ["Mountain View"] - }, - "region": { - "type": [ - "string", - "null" - ], - "title": "Address region", - "description": "The region in which the locality is, and which is in the country", - "examples": ["California"] - }, - "postalCode": { - "type": [ - "string", - "null" - ], - "title": "Zip or Postal Code", - "description": "A zip or postal code", - "examples": ["94534"] - }, - "country": { - "title": "Country", - "$ref": "#/$defs/Utility/properties/country" - } - }, - "additionalProperties": false, - "description": "A postal address or identifiable location of a place or building" - }, - "country": { - "type": [ - "string", - "null" - ], - "title": "Country", - "description": "The country, as an ISO 3166-1 alpha-2 country code", - "minLength": 2, - "maxLength": 2, - "examples": ["US"] - }, - "basicName": { - "type": [ - "object", - "null" - ], - "title": "Basic Name", - "properties": { - "fullName": { - "type": [ - "string", - "null" - ], - "title": "Full Name", - "description": "The full an complete name of the entity" - }, - "altName": { - "type": [ - "string", - "null" - ], - "title": "Alternate Name", - "description": "An alternate, often shortened name for the entity" - } - }, - "additionalProperties": false, - "description": "A description of things name and an alternative name" - }, - "completeName": { - "type": "object", - "title": "Complete Name", - "properties": { - "firstGivenName": { - "type": [ - "string", - "null" - ], - "title": "First Given Name", - "description": "A person's first name, also referred to as given name" - }, - "secondGivenName": { - "type": [ - "string", - "null" - ], - "title": "Second Given Name", - "description": "A persons second given name, also referred to as middle name" - }, - "familyName": { - "type": [ - "string", - "null" - ], - "title": "Family Name", - "description": "A persons family name, also referred to as surname" - }, - "fullName": { - "type": [ - "string", - "null" - ], - "title": "Full Name", - "description": "A complete name, typically a conjunction of familyName, firstGivenName and possibly other fields." - }, - "birthName": { - "type": [ - "string", - "null" - ], - "title": "Birth Name", - "description": "A persons name at birth, also referred to as maiden name" - }, - "primaryName": { - "type": [ - "string", - "null" - ], - "title": "Primary Name", - "description": "A persons primary name, one they typically use, also often a combination of first, second and family name" - }, - "pseudonym": { - "type": [ - "string", - "null" - ], - "title": "Pseudonym" - }, - "altName": { - "type": [ - "string", - "null" - ], - "title": "Alternate Name" - }, - "translatedName": { - "type": [ - "string", - "null" - ], - "title": "Translated Name" - }, - "nickname": { - "type": [ - "string", - "null" - ], - "title": "Nickname" - }, - "moniker": { - "type": [ - "string", - "null" - ], - "title": "Moniker" - }, - "alias": { - "type": [ - "string", - "null" - ], - "title": "Alias", - "description": "An alias being used by a person often used to disguise someones real identity, sometimes used when booking hotel rooms or restaurants " - }, - "contractualName": { - "type": [ - "string", - "null" - ], - "title": "Contractual Name" - }, - "displayName": { - "type": [ - "string", - "null" - ], - "title": "Display Name" - }, - "sortName": { - "type": [ - "string", - "null" - ], - "title": "Sort Name" - }, - "scriptName": { - "type": [ - "string", - "null" - ], - "title": "Script Name" - }, - "prefix": { - "type": [ - "string", - "null" - ], - "title": "Prefix", - "description": "A prefix that can indicate a persons gender or title", - "examples": [ - "Mrs", - "Mr", - "Dr", - "General" - ] - }, - "suffix": { - "type": [ - "string", - "null" - ], - "title": "Suffix", - "description": "A suffix, often used to indicate a title or classification", - "examples": [ - "MBE", - "MD", - "RN", - "II", - "IV" - ] - } - }, - "additionalProperties": false, - "description": "A detailed description of a person, or others, name and variants of their name." - }, - "gender": { - "type": [ - "object", - "null" - ], - "title": "Gender", - "properties": { - "gender": { - "type": [ - "string", - "null" - ], - "title": "Identifies as gender", - "description": "The gender by which an individual identifies", - "enum": [ - "male", - "female", - "other", - "unknown", - null - ] - }, - "genderPronoun": { - "type": [ - "string", - "null" - ], - "title": "Preferred pronoun", - "description": "An individuals pronoun of choice", - "enum": [ - "he/him", - "she/her", - "ze/hir", - "they/their", - null - ] - } - }, - "additionalProperties": false, - "description": "A person, or others, expressed or prefered gender and pronoun" - }, - "Location": { - "type": "object", - "properties": { - "schemaVersion": { - "title": "Schema Version", - "$ref": "#/$defs/core/properties/schemaVersion" - }, - "entityType": { - "type": "string", - "title": "Entity Type", - "const": "Location" - }, - "identifier": { - "title": "Identifier", - "$ref": "#/$defs/Utility/properties/identifier" - }, - "name": { - "type": [ - "string", - "null" - ], - "title": "Location name", - "description": "A human readable name for the location" - }, - "description": { - "type": [ - "string", - "null" - ], - "title": "Location Description", - "description": "A brief description of the location" - }, - "address": { - "title": "Address", - "$ref": "#/$defs/Utility/properties/address" - }, - "coordinates": { - "title": "Coordinates", - "$ref": "#/$defs/Utility/properties/coordinates" - }, - "Context": { - "type": "array", - "items": { - "anyOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"} - ] - } - }, - "entityInfo": { - "title": "Entity Information", - "$ref": "#/$defs/core/properties/entityInfo" - } - }, - "additionalProperties": false, - "required": [ - "entityType", - "identifier", - "schemaVersion" - ], - "title": "Location", - "description": "A particular place or position either in either the real world or the narrative world." - }, - "note": { - "type": [ - "object", - "null" - ], - "title": "Note", - "properties": { - "title": { - "type": "string", - "title": "Title", - "description": "A title for the note or annotation" - }, - "text": { - "type": "string", - "title": "Text", - "description": "The text of the note or annotation" - } - }, - "additionalProperties": false - }, - "time": { - "type": "object", - "title": "Time", - "additionalProperties": false, - "properties": { - "timestamp": { - "type": [ - "number", - "null" - ], - "title": "Timestamp" - }, - "periodInTime": { - "type": "object", - "title": "Period in Time", - "properties": { - "startTime": { - "type": "string", - "title": "Start Time" - }, - "durationTime": { - "type": "string", - "title": "Duration of Time" - }, - "endTime": { - "type": "string", - "title": "End Time" - } - }, - "additionalProperties": false, - "required": ["startTime"] - }, - "descriptiveTime": { - "type": "object", - "title": "Descriptive Time", - "properties": { - "periodInDay": { - "type": "string", - "title": "Period in Day", - "examples": [ - "Morning", - "Noon", - "Midnight", - "Afternoon", - "Night" - ] - }, - "relativeTime": { - "type": "string", - "title": "Relative Time", - "examples": [ - "Later", - "Continuous", - "6 months earlier", - "A long time ago" - ] - }, - "periodInTime": { - "type": "string", - "title": "Period in Time", - "examples": [ - "Ming dynasty", - "World War II", - "Jurassic period", - "20th century" - ] - }, - "eventInTime": { - "type": "string", - "title": "Event in Time", - "description": "Describes a specific event that occurred", - "examples": [ - "Hindenburg disaster", - "World Trade Center attack", - "Queen Elizabeth coronation" - ] - } - }, - "additionalProperties": false - }, - "dateTime": { - "type": [ - "string", - "null" - ], - "title": "Date & Time", - "pattern": "^(?:19|20)\\d{2}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\\d|3[01])T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:|\\.\\d\\d)(?:Z|-0[1-9]|-1\\d|-2[0-3]|-00:?(?:0[1-9]|[1-5]\\d)|\\+[01]\\d|\\+2[0-3])(?:|:?[0-5]\\d)$", - "description": "Should be formatted to comply with ISO 8601", - "examples": ["2023-08-24T20:51:15Z\n2023-08-24T20:51:15.56Z\n2023-08-24T20:51:15+08:00\n2023-08-24T20:51:15.23-04:00"] - }, - "date": { - "type": [ - "string", - "null" - ], - "title": "Date", - "pattern": "\\d{4}-[01]\\d-[0-3]\\d", - "examples": ["2020-11-21"], - "description": "Should be formatted to comply with ISO 8601" - }, - "durationTime": { - "type": [ - "string", - "null" - ], - "title": "Duration of Time", - "pattern": "^(-?)P(?=.)((\\d+)Y)?((\\d+)M)?((\\d+)D)?(T(?=.)((\\d+)H)?((\\d+)M)?(\\d*(\\.\\d+)?S)?)?$", - "examples": ["P2Y12M3D"], - "description": "Should be formatted to comply with ISO 8601" - }, - "timecode": { - "type": [ - "string", - "null" - ], - "title": "SMPTE Timcode in the format HH:MM:SS:FF. \nAssumes the frame rate is 23.98, 24, 25, 29.97 NDF, or 30", - "pattern": "^(?:(?:[0-1][0-9]|[0-2][0-3]):)(?:[0-5][0-9]:){2}(?:[0-2][0-9])$", - "examples": ["00:03:43:12"], - "description": "SMPTE timecode" - } - } - }, - "coordinates": { - "type": [ - "object", - "null" - ], - "title": "Coordinates", - "description": "A global positioning coordinate in compliance with WGS 84", - "properties": { - "latitude": { - "type": "number", - "title": "latitude", - "minimum": -90, - "maximum": 90 - }, - "longitude": { - "type": "number", - "title": "longitude", - "minimum": -180, - "maximum": 180 - } - }, - "additionalProperties": false - }, - "contact": { - "type": "object", - "title": "Contact", - "properties": { - "email": { - "title": "Email", - "$ref": "#/$defs/Utility/properties/email" - }, - "telephone": { - "title": "Telephone", - "$ref": "#/$defs/Utility/properties/telephone" - } - }, - "additionalProperties": false - }, - "email": { - "type": "object", - "title": "Email", - "properties": { - "business": { - "type": [ - "string", - "null" - ], - "title": "Business" - }, - "personal": { - "type": [ - "string", - "null" - ], - "title": "Personal" - } - }, - "additionalProperties": false - }, - "telephone": { - "type": "object", - "title": "Telephone", - "properties": { - "business": { - "type": [ - "string", - "null" - ], - "title": "Business" - }, - "personal": { - "type": [ - "string", - "null" - ], - "title": "Personal" - } - }, - "additionalProperties": false - }, - "language": { - "type": [ - "string", - "null" - ], - "title": "Language", - "description": "An IETF BCP 47 language code" - }, - "versionNumber": { - "type": [ - "string", - "number", - "null" - ], - "title": "Version Number", - "description": "A designation indicating a place in a sequence of versions" - }, - "provenance": { - "type": "object", - "properties": { - "CreatedBy": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Participant/properties/Participant"} - ] - }, - "Role": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Participant/properties/Role"} - ] - }, - "createdOn": {"$ref": "#/$defs/Utility/properties/time/properties/dateTime"}, - "Origin": { - "oneOf": [ - {"$ref": "#/$defs/core/properties/reference"}, - {"$ref": "#/$defs/Asset/properties/Asset"} - ] - }, - "reason": {"type": "string"}, - "note": { - "type": "array", - "items": {"$ref": "#/$defs/Utility/properties/note"} - } - }, - "title": "Provenance", - "description": "A record of when something was changed and by whom.", - "additionalProperties": false - } - }, - "additionalProperties": false, - "title": "Utility Definitions", - "description": "Common data models and data structures used in multiple places and in multiple ways in a larger system." - }, - "core": { - "type": "object", - "title": "Core", - "properties": { - "customData": { - "type": "object", - "title": "Custom Data", - "description": "A user defined set of custom data in the payload of the instance, used where the formal schema lacks required properties", - "additionalProperties": true - }, - "schemaVersion": { - "type": "string", - "title": "Schema Version", - "default": "https://movielabs.com/omc/json/schema/v2.0", - "enum": ["https://movielabs.com/omc/json/schema/v2.0"], - "description": "Describes the version of OMC-JSON schema that was used to create this instance" - }, - "reference": { - "type": [ - "object", - "null" - ], - "properties": { - "identifier": {"$ref": "#/$defs/Utility/properties/identifier"} - }, - "title": "Reference entity", - "additionalProperties": false, - "description": "An identifier that references another entity in the graph" - }, - "rootObject": { - "type": "object", - "properties": { - "Asset": { - "type": "array", - "items": {"$ref": "#/$defs/Asset/properties/Asset"}, - "title": "Asset" - }, - "AssetSC": { - "type": "array", - "items": {"$ref": "#/$defs/Asset/properties/AssetSC"}, - "title": "Asset Structural Characteristics" - }, - "Character": { - "type": "array", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/Character"}, - "title": "Character" - }, - "Context": { - "type": "array", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/Context"}, - "title": "Context" - }, - "CreativeWork": { - "type": "array", - "title": "Creative Work", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/CreativeWork"} - }, - "Depiction": { - "type": "array", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/Depiction"}, - "title": "Context" - }, - "NarrativeAudio": { - "type": "array", - "title": "Narrative Audio", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeAudio"} - }, - "NarrativeLocation": { - "type": "array", - "title": "Narrative Location", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeLocation"} - }, - "NarrativeObject": { - "type": "array", - "title": "Narrative Object", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeObject"} - }, - "NarrativeScene": { - "type": "array", - "title": "Narrative Scene", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeScene"} - }, - "NarrativeStyling": { - "type": "array", - "title": "Narrative Styling", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeStyling"} - }, - "NarrativeWardrobe": { - "type": "array", - "title": "Narrative Wardrobe", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeWardrobe"} - }, - "ProductionLocation": { - "type": "array", - "title": "Production Location", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/ProductionLocation"} - }, - "ProductionScene": { - "type": "array", - "title": "Production Scene", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/ProductionScene"} - }, - "Sequence": { - "type": "array", - "title": "Sequence", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/Sequence"} - }, - "Slate": { - "type": "array", - "title": "Slate", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/Slate"} - }, - "SpecialAction": { - "type": "array", - "title": "Special Action", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/SpecialAction"} - }, - "Effect": { - "type": "array", - "title": "Effect", - "items": {"$ref": "#/$defs/MediaCreationContext/properties/Effect"} - }, - "Participant": { - "type": "array", - "items": {"$ref": "#/$defs/Participant/properties/Participant"}, - "title": "Participant" - }, - "Person": { - "type": "array", - "items": {"$ref": "#/$defs/Participant/properties/Person"}, - "title": "Person" - }, - "Department": { - "type": "array", - "items": {"$ref": "#/$defs/Participant/properties/Department"}, - "title": "Department" - }, - "Organization": { - "type": "array", - "items": {"$ref": "#/$defs/Participant/properties/Organization"}, - "title": "Organization" - }, - "Service": { - "type": "array", - "items": {"$ref": "#/$defs/Participant/properties/Service"}, - "title": "Service" - }, - "Role": { - "type": "array", - "items": {"$ref": "#/$defs/Participant/properties/Role"}, - "title": "Service" - }, - "Location": { - "type": "array", - "title": "Location", - "items": {"$ref": "#/$defs/Utility/properties/Location"} - } - }, - "additionalProperties": false - }, - "rootArray": { - "type": "array", - "items": { - "anyOf": [ - {"$ref": "#/$defs/MediaCreationContext/properties/Character"}, - {"$ref": "#/$defs/Participant/properties/Participant"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Context"}, - {"$ref": "#/$defs/MediaCreationContext/properties/CreativeWork"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Depiction"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeAudio"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeLocation"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeObject"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeScene"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeStyling"}, - {"$ref": "#/$defs/MediaCreationContext/properties/NarrativeWardrobe"}, - {"$ref": "#/$defs/MediaCreationContext/properties/ProductionLocation"}, - {"$ref": "#/$defs/MediaCreationContext/properties/ProductionScene"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Slate"}, - {"$ref": "#/$defs/MediaCreationContext/properties/SpecialAction"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Effect"}, - {"$ref": "#/$defs/Utility/properties/Location"}, - {"$ref": "#/$defs/Participant/properties/Role"}, - {"$ref": "#/$defs/Participant/properties/Person"}, - {"$ref": "#/$defs/Participant/properties/Department"}, - {"$ref": "#/$defs/Participant/properties/Organization"}, - {"$ref": "#/$defs/Participant/properties/Service"}, - {"$ref": "#/$defs/Asset/properties/Asset"}, - {"$ref": "#/$defs/Asset/properties/AssetSC"}, - {"$ref": "#/$defs/MediaCreationContext/properties/Sequence"}, - {"$ref": "#/$defs/Infrastructure/properties/Infrastructure"}, - {"$ref": "#/$defs/Infrastructure/properties/InfrastructureSC"}, - {"$ref": "#/$defs/Task/properties/Task"}, - {"$ref": "#/$defs/Task/properties/TaskSC"} - ] - } - }, - "entityInfo": { - "type": [ - "object", - "null" - ], - "title": "Entity Information", - "description": "Reserved for future use to describe specific details about the instance of the entity", - "additionalProperties": false - } - }, - "additionalProperties": false, - "description": "Helper objects used in building the schema" - } - } -} \ No newline at end of file diff --git a/benchmark/files/2020_12_embedded_resources.json b/benchmark/files/2020_12_embedded_resources.json deleted file mode 100644 index 82401f898..000000000 --- a/benchmark/files/2020_12_embedded_resources.json +++ /dev/null @@ -1,2608 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/pathological", - "allOf": [ - { - "$ref": "https://example.com/def/0" - }, - { - "$ref": "https://example.com/def/1" - }, - { - "$ref": "https://example.com/def/2" - }, - { - "$ref": "https://example.com/def/3" - }, - { - "$ref": "https://example.com/def/4" - }, - { - "$ref": "https://example.com/def/5" - }, - { - "$ref": "https://example.com/def/6" - }, - { - "$ref": "https://example.com/def/7" - }, - { - "$ref": "https://example.com/def/8" - }, - { - "$ref": "https://example.com/def/9" - }, - { - "$ref": "https://example.com/def/10" - }, - { - "$ref": "https://example.com/def/11" - }, - { - "$ref": "https://example.com/def/12" - }, - { - "$ref": "https://example.com/def/13" - }, - { - "$ref": "https://example.com/def/14" - }, - { - "$ref": "https://example.com/def/15" - }, - { - "$ref": "https://example.com/def/16" - }, - { - "$ref": "https://example.com/def/17" - }, - { - "$ref": "https://example.com/def/18" - }, - { - "$ref": "https://example.com/def/19" - }, - { - "$ref": "https://example.com/def/20" - }, - { - "$ref": "https://example.com/def/21" - }, - { - "$ref": "https://example.com/def/22" - }, - { - "$ref": "https://example.com/def/23" - }, - { - "$ref": "https://example.com/def/24" - }, - { - "$ref": "https://example.com/def/25" - }, - { - "$ref": "https://example.com/def/26" - }, - { - "$ref": "https://example.com/def/27" - }, - { - "$ref": "https://example.com/def/28" - }, - { - "$ref": "https://example.com/def/29" - }, - { - "$ref": "https://example.com/def/30" - }, - { - "$ref": "https://example.com/def/31" - }, - { - "$ref": "https://example.com/def/32" - }, - { - "$ref": "https://example.com/def/33" - }, - { - "$ref": "https://example.com/def/34" - }, - { - "$ref": "https://example.com/def/35" - }, - { - "$ref": "https://example.com/def/36" - }, - { - "$ref": "https://example.com/def/37" - }, - { - "$ref": "https://example.com/def/38" - }, - { - "$ref": "https://example.com/def/39" - }, - { - "$ref": "https://example.com/def/40" - }, - { - "$ref": "https://example.com/def/41" - }, - { - "$ref": "https://example.com/def/42" - }, - { - "$ref": "https://example.com/def/43" - }, - { - "$ref": "https://example.com/def/44" - }, - { - "$ref": "https://example.com/def/45" - }, - { - "$ref": "https://example.com/def/46" - }, - { - "$ref": "https://example.com/def/47" - }, - { - "$ref": "https://example.com/def/48" - }, - { - "$ref": "https://example.com/def/49" - }, - { - "$ref": "https://example.com/def/50" - }, - { - "$ref": "https://example.com/def/51" - }, - { - "$ref": "https://example.com/def/52" - }, - { - "$ref": "https://example.com/def/53" - }, - { - "$ref": "https://example.com/def/54" - }, - { - "$ref": "https://example.com/def/55" - }, - { - "$ref": "https://example.com/def/56" - }, - { - "$ref": "https://example.com/def/57" - }, - { - "$ref": "https://example.com/def/58" - }, - { - "$ref": "https://example.com/def/59" - }, - { - "$ref": "https://example.com/def/60" - }, - { - "$ref": "https://example.com/def/61" - }, - { - "$ref": "https://example.com/def/62" - }, - { - "$ref": "https://example.com/def/63" - }, - { - "$ref": "https://example.com/def/64" - }, - { - "$ref": "https://example.com/def/65" - }, - { - "$ref": "https://example.com/def/66" - }, - { - "$ref": "https://example.com/def/67" - }, - { - "$ref": "https://example.com/def/68" - }, - { - "$ref": "https://example.com/def/69" - }, - { - "$ref": "https://example.com/def/70" - }, - { - "$ref": "https://example.com/def/71" - }, - { - "$ref": "https://example.com/def/72" - }, - { - "$ref": "https://example.com/def/73" - }, - { - "$ref": "https://example.com/def/74" - }, - { - "$ref": "https://example.com/def/75" - }, - { - "$ref": "https://example.com/def/76" - }, - { - "$ref": "https://example.com/def/77" - }, - { - "$ref": "https://example.com/def/78" - }, - { - "$ref": "https://example.com/def/79" - }, - { - "$ref": "https://example.com/def/80" - }, - { - "$ref": "https://example.com/def/81" - }, - { - "$ref": "https://example.com/def/82" - }, - { - "$ref": "https://example.com/def/83" - }, - { - "$ref": "https://example.com/def/84" - }, - { - "$ref": "https://example.com/def/85" - }, - { - "$ref": "https://example.com/def/86" - }, - { - "$ref": "https://example.com/def/87" - }, - { - "$ref": "https://example.com/def/88" - }, - { - "$ref": "https://example.com/def/89" - }, - { - "$ref": "https://example.com/def/90" - }, - { - "$ref": "https://example.com/def/91" - }, - { - "$ref": "https://example.com/def/92" - }, - { - "$ref": "https://example.com/def/93" - }, - { - "$ref": "https://example.com/def/94" - }, - { - "$ref": "https://example.com/def/95" - }, - { - "$ref": "https://example.com/def/96" - }, - { - "$ref": "https://example.com/def/97" - }, - { - "$ref": "https://example.com/def/98" - }, - { - "$ref": "https://example.com/def/99" - }, - { - "$ref": "https://example.com/def/100" - }, - { - "$ref": "https://example.com/def/101" - }, - { - "$ref": "https://example.com/def/102" - }, - { - "$ref": "https://example.com/def/103" - }, - { - "$ref": "https://example.com/def/104" - }, - { - "$ref": "https://example.com/def/105" - }, - { - "$ref": "https://example.com/def/106" - }, - { - "$ref": "https://example.com/def/107" - }, - { - "$ref": "https://example.com/def/108" - }, - { - "$ref": "https://example.com/def/109" - }, - { - "$ref": "https://example.com/def/110" - }, - { - "$ref": "https://example.com/def/111" - }, - { - "$ref": "https://example.com/def/112" - }, - { - "$ref": "https://example.com/def/113" - }, - { - "$ref": "https://example.com/def/114" - }, - { - "$ref": "https://example.com/def/115" - }, - { - "$ref": "https://example.com/def/116" - }, - { - "$ref": "https://example.com/def/117" - }, - { - "$ref": "https://example.com/def/118" - }, - { - "$ref": "https://example.com/def/119" - }, - { - "$ref": "https://example.com/def/120" - }, - { - "$ref": "https://example.com/def/121" - }, - { - "$ref": "https://example.com/def/122" - }, - { - "$ref": "https://example.com/def/123" - }, - { - "$ref": "https://example.com/def/124" - }, - { - "$ref": "https://example.com/def/125" - }, - { - "$ref": "https://example.com/def/126" - }, - { - "$ref": "https://example.com/def/127" - }, - { - "$ref": "https://example.com/def/128" - }, - { - "$ref": "https://example.com/def/129" - }, - { - "$ref": "https://example.com/def/130" - }, - { - "$ref": "https://example.com/def/131" - }, - { - "$ref": "https://example.com/def/132" - }, - { - "$ref": "https://example.com/def/133" - }, - { - "$ref": "https://example.com/def/134" - }, - { - "$ref": "https://example.com/def/135" - }, - { - "$ref": "https://example.com/def/136" - }, - { - "$ref": "https://example.com/def/137" - }, - { - "$ref": "https://example.com/def/138" - }, - { - "$ref": "https://example.com/def/139" - }, - { - "$ref": "https://example.com/def/140" - }, - { - "$ref": "https://example.com/def/141" - }, - { - "$ref": "https://example.com/def/142" - }, - { - "$ref": "https://example.com/def/143" - }, - { - "$ref": "https://example.com/def/144" - }, - { - "$ref": "https://example.com/def/145" - }, - { - "$ref": "https://example.com/def/146" - }, - { - "$ref": "https://example.com/def/147" - }, - { - "$ref": "https://example.com/def/148" - }, - { - "$ref": "https://example.com/def/149" - }, - { - "$ref": "https://example.com/def/150" - }, - { - "$ref": "https://example.com/def/151" - }, - { - "$ref": "https://example.com/def/152" - }, - { - "$ref": "https://example.com/def/153" - }, - { - "$ref": "https://example.com/def/154" - }, - { - "$ref": "https://example.com/def/155" - }, - { - "$ref": "https://example.com/def/156" - }, - { - "$ref": "https://example.com/def/157" - }, - { - "$ref": "https://example.com/def/158" - }, - { - "$ref": "https://example.com/def/159" - }, - { - "$ref": "https://example.com/def/160" - }, - { - "$ref": "https://example.com/def/161" - }, - { - "$ref": "https://example.com/def/162" - }, - { - "$ref": "https://example.com/def/163" - }, - { - "$ref": "https://example.com/def/164" - }, - { - "$ref": "https://example.com/def/165" - }, - { - "$ref": "https://example.com/def/166" - }, - { - "$ref": "https://example.com/def/167" - }, - { - "$ref": "https://example.com/def/168" - }, - { - "$ref": "https://example.com/def/169" - }, - { - "$ref": "https://example.com/def/170" - }, - { - "$ref": "https://example.com/def/171" - }, - { - "$ref": "https://example.com/def/172" - }, - { - "$ref": "https://example.com/def/173" - }, - { - "$ref": "https://example.com/def/174" - }, - { - "$ref": "https://example.com/def/175" - }, - { - "$ref": "https://example.com/def/176" - }, - { - "$ref": "https://example.com/def/177" - }, - { - "$ref": "https://example.com/def/178" - }, - { - "$ref": "https://example.com/def/179" - }, - { - "$ref": "https://example.com/def/180" - }, - { - "$ref": "https://example.com/def/181" - }, - { - "$ref": "https://example.com/def/182" - }, - { - "$ref": "https://example.com/def/183" - }, - { - "$ref": "https://example.com/def/184" - }, - { - "$ref": "https://example.com/def/185" - }, - { - "$ref": "https://example.com/def/186" - }, - { - "$ref": "https://example.com/def/187" - }, - { - "$ref": "https://example.com/def/188" - }, - { - "$ref": "https://example.com/def/189" - }, - { - "$ref": "https://example.com/def/190" - }, - { - "$ref": "https://example.com/def/191" - }, - { - "$ref": "https://example.com/def/192" - }, - { - "$ref": "https://example.com/def/193" - }, - { - "$ref": "https://example.com/def/194" - }, - { - "$ref": "https://example.com/def/195" - }, - { - "$ref": "https://example.com/def/196" - }, - { - "$ref": "https://example.com/def/197" - }, - { - "$ref": "https://example.com/def/198" - }, - { - "$ref": "https://example.com/def/199" - } - ], - "$defs": { - "definition_0": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/0", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_1": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/1", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_2": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/2", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_3": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/3", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_4": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/4", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_5": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/5", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_6": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/6", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_7": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/7", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_8": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/8", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_9": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/9", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_10": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/10", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_11": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/11", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_12": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/12", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_13": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/13", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_14": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/14", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_15": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/15", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_16": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/16", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_17": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/17", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_18": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/18", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_19": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/19", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_20": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/20", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_21": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/21", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_22": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/22", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_23": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/23", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_24": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/24", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_25": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/25", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_26": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/26", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_27": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/27", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_28": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/28", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_29": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/29", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_30": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/30", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_31": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/31", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_32": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/32", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_33": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/33", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_34": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/34", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_35": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/35", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_36": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/36", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_37": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/37", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_38": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/38", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_39": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/39", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_40": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/40", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_41": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/41", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_42": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/42", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_43": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/43", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_44": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/44", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_45": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/45", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_46": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/46", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_47": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/47", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_48": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/48", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_49": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/49", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_50": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/50", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_51": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/51", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_52": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/52", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_53": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/53", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_54": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/54", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_55": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/55", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_56": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/56", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_57": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/57", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_58": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/58", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_59": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/59", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_60": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/60", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_61": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/61", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_62": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/62", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_63": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/63", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_64": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/64", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_65": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/65", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_66": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/66", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_67": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/67", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_68": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/68", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_69": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/69", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_70": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/70", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_71": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/71", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_72": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/72", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_73": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/73", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_74": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/74", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_75": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/75", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_76": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/76", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_77": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/77", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_78": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/78", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_79": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/79", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_80": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/80", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_81": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/81", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_82": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/82", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_83": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/83", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_84": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/84", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_85": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/85", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_86": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/86", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_87": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/87", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_88": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/88", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_89": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/89", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_90": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/90", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_91": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/91", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_92": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/92", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_93": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/93", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_94": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/94", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_95": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/95", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_96": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/96", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_97": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/97", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_98": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/98", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_99": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/99", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_100": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/100", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_101": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/101", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_102": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/102", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_103": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/103", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_104": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/104", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_105": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/105", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_106": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/106", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_107": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/107", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_108": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/108", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_109": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/109", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_110": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/110", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_111": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/111", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_112": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/112", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_113": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/113", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_114": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/114", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_115": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/115", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_116": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/116", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_117": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/117", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_118": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/118", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_119": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/119", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_120": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/120", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_121": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/121", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_122": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/122", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_123": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/123", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_124": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/124", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_125": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/125", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_126": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/126", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_127": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/127", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_128": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/128", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_129": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/129", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_130": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/130", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_131": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/131", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_132": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/132", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_133": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/133", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_134": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/134", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_135": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/135", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_136": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/136", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_137": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/137", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_138": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/138", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_139": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/139", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_140": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/140", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_141": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/141", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_142": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/142", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_143": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/143", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_144": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/144", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_145": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/145", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_146": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/146", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_147": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/147", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_148": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/148", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_149": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/149", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_150": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/150", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_151": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/151", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_152": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/152", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_153": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/153", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_154": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/154", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_155": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/155", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_156": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/156", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_157": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/157", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_158": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/158", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_159": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/159", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_160": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/160", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_161": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/161", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_162": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/162", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_163": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/163", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_164": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/164", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_165": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/165", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_166": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/166", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_167": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/167", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_168": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/168", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_169": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/169", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_170": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/170", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_171": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/171", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_172": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/172", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_173": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/173", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_174": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/174", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_175": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/175", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_176": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/176", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_177": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/177", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_178": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/178", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_179": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/179", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_180": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/180", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_181": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/181", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_182": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/182", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_183": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/183", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_184": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/184", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_185": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/185", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_186": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/186", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_187": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/187", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_188": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/188", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_189": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/189", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_190": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/190", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_191": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/191", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_192": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/192", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_193": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/193", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_194": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/194", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_195": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/195", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_196": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/196", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_197": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/197", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_198": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/198", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - }, - "definition_199": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/def/199", - "type": "object", - "properties": { - "value": { - "type": "string" - } - } - } - } -} \ No newline at end of file diff --git a/benchmark/files/2020_12_many_invalid_external_refs.json b/benchmark/files/2020_12_many_invalid_external_refs.json deleted file mode 100644 index 9996c2c90..000000000 --- a/benchmark/files/2020_12_many_invalid_external_refs.json +++ /dev/null @@ -1,4784 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/benchmark-invalid-external-refs", - "title": "Benchmark schema with invalid external references", - "description": "A schema designed to benchmark the invalid_external_ref lint rule", - "examples": [ - {} - ], - "type": "object", - "properties": { - "level_00_branch_00": { - "type": "object", - "properties": { - "level_01_branch_00": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0000#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0001#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0002#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0003#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0004#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0005#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0006#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0007#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0008#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0009#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0010#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0011#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0012#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0013#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0014#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0015#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0016#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0017#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0018#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0019#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0020#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0021#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0022#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0023#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0024#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0025#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0026#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0027#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0028#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0029#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0030#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0031#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0032#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0033#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0034#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0035#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0036#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0037#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0038#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0039#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0040#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0041#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0042#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0043#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0044#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0045#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0046#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0047#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0048#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0049#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0050#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0051#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0052#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0053#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0054#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0055#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0056#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0057#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0058#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0059#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0060#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0061#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0062#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0063#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - }, - "level_01_branch_01": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0064#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0065#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0066#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0067#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0068#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0069#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0070#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0071#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0072#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0073#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0074#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0075#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0076#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0077#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0078#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0079#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0080#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0081#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0082#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0083#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0084#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0085#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0086#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0087#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0088#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0089#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0090#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0091#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0092#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0093#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0094#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0095#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0096#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0097#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0098#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0099#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0100#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0101#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0102#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0103#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0104#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0105#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0106#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0107#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0108#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0109#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0110#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0111#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0112#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0113#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0114#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0115#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0116#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0117#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0118#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0119#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0120#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0121#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0122#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0123#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0124#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0125#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0126#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0127#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - }, - "level_01_branch_02": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0128#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0129#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0130#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0131#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0132#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0133#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0134#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0135#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0136#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0137#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0138#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0139#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0140#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0141#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0142#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0143#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0144#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0145#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0146#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0147#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0148#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0149#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0150#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0151#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0152#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0153#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0154#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0155#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0156#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0157#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0158#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0159#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0160#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0161#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0162#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0163#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0164#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0165#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0166#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0167#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0168#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0169#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0170#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0171#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0172#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0173#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0174#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0175#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0176#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0177#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0178#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0179#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0180#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0181#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0182#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0183#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0184#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0185#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0186#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0187#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0188#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0189#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0190#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0191#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - }, - "level_01_branch_03": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0192#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0193#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0194#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0195#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0196#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0197#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0198#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0199#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0200#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0201#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0202#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0203#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0204#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0205#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0206#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0207#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0208#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0209#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0210#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0211#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0212#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0213#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0214#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0215#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0216#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0217#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0218#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0219#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0220#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0221#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0222#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0223#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0224#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0225#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0226#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0227#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0228#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0229#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0230#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0231#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0232#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0233#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0234#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0235#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0236#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0237#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0238#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0239#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0240#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0241#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0242#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0243#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0244#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0245#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0246#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0247#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0248#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0249#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0250#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0251#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0252#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0253#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0254#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0255#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - } - } - }, - "level_00_branch_01": { - "type": "object", - "properties": { - "level_01_branch_00": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0256#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0257#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0258#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0259#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0260#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0261#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0262#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0263#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0264#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0265#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0266#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0267#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0268#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0269#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0270#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0271#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0272#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0273#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0274#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0275#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0276#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0277#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0278#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0279#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0280#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0281#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0282#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0283#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0284#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0285#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0286#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0287#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0288#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0289#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0290#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0291#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0292#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0293#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0294#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0295#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0296#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0297#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0298#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0299#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0300#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0301#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0302#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0303#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0304#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0305#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0306#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0307#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0308#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0309#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0310#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0311#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0312#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0313#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0314#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0315#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0316#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0317#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0318#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0319#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - }, - "level_01_branch_01": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0320#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0321#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0322#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0323#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0324#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0325#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0326#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0327#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0328#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0329#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0330#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0331#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0332#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0333#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0334#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0335#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0336#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0337#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0338#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0339#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0340#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0341#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0342#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0343#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0344#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0345#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0346#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0347#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0348#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0349#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0350#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0351#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0352#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0353#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0354#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0355#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0356#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0357#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0358#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0359#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0360#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0361#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0362#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0363#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0364#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0365#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0366#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0367#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0368#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0369#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0370#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0371#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0372#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0373#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0374#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0375#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0376#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0377#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0378#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0379#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0380#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0381#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0382#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0383#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - }, - "level_01_branch_02": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0384#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0385#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0386#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0387#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0388#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0389#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0390#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0391#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0392#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0393#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0394#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0395#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0396#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0397#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0398#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0399#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0400#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0401#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0402#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0403#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0404#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0405#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0406#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0407#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0408#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0409#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0410#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0411#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0412#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0413#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0414#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0415#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0416#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0417#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0418#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0419#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0420#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0421#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0422#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0423#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0424#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0425#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0426#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0427#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0428#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0429#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0430#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0431#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0432#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0433#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0434#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0435#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0436#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0437#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0438#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0439#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0440#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0441#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0442#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0443#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0444#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0445#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0446#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0447#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - }, - "level_01_branch_03": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0448#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0449#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0450#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0451#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0452#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0453#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0454#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0455#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0456#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0457#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0458#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0459#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0460#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0461#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0462#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0463#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0464#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0465#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0466#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0467#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0468#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0469#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0470#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0471#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0472#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0473#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0474#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0475#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0476#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0477#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0478#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0479#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0480#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0481#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0482#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0483#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0484#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0485#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0486#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0487#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0488#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0489#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0490#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0491#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0492#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0493#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0494#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0495#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0496#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0497#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0498#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0499#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0500#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0501#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0502#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0503#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0504#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0505#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0506#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0507#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0508#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0509#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0510#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0511#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - } - } - }, - "level_00_branch_02": { - "type": "object", - "properties": { - "level_01_branch_00": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0512#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0513#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0514#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0515#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0516#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0517#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0518#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0519#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0520#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0521#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0522#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0523#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0524#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0525#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0526#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0527#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0528#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0529#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0530#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0531#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0532#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0533#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0534#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0535#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0536#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0537#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0538#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0539#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0540#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0541#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0542#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0543#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0544#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0545#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0546#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0547#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0548#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0549#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0550#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0551#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0552#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0553#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0554#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0555#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0556#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0557#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0558#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0559#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0560#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0561#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0562#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0563#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0564#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0565#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0566#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0567#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0568#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0569#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0570#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0571#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0572#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0573#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0574#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0575#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - }, - "level_01_branch_01": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0576#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0577#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0578#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0579#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0580#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0581#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0582#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0583#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0584#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0585#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0586#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0587#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0588#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0589#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0590#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0591#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0592#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0593#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0594#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0595#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0596#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0597#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0598#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0599#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0600#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0601#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0602#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0603#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0604#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0605#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0606#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0607#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0608#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0609#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0610#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0611#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0612#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0613#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0614#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0615#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0616#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0617#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0618#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0619#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0620#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0621#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0622#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0623#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0624#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0625#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0626#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0627#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0628#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0629#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0630#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0631#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0632#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0633#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0634#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0635#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0636#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0637#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0638#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0639#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - }, - "level_01_branch_02": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0640#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0641#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0642#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0643#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0644#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0645#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0646#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0647#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0648#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0649#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0650#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0651#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0652#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0653#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0654#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0655#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0656#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0657#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0658#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0659#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0660#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0661#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0662#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0663#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0664#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0665#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0666#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0667#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0668#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0669#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0670#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0671#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0672#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0673#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0674#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0675#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0676#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0677#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0678#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0679#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0680#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0681#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0682#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0683#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0684#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0685#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0686#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0687#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0688#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0689#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0690#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0691#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0692#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0693#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0694#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0695#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0696#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0697#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0698#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0699#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0700#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0701#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0702#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0703#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - }, - "level_01_branch_03": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0704#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0705#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0706#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0707#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0708#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0709#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0710#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0711#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0712#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0713#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0714#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0715#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0716#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0717#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0718#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0719#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0720#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0721#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0722#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0723#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0724#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0725#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0726#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0727#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0728#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0729#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0730#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0731#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0732#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0733#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0734#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0735#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0736#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0737#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0738#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0739#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0740#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0741#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0742#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0743#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0744#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0745#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0746#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0747#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0748#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0749#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0750#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0751#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0752#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0753#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0754#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0755#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0756#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0757#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0758#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0759#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0760#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0761#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0762#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0763#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0764#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0765#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0766#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0767#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - } - } - }, - "level_00_branch_03": { - "type": "object", - "properties": { - "level_01_branch_00": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0768#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0769#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0770#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0771#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0772#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0773#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0774#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0775#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0776#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0777#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0778#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0779#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0780#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0781#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0782#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0783#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0784#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0785#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0786#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0787#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0788#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0789#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0790#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0791#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0792#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0793#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0794#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0795#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0796#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0797#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0798#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0799#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0800#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0801#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0802#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0803#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0804#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0805#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0806#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0807#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0808#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0809#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0810#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0811#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0812#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0813#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0814#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0815#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0816#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0817#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0818#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0819#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0820#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0821#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0822#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0823#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0824#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0825#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0826#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0827#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0828#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0829#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0830#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0831#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - }, - "level_01_branch_01": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0832#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0833#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0834#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0835#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0836#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0837#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0838#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0839#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0840#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0841#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0842#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0843#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0844#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0845#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0846#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0847#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0848#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0849#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0850#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0851#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0852#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0853#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0854#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0855#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0856#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0857#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0858#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0859#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0860#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0861#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0862#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0863#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0864#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0865#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0866#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0867#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0868#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0869#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0870#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0871#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0872#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0873#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0874#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0875#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0876#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0877#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0878#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0879#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0880#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0881#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0882#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0883#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0884#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0885#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0886#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0887#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0888#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0889#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0890#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0891#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0892#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0893#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0894#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0895#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - }, - "level_01_branch_02": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0896#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0897#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0898#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0899#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0900#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0901#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0902#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0903#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0904#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0905#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0906#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0907#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0908#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0909#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0910#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0911#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0912#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0913#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0914#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0915#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0916#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0917#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0918#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0919#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0920#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0921#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0922#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0923#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0924#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0925#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0926#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0927#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0928#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0929#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0930#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0931#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0932#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0933#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0934#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0935#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0936#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0937#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0938#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0939#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0940#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0941#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0942#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0943#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0944#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0945#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0946#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0947#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0948#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0949#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0950#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0951#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0952#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0953#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0954#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0955#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0956#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0957#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0958#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0959#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - }, - "level_01_branch_03": { - "type": "object", - "properties": { - "level_02_branch_00": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0960#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0961#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0962#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0963#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0964#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0965#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0966#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0967#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0968#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0969#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0970#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0971#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0972#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0973#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0974#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0975#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_01": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0976#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0977#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0978#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0979#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0980#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0981#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0982#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0983#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0984#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0985#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0986#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0987#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0988#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0989#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0990#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0991#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_02": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0992#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0993#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0994#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0995#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/0996#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/0997#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/0998#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/0999#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/1000#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/1001#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/1002#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/1003#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/1004#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/1005#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/1006#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/1007#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - }, - "level_02_branch_03": { - "type": "object", - "properties": { - "level_03_branch_00": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/1008#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/1009#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/1010#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/1011#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_01": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/1012#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/1013#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/1014#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/1015#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_02": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/1016#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/1017#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/1018#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/1019#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - }, - "level_03_branch_03": { - "type": "object", - "properties": { - "level_04_branch_00": { - "$ref": "https://nonexistent.example.com/schemas/1020#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_01": { - "$ref": "https://nonexistent.example.com/schemas/1021#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_02": { - "$ref": "https://nonexistent.example.com/schemas/1022#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - }, - "level_04_branch_03": { - "$ref": "https://nonexistent.example.com/schemas/1023#/very/deep/nested/path/segment_00/very/deep/nested/path/segment_01/very/deep/nested/path/segment_02/very/deep/nested/path/segment_03/very/deep/nested/path/segment_04/very/deep/nested/path/segment_05/very/deep/nested/path/segment_06/very/deep/nested/path/segment_07/very/deep/nested/path/segment_08/very/deep/nested/path/segment_09/very/deep/nested/path/segment_10/very/deep/nested/path/segment_11/very/deep/nested/path/segment_12/very/deep/nested/path/segment_13/very/deep/nested/path/segment_14" - } - } - } - } - } - } - } - } - } - } -} diff --git a/benchmark/files/2020_12_many_resources.json b/benchmark/files/2020_12_many_resources.json deleted file mode 100644 index 923a64010..000000000 --- a/benchmark/files/2020_12_many_resources.json +++ /dev/null @@ -1,30496 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/root.json", - "type": "object", - "properties": { - "containers": { - "type": "array", - "items": { - "anyOf": [ - { - "$ref": "https://example.com/containers/container-0.json" - }, - { - "$ref": "https://example.com/containers/container-1.json" - }, - { - "$ref": "https://example.com/containers/container-2.json" - }, - { - "$ref": "https://example.com/containers/container-3.json" - }, - { - "$ref": "https://example.com/containers/container-4.json" - }, - { - "$ref": "https://example.com/containers/container-5.json" - }, - { - "$ref": "https://example.com/containers/container-6.json" - }, - { - "$ref": "https://example.com/containers/container-7.json" - }, - { - "$ref": "https://example.com/containers/container-8.json" - }, - { - "$ref": "https://example.com/containers/container-9.json" - } - ] - } - } - }, - "$defs": { - "https://example.com/types/type-0.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-0.json", - "title": "Type 0", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-1.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-1.json", - "title": "Type 1", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-2.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-2.json", - "title": "Type 2", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-3.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-3.json", - "title": "Type 3", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-4.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-4.json", - "title": "Type 4", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-5.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-5.json", - "title": "Type 5", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-6.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-6.json", - "title": "Type 6", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-7.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-7.json", - "title": "Type 7", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-8.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-8.json", - "title": "Type 8", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-9.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-9.json", - "title": "Type 9", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-10.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-10.json", - "title": "Type 10", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-11.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-11.json", - "title": "Type 11", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-12.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-12.json", - "title": "Type 12", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-13.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-13.json", - "title": "Type 13", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-14.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-14.json", - "title": "Type 14", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-15.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-15.json", - "title": "Type 15", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-16.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-16.json", - "title": "Type 16", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-17.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-17.json", - "title": "Type 17", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-18.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-18.json", - "title": "Type 18", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-19.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-19.json", - "title": "Type 19", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-20.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-20.json", - "title": "Type 20", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-21.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-21.json", - "title": "Type 21", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-22.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-22.json", - "title": "Type 22", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-23.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-23.json", - "title": "Type 23", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-24.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-24.json", - "title": "Type 24", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-25.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-25.json", - "title": "Type 25", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-26.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-26.json", - "title": "Type 26", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-27.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-27.json", - "title": "Type 27", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-28.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-28.json", - "title": "Type 28", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-29.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-29.json", - "title": "Type 29", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-30.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-30.json", - "title": "Type 30", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-31.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-31.json", - "title": "Type 31", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-32.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-32.json", - "title": "Type 32", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-33.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-33.json", - "title": "Type 33", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-34.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-34.json", - "title": "Type 34", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-35.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-35.json", - "title": "Type 35", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-36.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-36.json", - "title": "Type 36", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-37.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-37.json", - "title": "Type 37", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-38.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-38.json", - "title": "Type 38", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-39.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-39.json", - "title": "Type 39", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-40.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-40.json", - "title": "Type 40", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-41.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-41.json", - "title": "Type 41", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-42.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-42.json", - "title": "Type 42", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-43.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-43.json", - "title": "Type 43", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-44.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-44.json", - "title": "Type 44", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-45.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-45.json", - "title": "Type 45", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-46.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-46.json", - "title": "Type 46", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-47.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-47.json", - "title": "Type 47", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-48.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-48.json", - "title": "Type 48", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/types/type-49.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/types/type-49.json", - "title": "Type 49", - "anyOf": [ - { - "$ref": "#/$defs/value" - }, - { - "type": "object", - "properties": { - "value": { - "$ref": "#/$defs/value" - }, - "reason": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "additionalProperties": false - } - ], - "$defs": { - "value": { - "type": "string" - } - } - }, - "https://example.com/entities/entity-0.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-0.json", - "title": "Entity 0", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-1.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-1.json", - "title": "Entity 1", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-2.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-2.json", - "title": "Entity 2", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-3.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-3.json", - "title": "Entity 3", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-4.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-4.json", - "title": "Entity 4", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-5.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-5.json", - "title": "Entity 5", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-6.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-6.json", - "title": "Entity 6", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-7.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-7.json", - "title": "Entity 7", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-8.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-8.json", - "title": "Entity 8", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-9.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-9.json", - "title": "Entity 9", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-10.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-10.json", - "title": "Entity 10", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-11.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-11.json", - "title": "Entity 11", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-12.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-12.json", - "title": "Entity 12", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-13.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-13.json", - "title": "Entity 13", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-14.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-14.json", - "title": "Entity 14", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-15.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-15.json", - "title": "Entity 15", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-16.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-16.json", - "title": "Entity 16", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-17.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-17.json", - "title": "Entity 17", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-18.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-18.json", - "title": "Entity 18", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-19.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-19.json", - "title": "Entity 19", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-20.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-20.json", - "title": "Entity 20", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-21.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-21.json", - "title": "Entity 21", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-22.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-22.json", - "title": "Entity 22", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-23.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-23.json", - "title": "Entity 23", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-24.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-24.json", - "title": "Entity 24", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-25.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-25.json", - "title": "Entity 25", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-26.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-26.json", - "title": "Entity 26", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-27.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-27.json", - "title": "Entity 27", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-28.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-28.json", - "title": "Entity 28", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-29.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-29.json", - "title": "Entity 29", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-30.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-30.json", - "title": "Entity 30", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-31.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-31.json", - "title": "Entity 31", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-32.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-32.json", - "title": "Entity 32", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-33.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-33.json", - "title": "Entity 33", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-34.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-34.json", - "title": "Entity 34", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-35.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-35.json", - "title": "Entity 35", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-36.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-36.json", - "title": "Entity 36", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-37.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-37.json", - "title": "Entity 37", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-38.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-38.json", - "title": "Entity 38", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-39.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-39.json", - "title": "Entity 39", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-40.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-40.json", - "title": "Entity 40", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-41.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-41.json", - "title": "Entity 41", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-42.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-42.json", - "title": "Entity 42", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-43.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-43.json", - "title": "Entity 43", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-44.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-44.json", - "title": "Entity 44", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-45.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-45.json", - "title": "Entity 45", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-46.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-46.json", - "title": "Entity 46", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-47.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-47.json", - "title": "Entity 47", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-48.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-48.json", - "title": "Entity 48", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-49.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-49.json", - "title": "Entity 49", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-50.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-50.json", - "title": "Entity 50", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-51.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-51.json", - "title": "Entity 51", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-52.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-52.json", - "title": "Entity 52", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-53.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-53.json", - "title": "Entity 53", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-54.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-54.json", - "title": "Entity 54", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-55.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-55.json", - "title": "Entity 55", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-56.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-56.json", - "title": "Entity 56", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-57.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-57.json", - "title": "Entity 57", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-58.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-58.json", - "title": "Entity 58", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-59.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-59.json", - "title": "Entity 59", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-60.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-60.json", - "title": "Entity 60", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-61.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-61.json", - "title": "Entity 61", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-62.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-62.json", - "title": "Entity 62", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-63.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-63.json", - "title": "Entity 63", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-64.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-64.json", - "title": "Entity 64", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-65.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-65.json", - "title": "Entity 65", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-66.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-66.json", - "title": "Entity 66", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-67.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-67.json", - "title": "Entity 67", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-68.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-68.json", - "title": "Entity 68", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-69.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-69.json", - "title": "Entity 69", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-70.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-70.json", - "title": "Entity 70", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-71.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-71.json", - "title": "Entity 71", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-72.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-72.json", - "title": "Entity 72", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-73.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-73.json", - "title": "Entity 73", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-74.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-74.json", - "title": "Entity 74", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-75.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-75.json", - "title": "Entity 75", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-76.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-76.json", - "title": "Entity 76", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-77.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-77.json", - "title": "Entity 77", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-78.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-78.json", - "title": "Entity 78", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-79.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-79.json", - "title": "Entity 79", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-80.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-80.json", - "title": "Entity 80", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-81.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-81.json", - "title": "Entity 81", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-82.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-82.json", - "title": "Entity 82", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-83.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-83.json", - "title": "Entity 83", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-84.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-84.json", - "title": "Entity 84", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-85.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-85.json", - "title": "Entity 85", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-86.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-86.json", - "title": "Entity 86", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-87.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-87.json", - "title": "Entity 87", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-88.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-88.json", - "title": "Entity 88", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-89.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-89.json", - "title": "Entity 89", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-90.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-90.json", - "title": "Entity 90", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-91.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-91.json", - "title": "Entity 91", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-92.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-92.json", - "title": "Entity 92", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-93.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-93.json", - "title": "Entity 93", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-94.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-94.json", - "title": "Entity 94", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-95.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-95.json", - "title": "Entity 95", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-96.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-96.json", - "title": "Entity 96", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-97.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-97.json", - "title": "Entity 97", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-98.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-98.json", - "title": "Entity 98", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-99.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-99.json", - "title": "Entity 99", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-100.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-100.json", - "title": "Entity 100", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-101.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-101.json", - "title": "Entity 101", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-102.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-102.json", - "title": "Entity 102", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-103.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-103.json", - "title": "Entity 103", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-104.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-104.json", - "title": "Entity 104", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-105.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-105.json", - "title": "Entity 105", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-106.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-106.json", - "title": "Entity 106", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-107.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-107.json", - "title": "Entity 107", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-108.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-108.json", - "title": "Entity 108", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-109.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-109.json", - "title": "Entity 109", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-110.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-110.json", - "title": "Entity 110", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-111.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-111.json", - "title": "Entity 111", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-112.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-112.json", - "title": "Entity 112", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-113.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-113.json", - "title": "Entity 113", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-114.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-114.json", - "title": "Entity 114", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-115.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-115.json", - "title": "Entity 115", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-116.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-116.json", - "title": "Entity 116", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-117.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-117.json", - "title": "Entity 117", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-118.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-118.json", - "title": "Entity 118", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-119.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-119.json", - "title": "Entity 119", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-120.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-120.json", - "title": "Entity 120", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-121.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-121.json", - "title": "Entity 121", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-122.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-122.json", - "title": "Entity 122", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-123.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-123.json", - "title": "Entity 123", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-124.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-124.json", - "title": "Entity 124", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-125.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-125.json", - "title": "Entity 125", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-126.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-126.json", - "title": "Entity 126", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-127.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-127.json", - "title": "Entity 127", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-128.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-128.json", - "title": "Entity 128", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-129.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-129.json", - "title": "Entity 129", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-130.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-130.json", - "title": "Entity 130", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-131.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-131.json", - "title": "Entity 131", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-132.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-132.json", - "title": "Entity 132", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-133.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-133.json", - "title": "Entity 133", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-134.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-134.json", - "title": "Entity 134", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-135.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-135.json", - "title": "Entity 135", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-136.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-136.json", - "title": "Entity 136", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-137.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-137.json", - "title": "Entity 137", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-138.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-138.json", - "title": "Entity 138", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-139.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-139.json", - "title": "Entity 139", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-140.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-140.json", - "title": "Entity 140", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-141.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-141.json", - "title": "Entity 141", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-142.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-142.json", - "title": "Entity 142", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-143.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-143.json", - "title": "Entity 143", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-144.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-144.json", - "title": "Entity 144", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-145.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-145.json", - "title": "Entity 145", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-146.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-146.json", - "title": "Entity 146", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-147.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-147.json", - "title": "Entity 147", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-148.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-148.json", - "title": "Entity 148", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-149.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-149.json", - "title": "Entity 149", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-150.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-150.json", - "title": "Entity 150", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-151.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-151.json", - "title": "Entity 151", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-152.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-152.json", - "title": "Entity 152", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-153.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-153.json", - "title": "Entity 153", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-154.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-154.json", - "title": "Entity 154", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-155.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-155.json", - "title": "Entity 155", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-156.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-156.json", - "title": "Entity 156", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-157.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-157.json", - "title": "Entity 157", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-158.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-158.json", - "title": "Entity 158", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-159.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-159.json", - "title": "Entity 159", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-160.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-160.json", - "title": "Entity 160", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-161.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-161.json", - "title": "Entity 161", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-162.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-162.json", - "title": "Entity 162", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-163.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-163.json", - "title": "Entity 163", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-164.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-164.json", - "title": "Entity 164", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-165.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-165.json", - "title": "Entity 165", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-166.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-166.json", - "title": "Entity 166", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-167.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-167.json", - "title": "Entity 167", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-168.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-168.json", - "title": "Entity 168", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-169.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-169.json", - "title": "Entity 169", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-170.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-170.json", - "title": "Entity 170", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-171.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-171.json", - "title": "Entity 171", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-172.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-172.json", - "title": "Entity 172", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-173.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-173.json", - "title": "Entity 173", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-174.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-174.json", - "title": "Entity 174", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-175.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-175.json", - "title": "Entity 175", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-176.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-176.json", - "title": "Entity 176", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-177.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-177.json", - "title": "Entity 177", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-178.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-178.json", - "title": "Entity 178", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-179.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-179.json", - "title": "Entity 179", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-180.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-180.json", - "title": "Entity 180", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-181.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-181.json", - "title": "Entity 181", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-182.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-182.json", - "title": "Entity 182", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-183.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-183.json", - "title": "Entity 183", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-184.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-184.json", - "title": "Entity 184", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-185.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-185.json", - "title": "Entity 185", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-186.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-186.json", - "title": "Entity 186", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-187.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-187.json", - "title": "Entity 187", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-188.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-188.json", - "title": "Entity 188", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-189.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-189.json", - "title": "Entity 189", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-190.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-190.json", - "title": "Entity 190", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-191.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-191.json", - "title": "Entity 191", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-192.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-192.json", - "title": "Entity 192", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-193.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-193.json", - "title": "Entity 193", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-194.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-194.json", - "title": "Entity 194", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-195.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-195.json", - "title": "Entity 195", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-196.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-196.json", - "title": "Entity 196", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-197.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-197.json", - "title": "Entity 197", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-198.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-198.json", - "title": "Entity 198", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-199.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-199.json", - "title": "Entity 199", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-200.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-200.json", - "title": "Entity 200", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-201.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-201.json", - "title": "Entity 201", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-202.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-202.json", - "title": "Entity 202", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-203.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-203.json", - "title": "Entity 203", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-204.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-204.json", - "title": "Entity 204", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-205.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-205.json", - "title": "Entity 205", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-206.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-206.json", - "title": "Entity 206", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-207.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-207.json", - "title": "Entity 207", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-208.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-208.json", - "title": "Entity 208", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-209.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-209.json", - "title": "Entity 209", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-210.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-210.json", - "title": "Entity 210", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-211.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-211.json", - "title": "Entity 211", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-212.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-212.json", - "title": "Entity 212", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-213.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-213.json", - "title": "Entity 213", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-214.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-214.json", - "title": "Entity 214", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-215.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-215.json", - "title": "Entity 215", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-216.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-216.json", - "title": "Entity 216", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-217.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-217.json", - "title": "Entity 217", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-218.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-218.json", - "title": "Entity 218", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-219.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-219.json", - "title": "Entity 219", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-220.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-220.json", - "title": "Entity 220", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-221.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-221.json", - "title": "Entity 221", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-222.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-222.json", - "title": "Entity 222", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-223.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-223.json", - "title": "Entity 223", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-224.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-224.json", - "title": "Entity 224", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-225.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-225.json", - "title": "Entity 225", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-226.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-226.json", - "title": "Entity 226", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-227.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-227.json", - "title": "Entity 227", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-228.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-228.json", - "title": "Entity 228", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-229.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-229.json", - "title": "Entity 229", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-230.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-230.json", - "title": "Entity 230", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-231.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-231.json", - "title": "Entity 231", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-232.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-232.json", - "title": "Entity 232", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-233.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-233.json", - "title": "Entity 233", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-234.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-234.json", - "title": "Entity 234", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-235.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-235.json", - "title": "Entity 235", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-236.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-236.json", - "title": "Entity 236", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-237.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-237.json", - "title": "Entity 237", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-238.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-238.json", - "title": "Entity 238", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-239.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-239.json", - "title": "Entity 239", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-240.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-240.json", - "title": "Entity 240", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-241.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-241.json", - "title": "Entity 241", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-242.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-242.json", - "title": "Entity 242", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-243.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-243.json", - "title": "Entity 243", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-244.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-244.json", - "title": "Entity 244", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-245.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-245.json", - "title": "Entity 245", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-246.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-246.json", - "title": "Entity 246", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-247.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-247.json", - "title": "Entity 247", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-248.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-248.json", - "title": "Entity 248", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/entities/entity-249.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/entities/entity-249.json", - "title": "Entity 249", - "type": "object", - "properties": { - "property0": { - "title": "Property 0", - "description": "Description for property 0", - "$ref": "https://example.com/types/type-0.json" - }, - "property1": { - "title": "Property 1", - "description": "Description for property 1", - "$ref": "https://example.com/types/type-1.json" - }, - "property2": { - "title": "Property 2", - "description": "Description for property 2", - "$ref": "https://example.com/types/type-2.json" - }, - "property3": { - "title": "Property 3", - "description": "Description for property 3", - "$ref": "https://example.com/types/type-3.json" - }, - "property4": { - "title": "Property 4", - "description": "Description for property 4", - "$ref": "https://example.com/types/type-4.json" - }, - "property5": { - "title": "Property 5", - "description": "Description for property 5", - "$ref": "https://example.com/types/type-5.json" - }, - "property6": { - "title": "Property 6", - "description": "Description for property 6", - "$ref": "https://example.com/types/type-6.json" - }, - "property7": { - "title": "Property 7", - "description": "Description for property 7", - "$ref": "https://example.com/types/type-7.json" - }, - "property8": { - "title": "Property 8", - "description": "Description for property 8", - "$ref": "https://example.com/types/type-8.json" - }, - "property9": { - "title": "Property 9", - "description": "Description for property 9", - "$ref": "https://example.com/types/type-9.json" - }, - "property10": { - "title": "Property 10", - "description": "Description for property 10", - "$ref": "https://example.com/types/type-10.json" - }, - "property11": { - "title": "Property 11", - "description": "Description for property 11", - "$ref": "https://example.com/types/type-11.json" - }, - "property12": { - "title": "Property 12", - "description": "Description for property 12", - "$ref": "https://example.com/types/type-12.json" - }, - "property13": { - "title": "Property 13", - "description": "Description for property 13", - "$ref": "https://example.com/types/type-13.json" - }, - "property14": { - "title": "Property 14", - "description": "Description for property 14", - "$ref": "https://example.com/types/type-14.json" - }, - "property15": { - "title": "Property 15", - "description": "Description for property 15", - "$ref": "https://example.com/types/type-15.json" - }, - "property16": { - "title": "Property 16", - "description": "Description for property 16", - "$ref": "https://example.com/types/type-16.json" - }, - "property17": { - "title": "Property 17", - "description": "Description for property 17", - "$ref": "https://example.com/types/type-17.json" - }, - "property18": { - "title": "Property 18", - "description": "Description for property 18", - "$ref": "https://example.com/types/type-18.json" - }, - "property19": { - "title": "Property 19", - "description": "Description for property 19", - "$ref": "https://example.com/types/type-19.json" - } - }, - "additionalProperties": false - }, - "https://example.com/containers/container-0.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-0.json", - "title": "Container 0", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-0.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-1.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-2.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-3.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-4.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-5.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-6.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-7.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-8.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-9.json" - } - } - } - }, - "https://example.com/containers/container-1.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-1.json", - "title": "Container 1", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-10.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-11.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-12.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-13.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-14.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-15.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-16.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-17.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-18.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-19.json" - } - } - } - }, - "https://example.com/containers/container-2.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-2.json", - "title": "Container 2", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-20.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-21.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-22.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-23.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-24.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-25.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-26.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-27.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-28.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-29.json" - } - } - } - }, - "https://example.com/containers/container-3.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-3.json", - "title": "Container 3", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-30.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-31.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-32.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-33.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-34.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-35.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-36.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-37.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-38.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-39.json" - } - } - } - }, - "https://example.com/containers/container-4.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-4.json", - "title": "Container 4", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-40.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-41.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-42.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-43.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-44.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-45.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-46.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-47.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-48.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-49.json" - } - } - } - }, - "https://example.com/containers/container-5.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-5.json", - "title": "Container 5", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-50.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-51.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-52.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-53.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-54.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-55.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-56.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-57.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-58.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-59.json" - } - } - } - }, - "https://example.com/containers/container-6.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-6.json", - "title": "Container 6", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-60.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-61.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-62.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-63.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-64.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-65.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-66.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-67.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-68.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-69.json" - } - } - } - }, - "https://example.com/containers/container-7.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-7.json", - "title": "Container 7", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-70.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-71.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-72.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-73.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-74.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-75.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-76.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-77.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-78.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-79.json" - } - } - } - }, - "https://example.com/containers/container-8.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-8.json", - "title": "Container 8", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-80.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-81.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-82.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-83.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-84.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-85.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-86.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-87.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-88.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-89.json" - } - } - } - }, - "https://example.com/containers/container-9.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-9.json", - "title": "Container 9", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-90.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-91.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-92.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-93.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-94.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-95.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-96.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-97.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-98.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-99.json" - } - } - } - }, - "https://example.com/containers/container-10.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-10.json", - "title": "Container 10", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-100.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-101.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-102.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-103.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-104.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-105.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-106.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-107.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-108.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-109.json" - } - } - } - }, - "https://example.com/containers/container-11.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-11.json", - "title": "Container 11", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-110.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-111.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-112.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-113.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-114.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-115.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-116.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-117.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-118.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-119.json" - } - } - } - }, - "https://example.com/containers/container-12.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-12.json", - "title": "Container 12", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-120.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-121.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-122.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-123.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-124.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-125.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-126.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-127.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-128.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-129.json" - } - } - } - }, - "https://example.com/containers/container-13.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-13.json", - "title": "Container 13", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-130.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-131.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-132.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-133.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-134.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-135.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-136.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-137.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-138.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-139.json" - } - } - } - }, - "https://example.com/containers/container-14.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-14.json", - "title": "Container 14", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-140.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-141.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-142.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-143.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-144.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-145.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-146.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-147.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-148.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-149.json" - } - } - } - }, - "https://example.com/containers/container-15.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-15.json", - "title": "Container 15", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-150.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-151.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-152.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-153.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-154.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-155.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-156.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-157.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-158.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-159.json" - } - } - } - }, - "https://example.com/containers/container-16.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-16.json", - "title": "Container 16", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-160.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-161.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-162.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-163.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-164.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-165.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-166.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-167.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-168.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-169.json" - } - } - } - }, - "https://example.com/containers/container-17.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-17.json", - "title": "Container 17", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-170.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-171.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-172.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-173.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-174.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-175.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-176.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-177.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-178.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-179.json" - } - } - } - }, - "https://example.com/containers/container-18.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-18.json", - "title": "Container 18", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-180.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-181.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-182.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-183.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-184.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-185.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-186.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-187.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-188.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-189.json" - } - } - } - }, - "https://example.com/containers/container-19.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-19.json", - "title": "Container 19", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-190.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-191.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-192.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-193.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-194.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-195.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-196.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-197.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-198.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-199.json" - } - } - } - }, - "https://example.com/containers/container-20.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-20.json", - "title": "Container 20", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-200.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-201.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-202.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-203.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-204.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-205.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-206.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-207.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-208.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-209.json" - } - } - } - }, - "https://example.com/containers/container-21.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-21.json", - "title": "Container 21", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-210.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-211.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-212.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-213.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-214.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-215.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-216.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-217.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-218.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-219.json" - } - } - } - }, - "https://example.com/containers/container-22.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-22.json", - "title": "Container 22", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-220.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-221.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-222.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-223.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-224.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-225.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-226.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-227.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-228.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-229.json" - } - } - } - }, - "https://example.com/containers/container-23.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-23.json", - "title": "Container 23", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-230.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-231.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-232.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-233.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-234.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-235.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-236.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-237.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-238.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-239.json" - } - } - } - }, - "https://example.com/containers/container-24.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/containers/container-24.json", - "title": "Container 24", - "type": "object", - "properties": { - "items0": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-240.json" - } - }, - "items1": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-241.json" - } - }, - "items2": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-242.json" - } - }, - "items3": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-243.json" - } - }, - "items4": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-244.json" - } - }, - "items5": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-245.json" - } - }, - "items6": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-246.json" - } - }, - "items7": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-247.json" - } - }, - "items8": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-248.json" - } - }, - "items9": { - "type": "array", - "items": { - "$ref": "https://example.com/entities/entity-249.json" - } - } - } - } - } -} diff --git a/benchmark/files/draft7_w3c_wot_td_v1_1.json b/benchmark/files/draft7_w3c_wot_td_v1_1.json deleted file mode 100644 index 178540ec2..000000000 --- a/benchmark/files/draft7_w3c_wot_td_v1_1.json +++ /dev/null @@ -1,1362 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://schemas.sourcemeta.com/w3c/wot/v1.1/thing-description", - "title": "Thing Description", - "description": "JSON Schema for validating TD instances against the TD information model. TD instances can be with or without terms that have default values", - "type": "object", - "required": [ "title", "security", "securityDefinitions", "@context" ], - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "title": { - "$ref": "#/definitions/title" - }, - "titles": { - "$ref": "#/definitions/titles" - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/property_element" - } - }, - "actions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/action_element" - } - }, - "events": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/event_element" - } - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "version": { - "type": "object", - "required": [ "instance" ], - "properties": { - "instance": { - "type": "string" - } - } - }, - "links": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/link_element" - }, - { - "$ref": "#/definitions/icon_link_element" - } - ] - } - }, - "forms": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/form_element_root" - } - }, - "base": { - "$ref": "#/definitions/anyUri" - }, - "securityDefinitions": { - "type": "object", - "minProperties": 1, - "additionalProperties": { - "$ref": "#/definitions/securityScheme" - } - }, - "schemaDefinitions": { - "type": "object", - "minProperties": 1, - "additionalProperties": { - "$ref": "#/definitions/dataSchema" - } - }, - "support": { - "$ref": "#/definitions/anyUri" - }, - "created": { - "type": "string", - "format": "date-time" - }, - "modified": { - "type": "string", - "format": "date-time" - }, - "profile": { - "oneOf": [ - { - "$ref": "#/definitions/anyUri" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/anyUri" - } - } - ] - }, - "security": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "minItems": 1, - "items": { - "type": "string" - } - } - ] - }, - "uriVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/dataSchema" - } - }, - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "@context": { - "$ref": "#/definitions/thing-context" - } - }, - "additionalProperties": true, - "definitions": { - "anyUri": { - "type": "string" - }, - "description": { - "type": "string" - }, - "descriptions": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "title": { - "type": "string" - }, - "titles": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "security": { - "oneOf": [ - { - "type": "array", - "minItems": 1, - "items": { - "type": "string" - } - }, - { - "type": "string" - } - ] - }, - "scopes": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "string" - } - ] - }, - "subprotocol": { - "examples": [ "longpoll", "websub", "sse" ], - "type": "string" - }, - "thing-context-td-uri-v1": { - "type": "string", - "const": "https://www.w3.org/2019/wot/td/v1" - }, - "thing-context-td-uri-v1.1": { - "type": "string", - "const": "https://www.w3.org/2022/wot/td/v1.1" - }, - "thing-context-td-uri-temp": { - "type": "string", - "const": "http://www.w3.org/ns/td" - }, - "thing-context": { - "anyOf": [ - { - "$comment": "New context URI with other vocabularies after it but not the old one", - "type": "array", - "items": [ - { - "$ref": "#/definitions/thing-context-td-uri-v1.1" - } - ], - "additionalItems": { - "anyOf": [ - { - "$ref": "#/definitions/anyUri" - }, - { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - ], - "not": { - "$ref": "#/definitions/thing-context-td-uri-v1" - } - } - }, - { - "$comment": "Only the new context URI", - "$ref": "#/definitions/thing-context-td-uri-v1.1" - }, - { - "$comment": "Old context URI, followed by the new one and possibly other vocabularies. minItems and contains are required since prefixItems does not say all items should be provided", - "type": "array", - "minItems": 2, - "items": [ - { - "$ref": "#/definitions/thing-context-td-uri-v1" - }, - { - "$ref": "#/definitions/thing-context-td-uri-v1.1" - } - ], - "additionalItems": { - "anyOf": [ - { - "$ref": "#/definitions/anyUri" - }, - { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - ] - } - }, - { - "$comment": "Old context URI, followed by possibly other vocabularies. minItems and contains are required since prefixItems does not say all items should be provided", - "type": "array", - "minItems": 1, - "items": [ - { - "$ref": "#/definitions/thing-context-td-uri-v1" - } - ], - "additionalItems": { - "anyOf": [ - { - "$ref": "#/definitions/anyUri" - }, - { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - ] - } - }, - { - "$comment": "Only the old context URI", - "$ref": "#/definitions/thing-context-td-uri-v1" - } - ] - }, - "bcp47_string": { - "type": "string", - "pattern": "^(((([A-Za-z]{2,3}(-([A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-([A-Za-z]{4}))?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-([0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(x(-[A-Za-z0-9]{1,8})+))?)|(x(-[A-Za-z0-9]{1,8})+)|((en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang)))$" - }, - "type_declaration": { - "oneOf": [ - { - "type": "string", - "not": { - "const": "tm:ThingModel" - } - }, - { - "type": "array", - "items": { - "type": "string", - "not": { - "const": "tm:ThingModel" - } - } - } - ] - }, - "dataSchema-type": { - "type": "string", - "enum": [ - "boolean", - "integer", - "number", - "string", - "object", - "array", - "null" - ] - }, - "dataSchema": { - "type": "object", - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "title": { - "$ref": "#/definitions/title" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "titles": { - "$ref": "#/definitions/titles" - }, - "writeOnly": { - "type": "boolean" - }, - "readOnly": { - "type": "boolean" - }, - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/dataSchema" - } - }, - "unit": { - "type": "string" - }, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - "format": { - "type": "string" - }, - "const": {}, - "default": {}, - "contentEncoding": { - "type": "string" - }, - "contentMediaType": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/dataSchema-type" - }, - "items": { - "oneOf": [ - { - "$ref": "#/definitions/dataSchema" - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/dataSchema" - } - } - ] - }, - "maxItems": { - "type": "integer", - "minimum": 0 - }, - "minItems": { - "type": "integer", - "minimum": 0 - }, - "minimum": { - "type": "number" - }, - "maximum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minLength": { - "type": "integer", - "minimum": 0 - }, - "maxLength": { - "type": "integer", - "minimum": 0 - }, - "multipleOf": { - "$ref": "#/definitions/multipleOfDefinition" - }, - "properties": { - "additionalProperties": { - "$ref": "#/definitions/dataSchema" - } - }, - "required": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "additionalResponsesDefinition": { - "type": "array", - "items": { - "type": "object", - "properties": { - "contentType": { - "type": "string" - }, - "schema": { - "type": "string" - }, - "success": { - "type": "boolean" - } - } - } - }, - "multipleOfDefinition": { - "type": [ "integer", "number" ], - "exclusiveMinimum": 0 - }, - "expectedResponse": { - "type": "object", - "required": [ "contentType" ], - "properties": { - "contentType": { - "type": "string" - } - } - }, - "form_element_base": { - "type": "object", - "required": [ "href" ], - "properties": { - "op": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - }, - "href": { - "$ref": "#/definitions/anyUri" - }, - "contentType": { - "type": "string" - }, - "contentCoding": { - "type": "string" - }, - "subprotocol": { - "$ref": "#/definitions/subprotocol" - }, - "security": { - "$ref": "#/definitions/security" - }, - "scopes": { - "$ref": "#/definitions/scopes" - }, - "response": { - "$ref": "#/definitions/expectedResponse" - }, - "additionalResponses": { - "$ref": "#/definitions/additionalResponsesDefinition" - } - }, - "additionalProperties": true - }, - "form_element_property": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/form_element_base" - } - ], - "properties": { - "op": { - "oneOf": [ - { - "type": "string", - "enum": [ - "readproperty", - "writeproperty", - "observeproperty", - "unobserveproperty" - ] - }, - { - "type": "array", - "minItems": 1, - "items": { - "type": "string", - "enum": [ - "readproperty", - "writeproperty", - "observeproperty", - "unobserveproperty" - ] - } - } - ] - } - }, - "additionalProperties": true - }, - "form_element_action": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/form_element_base" - } - ], - "properties": { - "op": { - "oneOf": [ - { - "type": "string", - "enum": [ "invokeaction", "queryaction", "cancelaction" ] - }, - { - "type": "array", - "minItems": 1, - "items": { - "type": "string", - "enum": [ "invokeaction", "queryaction", "cancelaction" ] - } - } - ] - } - }, - "additionalProperties": true - }, - "form_element_event": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/form_element_base" - } - ], - "properties": { - "op": { - "oneOf": [ - { - "type": "string", - "enum": [ "subscribeevent", "unsubscribeevent" ] - }, - { - "type": "array", - "minItems": 1, - "items": { - "type": "string", - "enum": [ "subscribeevent", "unsubscribeevent" ] - } - } - ] - } - }, - "additionalProperties": true - }, - "form_element_root": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/form_element_base" - } - ], - "required": [ "op" ], - "properties": { - "op": { - "oneOf": [ - { - "type": "string", - "enum": [ - "readallproperties", - "writeallproperties", - "readmultipleproperties", - "writemultipleproperties", - "observeallproperties", - "unobserveallproperties", - "queryallactions", - "subscribeallevents", - "unsubscribeallevents" - ] - }, - { - "type": "array", - "minItems": 1, - "items": { - "type": "string", - "enum": [ - "readallproperties", - "writeallproperties", - "readmultipleproperties", - "writemultipleproperties", - "observeallproperties", - "unobserveallproperties", - "queryallactions", - "subscribeallevents", - "unsubscribeallevents" - ] - } - } - ] - } - }, - "additionalProperties": true - }, - "form": { - "$comment": "This is NOT for validation purposes but for automatic generation of TS types. For more info, please see: https://github.com/w3c/wot-thing-description/pull/1319#issuecomment-994950057", - "oneOf": [ - { - "$ref": "#/definitions/form_element_property" - }, - { - "$ref": "#/definitions/form_element_action" - }, - { - "$ref": "#/definitions/form_element_event" - }, - { - "$ref": "#/definitions/form_element_root" - } - ] - }, - "property_element": { - "type": "object", - "required": [ "forms" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "title": { - "$ref": "#/definitions/title" - }, - "titles": { - "$ref": "#/definitions/titles" - }, - "forms": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/form_element_property" - } - }, - "uriVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/dataSchema" - } - }, - "observable": { - "type": "boolean" - }, - "writeOnly": { - "type": "boolean" - }, - "readOnly": { - "type": "boolean" - }, - "oneOf": { - "type": "array", - "items": { - "$ref": "#/definitions/dataSchema" - } - }, - "unit": { - "type": "string" - }, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - "format": { - "type": "string" - }, - "const": {}, - "default": {}, - "type": { - "$ref": "#/definitions/dataSchema-type" - }, - "items": { - "oneOf": [ - { - "$ref": "#/definitions/dataSchema" - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/dataSchema" - } - } - ] - }, - "maxItems": { - "type": "integer", - "minimum": 0 - }, - "minItems": { - "type": "integer", - "minimum": 0 - }, - "minimum": { - "type": "number" - }, - "maximum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minLength": { - "type": "integer", - "minimum": 0 - }, - "maxLength": { - "type": "integer", - "minimum": 0 - }, - "multipleOf": { - "$ref": "#/definitions/multipleOfDefinition" - }, - "properties": { - "additionalProperties": { - "$ref": "#/definitions/dataSchema" - } - }, - "required": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": true - }, - "action_element": { - "type": "object", - "required": [ "forms" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "title": { - "$ref": "#/definitions/title" - }, - "titles": { - "$ref": "#/definitions/titles" - }, - "forms": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/form_element_action" - } - }, - "uriVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/dataSchema" - } - }, - "input": { - "$ref": "#/definitions/dataSchema" - }, - "output": { - "$ref": "#/definitions/dataSchema" - }, - "safe": { - "type": "boolean" - }, - "idempotent": { - "type": "boolean" - }, - "synchronous": { - "type": "boolean" - } - }, - "additionalProperties": true - }, - "event_element": { - "type": "object", - "required": [ "forms" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "title": { - "$ref": "#/definitions/title" - }, - "titles": { - "$ref": "#/definitions/titles" - }, - "forms": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/form_element_event" - } - }, - "uriVariables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/dataSchema" - } - }, - "subscription": { - "$ref": "#/definitions/dataSchema" - }, - "data": { - "$ref": "#/definitions/dataSchema" - }, - "dataResponse": { - "$ref": "#/definitions/dataSchema" - }, - "cancellation": { - "$ref": "#/definitions/dataSchema" - } - }, - "additionalProperties": true - }, - "base_link_element": { - "type": "object", - "required": [ "href" ], - "properties": { - "href": { - "$ref": "#/definitions/anyUri" - }, - "type": { - "type": "string" - }, - "rel": { - "type": "string" - }, - "anchor": { - "$ref": "#/definitions/anyUri" - }, - "hreflang": { - "anyOf": [ - { - "$ref": "#/definitions/bcp47_string" - }, - { - "type": "array", - "items": { - "$ref": "#/definitions/bcp47_string" - } - } - ] - } - }, - "additionalProperties": true - }, - "link_element": { - "allOf": [ - { - "$ref": "#/definitions/base_link_element" - }, - { - "not": { - "description": "A basic link element should not contain sizes", - "type": "object", - "required": [ "sizes" ], - "properties": { - "sizes": {} - } - } - }, - { - "not": { - "description": "A basic link element should not contain icon or tm:extends", - "required": [ "rel" ], - "properties": { - "rel": { - "enum": [ "icon", "tm:extends" ] - } - } - } - } - ] - }, - "icon_link_element": { - "allOf": [ - { - "$ref": "#/definitions/base_link_element" - }, - { - "required": [ "rel" ], - "properties": { - "rel": { - "const": "icon" - }, - "sizes": { - "type": "string", - "pattern": "[0-9]*x[0-9]+" - } - } - } - ] - }, - "additionalSecurityScheme": { - "description": "Applies to additional SecuritySchemes not defined in the WoT TD specification.", - "$comment": "Additional SecuritySchemes should always be defined via a context extension, using a prefixed value for the scheme. This prefix (e.g. 'ace', see the example below) must contain at least one character in order to reference a valid JSON-LD context extension.", - "examples": [ - { - "scheme": "ace:ACESecurityScheme", - "ace:as": "coaps://as.example.com/token", - "ace:audience": "coaps://rs.example.com", - "ace:scopes": [ "limited", "special" ], - "ace:cnonce": true - } - ], - "type": "object", - "required": [ "scheme" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "proxy": { - "$ref": "#/definitions/anyUri" - }, - "scheme": { - "type": "string", - "pattern": ".+:.*" - } - }, - "additionalProperties": true - }, - "noSecurityScheme": { - "type": "object", - "required": [ "scheme" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "proxy": { - "$ref": "#/definitions/anyUri" - }, - "scheme": { - "type": "string", - "enum": [ "nosec" ] - } - }, - "additionalProperties": true - }, - "autoSecurityScheme": { - "type": "object", - "not": { - "required": [ "name" ] - }, - "required": [ "scheme" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "proxy": { - "$ref": "#/definitions/anyUri" - }, - "scheme": { - "type": "string", - "enum": [ "auto" ] - } - }, - "additionalProperties": true - }, - "comboSecurityScheme": { - "oneOf": [ - { - "type": "object", - "required": [ "scheme", "oneOf" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "proxy": { - "$ref": "#/definitions/anyUri" - }, - "scheme": { - "type": "string", - "enum": [ "combo" ] - }, - "oneOf": { - "type": "array", - "minItems": 2, - "items": { - "type": "string" - } - } - }, - "additionalProperties": true - }, - { - "type": "object", - "required": [ "scheme", "allOf" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "proxy": { - "$ref": "#/definitions/anyUri" - }, - "scheme": { - "type": "string", - "enum": [ "combo" ] - }, - "allOf": { - "type": "array", - "minItems": 2, - "items": { - "type": "string" - } - } - }, - "additionalProperties": true - } - ] - }, - "basicSecurityScheme": { - "type": "object", - "required": [ "scheme" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "proxy": { - "$ref": "#/definitions/anyUri" - }, - "scheme": { - "type": "string", - "enum": [ "basic" ] - }, - "in": { - "type": "string", - "enum": [ "header", "query", "body", "cookie", "auto" ] - }, - "name": { - "type": "string" - } - }, - "additionalProperties": true - }, - "digestSecurityScheme": { - "type": "object", - "required": [ "scheme" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "proxy": { - "$ref": "#/definitions/anyUri" - }, - "scheme": { - "type": "string", - "enum": [ "digest" ] - }, - "qop": { - "type": "string", - "enum": [ "auth", "auth-int" ] - }, - "in": { - "type": "string", - "enum": [ "header", "query", "body", "cookie", "auto" ] - }, - "name": { - "type": "string" - } - }, - "additionalProperties": true - }, - "apiKeySecurityScheme": { - "type": "object", - "required": [ "scheme" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "proxy": { - "$ref": "#/definitions/anyUri" - }, - "scheme": { - "type": "string", - "enum": [ "apikey" ] - }, - "in": { - "type": "string", - "enum": [ "header", "query", "body", "cookie", "uri", "auto" ] - }, - "name": { - "type": "string" - } - }, - "additionalProperties": true - }, - "bearerSecurityScheme": { - "type": "object", - "required": [ "scheme" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "proxy": { - "$ref": "#/definitions/anyUri" - }, - "scheme": { - "type": "string", - "enum": [ "bearer" ] - }, - "authorization": { - "$ref": "#/definitions/anyUri" - }, - "alg": { - "type": "string" - }, - "format": { - "type": "string" - }, - "in": { - "type": "string", - "enum": [ "header", "query", "body", "cookie", "auto" ] - }, - "name": { - "type": "string" - } - }, - "additionalProperties": true - }, - "pskSecurityScheme": { - "type": "object", - "required": [ "scheme" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "proxy": { - "$ref": "#/definitions/anyUri" - }, - "scheme": { - "type": "string", - "enum": [ "psk" ] - }, - "identity": { - "type": "string" - } - }, - "additionalProperties": true - }, - "oAuth2SecurityScheme": { - "type": "object", - "required": [ "scheme" ], - "properties": { - "@type": { - "$ref": "#/definitions/type_declaration" - }, - "description": { - "$ref": "#/definitions/description" - }, - "descriptions": { - "$ref": "#/definitions/descriptions" - }, - "proxy": { - "$ref": "#/definitions/anyUri" - }, - "scheme": { - "type": "string", - "enum": [ "oauth2" ] - }, - "authorization": { - "$ref": "#/definitions/anyUri" - }, - "token": { - "$ref": "#/definitions/anyUri" - }, - "refresh": { - "$ref": "#/definitions/anyUri" - }, - "scopes": { - "oneOf": [ - { - "type": "array", - "items": { - "type": "string" - } - }, - { - "type": "string" - } - ] - }, - "flow": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "string", - "enum": [ "code", "client" ] - } - ] - } - }, - "additionalProperties": true - }, - "securityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/noSecurityScheme" - }, - { - "$ref": "#/definitions/autoSecurityScheme" - }, - { - "$ref": "#/definitions/comboSecurityScheme" - }, - { - "$ref": "#/definitions/basicSecurityScheme" - }, - { - "$ref": "#/definitions/digestSecurityScheme" - }, - { - "$ref": "#/definitions/apiKeySecurityScheme" - }, - { - "$ref": "#/definitions/bearerSecurityScheme" - }, - { - "$ref": "#/definitions/pskSecurityScheme" - }, - { - "$ref": "#/definitions/oAuth2SecurityScheme" - }, - { - "$ref": "#/definitions/additionalSecurityScheme" - } - ] - } - }, - "version": "1.1-12-March-2025" -} diff --git a/benchmark/jsonschema.cc b/benchmark/jsonschema.cc deleted file mode 100644 index b8181888e..000000000 --- a/benchmark/jsonschema.cc +++ /dev/null @@ -1,233 +0,0 @@ -#include - -#include // assert -#include // std::filesystem -#include // std::vector - -#include -#include -#include - -static void Schema_Frame_WoT_References(benchmark::State &state) { - const auto schema{ - sourcemeta::core::read_json(std::filesystem::path{CURRENT_DIRECTORY} / - "files" / "draft7_w3c_wot_td_v1_1.json")}; - - for (auto _ : state) { - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(schema, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - benchmark::DoNotOptimize(frame); - } -} - -static void Schema_Frame_OMC_References(benchmark::State &state) { - const auto schema{ - sourcemeta::core::read_json(std::filesystem::path{CURRENT_DIRECTORY} / - "files" / "2019_09_omc_json_v2.json")}; - - for (auto _ : state) { - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(schema, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - benchmark::DoNotOptimize(frame); - } -} - -static void Schema_Frame_OMC_Locations(benchmark::State &state) { - const auto schema{ - sourcemeta::core::read_json(std::filesystem::path{CURRENT_DIRECTORY} / - "files" / "2019_09_omc_json_v2.json")}; - - for (auto _ : state) { - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - frame.analyse(schema, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - benchmark::DoNotOptimize(frame); - } -} - -static void Schema_Frame_ISO_Language_Locations(benchmark::State &state) { - const auto schema{sourcemeta::core::read_json( - std::filesystem::path{CURRENT_DIRECTORY} / "files" / - "2020_12_iso_language_2023_set_3.json")}; - - for (auto _ : state) { - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - frame.analyse(schema, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - benchmark::DoNotOptimize(frame); - } -} - -static void Schema_Frame_KrakenD_References(benchmark::State &state) { - const auto schema{ - sourcemeta::core::read_json(std::filesystem::path{CURRENT_DIRECTORY} / - "files" / "2019_09_krakend.json")}; - - for (auto _ : state) { - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(schema, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - benchmark::DoNotOptimize(frame); - } -} - -static void Schema_Frame_KrakenD_Reachable(benchmark::State &state) { - const auto schema{ - sourcemeta::core::read_json(std::filesystem::path{CURRENT_DIRECTORY} / - "files" / "2019_09_krakend.json")}; - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - for (auto _ : state) { - state.PauseTiming(); - frame.reset(); - frame.analyse(schema, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - state.ResumeTiming(); - - for (const auto &entry : frame.locations()) { - if (entry.second.type == - sourcemeta::core::SchemaFrame::LocationType::Pointer) { - continue; - } - - for (const auto &subentry : frame.locations()) { - if (subentry.second.type == - sourcemeta::core::SchemaFrame::LocationType::Resource || - subentry.second.type == - sourcemeta::core::SchemaFrame::LocationType::Subschema) { - auto result{frame.is_reachable(subentry.second, entry.second, - sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)}; - benchmark::DoNotOptimize(result); - } - } - } - } -} - -static void Schema_Iterator_ISO_Language(benchmark::State &state) { - const auto schema{sourcemeta::core::read_json( - std::filesystem::path{CURRENT_DIRECTORY} / "files" / - "2020_12_iso_language_2023_set_3.json")}; - - for (auto _ : state) { - sourcemeta::core::SchemaIterator iterator{ - schema, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver}; - auto subschema_count = static_cast( - std::distance(iterator.cbegin(), iterator.cend())); - benchmark::DoNotOptimize(subschema_count); - } -} - -static void -Schema_Frame_ISO_Language_Locations_To_JSON(benchmark::State &state) { - sourcemeta::core::PointerPositionTracker tracker; - sourcemeta::core::JSON schema{nullptr}; - sourcemeta::core::read_json(std::filesystem::path{CURRENT_DIRECTORY} / - "files" / - "2020_12_iso_language_2023_set_3.json", - schema, std::ref(tracker)); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - frame.analyse(schema, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - for (auto _ : state) { - auto result{frame.to_json(tracker)}; - assert(result.is_object()); - benchmark::DoNotOptimize(result); - } -} - -static void Schema_Tracker_ISO_Language(benchmark::State &state) { - for (auto _ : state) { - sourcemeta::core::PointerPositionTracker tracker; - sourcemeta::core::JSON schema{nullptr}; - sourcemeta::core::read_json(std::filesystem::path{CURRENT_DIRECTORY} / - "files" / - "2020_12_iso_language_2023_set_3.json", - schema, std::ref(tracker)); - assert(schema.is_object()); - benchmark::DoNotOptimize(schema); - } -} - -static void Schema_Tracker_ISO_Language_To_JSON(benchmark::State &state) { - sourcemeta::core::PointerPositionTracker tracker; - sourcemeta::core::JSON schema{nullptr}; - sourcemeta::core::read_json(std::filesystem::path{CURRENT_DIRECTORY} / - "files" / - "2020_12_iso_language_2023_set_3.json", - schema, std::ref(tracker)); - - for (auto _ : state) { - auto result{sourcemeta::core::to_json(tracker)}; - assert(result.is_object()); - benchmark::DoNotOptimize(result); - } -} - -static void Schema_Format_ISO_Language_To_JSON(benchmark::State &state) { - for (auto _ : state) { - state.PauseTiming(); - auto schema{sourcemeta::core::read_json( - std::filesystem::path{CURRENT_DIRECTORY} / "files" / - "2020_12_iso_language_2023_set_3.json")}; - state.ResumeTiming(); - sourcemeta::core::format(schema, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - assert(schema.is_object()); - } -} - -static void Schema_Bundle_Meta_2020_12(benchmark::State &state) { - for (auto _ : state) { - state.PauseTiming(); - auto schema{sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/schema") - .value()}; - state.ResumeTiming(); - sourcemeta::core::bundle(schema, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - benchmark::DoNotOptimize(schema); - } -} - -static void Schema_Frame_Many_Resources_References(benchmark::State &state) { - const auto schema{ - sourcemeta::core::read_json(std::filesystem::path{CURRENT_DIRECTORY} / - "files" / "2020_12_many_resources.json")}; - - for (auto _ : state) { - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(schema, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - benchmark::DoNotOptimize(frame); - } -} - -BENCHMARK(Schema_Frame_WoT_References); -BENCHMARK(Schema_Frame_OMC_References); -BENCHMARK(Schema_Frame_OMC_Locations); -BENCHMARK(Schema_Frame_ISO_Language_Locations); -BENCHMARK(Schema_Frame_KrakenD_References); -BENCHMARK(Schema_Frame_KrakenD_Reachable); -BENCHMARK(Schema_Iterator_ISO_Language); -BENCHMARK(Schema_Frame_ISO_Language_Locations_To_JSON); -BENCHMARK(Schema_Tracker_ISO_Language); -BENCHMARK(Schema_Tracker_ISO_Language_To_JSON); -BENCHMARK(Schema_Format_ISO_Language_To_JSON); -BENCHMARK(Schema_Bundle_Meta_2020_12); -BENCHMARK(Schema_Frame_Many_Resources_References); diff --git a/config.cmake.in b/config.cmake.in index 1b2c336e0..4f73aa20f 100644 --- a/config.cmake.in +++ b/config.cmake.in @@ -22,7 +22,6 @@ if(NOT SOURCEMETA_CORE_COMPONENTS) list(APPEND SOURCEMETA_CORE_COMPONENTS json) list(APPEND SOURCEMETA_CORE_COMPONENTS jsonl) list(APPEND SOURCEMETA_CORE_COMPONENTS jsonpointer) - list(APPEND SOURCEMETA_CORE_COMPONENTS jsonschema) list(APPEND SOURCEMETA_CORE_COMPONENTS yaml) list(APPEND SOURCEMETA_CORE_COMPONENTS jsonrpc) list(APPEND SOURCEMETA_CORE_COMPONENTS semver) @@ -102,15 +101,6 @@ foreach(component ${SOURCEMETA_CORE_COMPONENTS}) include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_unicode.cmake") include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_json.cmake") include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_jsonpointer.cmake") - elseif(component STREQUAL "jsonschema") - include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_ip.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_uri.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_numeric.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_io.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_unicode.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_json.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_jsonpointer.cmake") - include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_jsonschema.cmake") elseif(component STREQUAL "yaml") find_dependency(PCRE2 CONFIG) include("${CMAKE_CURRENT_LIST_DIR}/sourcemeta_core_regex.cmake") diff --git a/doxygen/index.markdown b/doxygen/index.markdown index 3a6e4184f..4ca641233 100644 --- a/doxygen/index.markdown +++ b/doxygen/index.markdown @@ -28,7 +28,6 @@ add_subdirectory("${PROJECT_SOURCE_DIR}/deps/core") # Link your targets accordingly target_link_libraries(my_executable_or_library PUBLIC sourcemeta::core::json) -target_link_libraries(my_executable_or_library PUBLIC sourcemeta::core::jsonschema) target_link_libraries(my_executable_or_library PUBLIC sourcemeta::core::jsonpointer) target_link_libraries(my_executable_or_library PUBLIC sourcemeta::core::jsonl) ``` @@ -49,7 +48,6 @@ FetchContent_MakeAvailable(core) add_executable(my_example ...) target_link_libraries(my_example PUBLIC sourcemeta::core::json) -target_link_libraries(my_example PUBLIC sourcemeta::core::jsonschema) target_link_libraries(my_example PUBLIC sourcemeta::core::jsonpointer) target_link_libraries(my_example PUBLIC sourcemeta::core::jsonl) ``` @@ -63,11 +61,10 @@ package config file: find_package(Core REQUIRED) # This package also supports component-based inclusion -find_package(Core REQUIRED COMPONENTS json jsonschema jsonpointer jsonl) +find_package(Core REQUIRED COMPONENTS json jsonpointer jsonl) # Link your targets accordingly target_link_libraries(my_executable_or_library PUBLIC sourcemeta::core::json) -target_link_libraries(my_executable_or_library PUBLIC sourcemeta::core::jsonschema) target_link_libraries(my_executable_or_library PUBLIC sourcemeta::core::jsonpointer) target_link_libraries(my_executable_or_library PUBLIC sourcemeta::core::jsonl) ``` diff --git a/src/core/jsonschema/CMakeLists.txt b/src/core/jsonschema/CMakeLists.txt deleted file mode 100644 index d1db95285..000000000 --- a/src/core/jsonschema/CMakeLists.txt +++ /dev/null @@ -1,21 +0,0 @@ -set(KNOWN_RESOLVER_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/known_resolver.in.cc") -set(KNOWN_RESOLVER_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/known_resolver.cc") -include(./known_resolver.cmake) - -sourcemeta_library(NAMESPACE sourcemeta PROJECT core NAME jsonschema - PRIVATE_HEADERS bundle.h walker.h frame.h error.h - types.h vocabularies.h - SOURCES jsonschema.cc vocabularies.cc known_walker.cc - frame.cc walker.cc bundle.cc format.cc helpers.h - "${CMAKE_CURRENT_BINARY_DIR}/known_resolver.cc") - -if(SOURCEMETA_CORE_INSTALL) - sourcemeta_library_install(NAMESPACE sourcemeta PROJECT core NAME jsonschema) -endif() - -target_link_libraries(sourcemeta_core_jsonschema PUBLIC - sourcemeta::core::json) -target_link_libraries(sourcemeta_core_jsonschema PUBLIC - sourcemeta::core::jsonpointer) -target_link_libraries(sourcemeta_core_jsonschema PRIVATE - sourcemeta::core::uri) diff --git a/src/core/jsonschema/bundle.cc b/src/core/jsonschema/bundle.cc deleted file mode 100644 index f28414a60..000000000 --- a/src/core/jsonschema/bundle.cc +++ /dev/null @@ -1,488 +0,0 @@ -#include - -#include "helpers.h" - -#include // assert -#include // std::reference_wrapper -#include // std::string -#include // std::tuple -#include // std::unordered_map -#include // std::unordered_set -#include // std::move -#include // std::vector - -namespace { - -auto is_official_metaschema_reference( - const sourcemeta::core::WeakPointer &pointer, - const std::string &destination) -> bool { - assert(!pointer.empty()); - assert(pointer.back().is_property()); - return pointer.back().to_property() == "$schema" && - sourcemeta::core::is_official_schema(destination); -} - -auto dependencies_internal(const sourcemeta::core::JSON &schema, - const sourcemeta::core::SchemaWalker &walker, - const sourcemeta::core::SchemaResolver &resolver, - const sourcemeta::core::DependencyCallback &callback, - std::string_view default_dialect, - std::string_view default_id, - const sourcemeta::core::SchemaFrame::Paths &paths, - std::unordered_set &visited) -> void { - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(schema, walker, resolver, default_dialect, default_id, paths); - const auto origin{sourcemeta::core::identify(schema, resolver, - default_dialect, default_id)}; - - std::vector< - std::tuple> - found; - - frame.for_each_unresolved_reference([&](const auto &pointer, - const auto &reference) { - // We don't want to report official schemas, as we can expect - // virtually all implementations to understand them out of the box - if (is_official_metaschema_reference(pointer, reference.destination)) { - return; - } - - if (reference.base.empty()) { - throw sourcemeta::core::SchemaReferenceError( - reference.destination, sourcemeta::core::to_pointer(pointer), - "Could not resolve schema reference"); - } - - // To not infinitely loop on circular references - if (visited.contains(std::string{reference.base})) { - return; - } - - // If we can't find the destination but there is a base and we can - // find the base, then we are facing an unresolved fragment - if (frame.traverse(reference.base).has_value()) { - throw sourcemeta::core::SchemaReferenceError( - reference.destination, sourcemeta::core::to_pointer(pointer), - "Could not resolve schema reference"); - } - - assert(!reference.base.empty()); - const auto &identifier{reference.base}; - auto remote{resolver(identifier)}; - if (!remote.has_value()) { - throw sourcemeta::core::SchemaResolutionError( - identifier, "Could not resolve the reference to an external schema"); - } - - if (!sourcemeta::core::is_schema(remote.value())) { - throw sourcemeta::core::SchemaReferenceError( - identifier, sourcemeta::core::to_pointer(pointer), - "The JSON document is not a valid JSON Schema"); - } - - const auto remote_base_dialect{sourcemeta::core::base_dialect( - remote.value(), resolver, default_dialect)}; - if (!remote_base_dialect.has_value()) { - throw sourcemeta::core::SchemaReferenceError( - identifier, sourcemeta::core::to_pointer(pointer), - "The JSON document is not a valid JSON Schema"); - } - - callback(origin, pointer, identifier, remote.value()); - found.emplace_back(std::move(remote).value(), - sourcemeta::core::JSON::String{identifier}); - visited.emplace(identifier); - }); - - for (const auto &entry : found) { - dependencies_internal(std::get<0>(entry), walker, resolver, callback, - default_dialect, std::get<1>(entry), - {sourcemeta::core::empty_weak_pointer}, visited); - } -} - -auto embed_schema(sourcemeta::core::JSON &root, - const sourcemeta::core::Pointer &container, - const std::string_view identifier, - sourcemeta::core::JSON &&target) -> void { - auto *current{&root}; - for (const auto &token : container) { - if (token.is_property()) { - current->assign_if_missing(token.to_property(), - sourcemeta::core::JSON::make_object()); - current = ¤t->at(token.to_property()); - } else { - assert(current->is_array() && current->size() >= token.to_index()); - current = ¤t->at(token.to_index()); - } - } - - if (!current->is_object()) { - throw sourcemeta::core::SchemaError( - "Could not bundle to a container path that is not an object"); - } - - std::string key{identifier}; - // Ensure we get a definitions entry that does not exist - while (current->defines(key)) { - key += "/x"; - } - - current->assign(key, std::move(target)); -} - -auto elevate_embedded_resources( - sourcemeta::core::JSON &remote, sourcemeta::core::JSON &root, - const sourcemeta::core::Pointer &container, - const sourcemeta::core::SchemaBaseDialect remote_dialect, - const sourcemeta::core::SchemaResolver &resolver, - std::string_view default_dialect, - std::unordered_map &bundled) -> void { - const auto keyword{sourcemeta::core::definitions_keyword(remote_dialect)}; - const sourcemeta::core::JSON::String keyword_string{keyword}; - if (keyword.empty() || !remote.is_object() || - !remote.defines(keyword_string) || - !remote.at(keyword_string).is_object()) { - return; - } - - auto &defs{remote.at(keyword_string)}; - - // Navigate to the root container once, as it doesn't change per entry - const sourcemeta::core::JSON *root_container{&root}; - bool container_exists{true}; - for (const auto &token : container) { - if (!token.is_property() || !root_container->is_object() || - !root_container->defines(token.to_property())) { - container_exists = false; - break; - } - - root_container = &root_container->at(token.to_property()); - } - - std::vector to_extract; - std::vector to_remove; - for (const auto &entry : defs.as_object()) { - const auto &key{entry.first}; - const auto &value{entry.second}; - const auto entry_dialect{ - sourcemeta::core::base_dialect(value, resolver, default_dialect)}; - const auto effective_entry_dialect{entry_dialect.value_or(remote_dialect)}; - const auto identifier{ - sourcemeta::core::identify(value, effective_entry_dialect)}; - if (identifier.empty() || identifier != key || - !sourcemeta::core::URI{identifier}.is_absolute()) { - continue; - } - - const sourcemeta::core::JSON::String identifier_string{identifier}; - if (bundled.contains(identifier_string)) { - if (container_exists && root_container->is_object()) { - for (const auto &root_entry : root_container->as_object()) { - if (!root_entry.first.starts_with(identifier_string)) { - continue; - } - - const auto stored_dialect{sourcemeta::core::base_dialect( - root_entry.second, resolver, default_dialect)}; - const auto effective_stored_dialect{stored_dialect.has_value() - ? stored_dialect.value() - : remote_dialect}; - const auto stored_id{sourcemeta::core::identify( - root_entry.second, effective_stored_dialect)}; - if (stored_id != identifier_string) { - continue; - } - - if (root_entry.second != value) { - throw sourcemeta::core::SchemaError( - "Conflicting embedded resources with the same identifier"); - } - - break; - } - } - - to_remove.emplace_back(key); - } else { - to_extract.emplace_back(key); - bundled.emplace(identifier_string, identifier_string); - } - } - - for (const auto &key : to_extract) { - auto value{std::move(defs.at(key))}; - defs.erase(key); - embed_schema(root, container, key, std::move(value)); - } - - for (const auto &key : to_remove) { - defs.erase(key); - } - - if (defs.empty()) { - remote.erase(sourcemeta::core::JSON::String{keyword}); - } -} - -auto bundle_schema(sourcemeta::core::JSON &root, - const sourcemeta::core::Pointer &container, - sourcemeta::core::JSON &subschema, - const sourcemeta::core::SchemaWalker &walker, - const sourcemeta::core::SchemaResolver &resolver, - std::string_view default_dialect, - std::string_view default_id, - const sourcemeta::core::SchemaFrame::Paths &paths, - std::unordered_map &bundled, - const std::size_t depth = 0) -> void { - // Create a fresh frame for each schema we analyze to avoid key collisions - // between different schemas that have references at the same pointer paths - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - if (depth == 0) { - frame.analyse( - subschema, walker, resolver, default_dialect, default_id, - // We only want to frame in "wrapper" mode for the top level object - paths); - } else { - frame.analyse(subschema, walker, resolver, default_dialect, default_id); - } - - std::vector> - deferred; - std::vector< - std::pair> - ref_rewrites; - - frame.for_each_unresolved_reference([&](const auto &pointer, - const auto &reference) { - // We don't want to bundle official schemas, as we can expect - // virtually all implementations to understand them out of the box - if (is_official_metaschema_reference(pointer, reference.destination)) { - return; - } - - // If we can't find the destination but there is a base and we can - // find base, then we are facing an unresolved fragment - if (!reference.base.empty() && frame.traverse(reference.base).has_value()) { - throw sourcemeta::core::SchemaReferenceError( - reference.destination, sourcemeta::core::to_pointer(pointer), - "Could not resolve schema reference"); - } - - if (reference.base.empty()) { - throw sourcemeta::core::SchemaReferenceError( - reference.destination, sourcemeta::core::to_pointer(pointer), - "Could not resolve schema reference"); - } - - assert(!reference.base.empty()); - const sourcemeta::core::JSON::String identifier{reference.base}; - - if (bundled.contains(identifier)) { - const auto &mapped_id{bundled.at(identifier)}; - if (mapped_id != identifier) { - sourcemeta::core::URI rewrite_uri{mapped_id}; - if (reference.fragment.has_value()) { - rewrite_uri.fragment(reference.fragment.value()); - } - - ref_rewrites.emplace_back(sourcemeta::core::to_pointer(pointer), - rewrite_uri.recompose()); - } - - return; - } - - auto remote{resolver(identifier)}; - if (!remote.has_value()) { - if (frame.traverse(identifier).has_value()) { - throw sourcemeta::core::SchemaReferenceError( - reference.destination, sourcemeta::core::to_pointer(pointer), - "Could not resolve schema reference"); - } - - throw sourcemeta::core::SchemaResolutionError( - identifier, "Could not resolve the reference to an external schema"); - } - - if (!sourcemeta::core::is_schema(remote.value())) { - throw sourcemeta::core::SchemaReferenceError( - identifier, sourcemeta::core::to_pointer(pointer), - "The JSON document is not a valid JSON Schema"); - } - - const auto remote_base_dialect{sourcemeta::core::base_dialect( - remote.value(), resolver, default_dialect)}; - if (!remote_base_dialect.has_value()) { - throw sourcemeta::core::SchemaReferenceError( - identifier, sourcemeta::core::to_pointer(pointer), - "The JSON document is not a valid JSON Schema"); - } - - auto remote_id = - sourcemeta::core::identify(remote.value(), resolver, default_dialect); - - // If the reference has a fragment, verify it exists in the remote - // schema - if (reference.fragment.has_value()) { - // TODO: The fact that we have to re-frame on each loop pass to check - // for this is probably insanely slow - sourcemeta::core::SchemaFrame remote_frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - remote_frame.analyse(remote.value(), walker, resolver, default_dialect, - identifier); - if (!remote_frame.traverse(reference.destination).has_value()) { - throw sourcemeta::core::SchemaReferenceError( - reference.destination, sourcemeta::core::to_pointer(pointer), - "Could not resolve schema reference"); - } - } - - sourcemeta::core::JSON::String effective_id{ - remote_id.empty() ? sourcemeta::core::JSON::String{identifier} - : sourcemeta::core::JSON::String{remote_id}}; - - if (remote.value().is_object()) { - sourcemeta::core::reidentify(remote.value(), effective_id, - remote_base_dialect.value()); - } - - if (effective_id != identifier) { - sourcemeta::core::URI rewrite_uri{effective_id}; - if (reference.fragment.has_value()) { - rewrite_uri.fragment(reference.fragment.value()); - } - - ref_rewrites.emplace_back(sourcemeta::core::to_pointer(pointer), - rewrite_uri.recompose()); - } - - bundled.emplace(identifier, effective_id); - bundled.emplace(effective_id, effective_id); - deferred.emplace_back(std::move(remote).value(), std::move(effective_id), - remote_base_dialect.value()); - }); - - for (auto &[rewrite_pointer, rewrite_value] : ref_rewrites) { - sourcemeta::core::set(subschema, rewrite_pointer, - sourcemeta::core::JSON{rewrite_value}); - } - - for (auto &[remote, effective_id, remote_dialect] : deferred) { - bundle_schema(root, container, remote, walker, resolver, default_dialect, - effective_id, paths, bundled, depth + 1); - elevate_embedded_resources(remote, root, container, remote_dialect, - resolver, default_dialect, bundled); - embed_schema(root, container, effective_id, std::move(remote)); - } -} - -} // namespace - -namespace sourcemeta::core { - -auto dependencies(const JSON &schema, const SchemaWalker &walker, - const SchemaResolver &resolver, - const DependencyCallback &callback, - std::string_view default_dialect, std::string_view default_id, - const SchemaFrame::Paths &paths) -> void { - std::unordered_set visited; - dependencies_internal(schema, walker, resolver, callback, default_dialect, - default_id, paths, visited); -} - -// TODO: Refactor this function to internally rely on the `.dependencies()` -// function -auto bundle(JSON &schema, const SchemaWalker &walker, - const SchemaResolver &resolver, std::string_view default_dialect, - std::string_view default_id, - const std::optional &default_container, - const SchemaFrame::Paths &paths) -> void { - // Pre-scan the schema to find any already-embedded schemas and mark them - // as bundled to avoid re-embedding them. This includes the root schema itself - // and any schemas already embedded within it - std::unordered_map bundled; - SchemaFrame initial_frame{SchemaFrame::Mode::Locations}; - initial_frame.analyse(schema, walker, resolver, default_dialect, default_id, - paths); - initial_frame.for_each_resource_uri([&bundled](const auto &uri) { - bundled.emplace(JSON::String{uri}, JSON::String{uri}); - }); - if (default_container.has_value()) { - // This is undefined behavior - assert(!default_container.value().empty()); - bundle_schema(schema, default_container.value(), schema, walker, resolver, - default_dialect, default_id, paths, bundled); - return; - } - - // If the schema identifier is implicit, add it to the top-level of the - // bundled schema. Otherwise, potential relative references based on this - // implicit base URI will likely not resolve unless end users happen to - // know that this implicit base URI is. - if (!default_id.empty() && - identify(schema, resolver, default_dialect).empty()) { - reidentify(schema, default_id, resolver, default_dialect); - } - - const auto schema_base_dialect{ - base_dialect(schema, resolver, default_dialect)}; - if (!schema_base_dialect.has_value()) { - throw SchemaError( - "Could not determine how to perform bundling in this dialect"); - } - - const auto container_keyword{ - definitions_keyword(schema_base_dialect.value())}; - if (container_keyword.empty()) { - SchemaFrame frame{SchemaFrame::Mode::References}; - frame.analyse(schema, walker, resolver, default_dialect, default_id); - if (frame.standalone()) { - return; - } - - throw SchemaError( - "Could not determine how to perform bundling in this dialect"); - } - - if (ref_overrides_adjacent_keywords(schema_base_dialect.value()) && - schema.is_object() && schema.defines("$ref")) { - if (schema.size() == 1) { - const auto is_draft3{schema_base_dialect.value() == - SchemaBaseDialect::JSON_Schema_Draft_3 || - schema_base_dialect.value() == - SchemaBaseDialect::JSON_Schema_Draft_3_Hyper}; - auto branches{JSON::make_array()}; - branches.push_back(schema); - schema.at("$ref").into(std::move(branches)); - schema.rename("$ref", is_draft3 ? "extends" : "allOf"); - } else { - throw SchemaError( - "Cannot bundle a JSON Schema Draft 7 or older with a top-level " - "`$ref` (which overrides sibling keywords) without introducing " - "undefined behavior"); - } - } - - bundle_schema(schema, {JSON::String{container_keyword}}, schema, walker, - resolver, default_dialect, default_id, paths, bundled); -} - -auto bundle(const JSON &schema, const SchemaWalker &walker, - const SchemaResolver &resolver, std::string_view default_dialect, - std::string_view default_id, - const std::optional &default_container, - const SchemaFrame::Paths &paths) -> JSON { - JSON copy = schema; - bundle(copy, walker, resolver, default_dialect, default_id, default_container, - paths); - return copy; -} - -} // namespace sourcemeta::core diff --git a/src/core/jsonschema/format.cc b/src/core/jsonschema/format.cc deleted file mode 100644 index 1940c54ec..000000000 --- a/src/core/jsonschema/format.cc +++ /dev/null @@ -1,167 +0,0 @@ -#include - -#include // std::uint64_t -#include // std::numeric_limits -#include // std::string_view -#include // std::unordered_map -#include // std::vector - -namespace { - -auto keyword_rank(const sourcemeta::core::JSON::String &keyword, - const std::uint64_t otherwise) -> std::uint64_t { - using Rank = - std::unordered_map; - static Rank rank{// Most core keywords tend to come first - {"$schema", 0}, - {"$id", 1}, - {"id", 2}, - {"$vocabulary", 3}, - {"$anchor", 4}, - {"$dynamicAnchor", 5}, - {"$recursiveAnchor", 6}, - - // Then important metadata about the schema - {"title", 7}, - {"description", 8}, - {"$comment", 10}, - {"examples", 11}, - {"deprecated", 12}, - {"readOnly", 13}, - {"writeOnly", 14}, - {"default", 15}, - - // This is a placeholder for "x-"-prefixed unknown keywords, - // as they are almost always metadata - {"x-", 16}, - - // Then references - {"$ref", 17}, - {"$dynamicRef", 18}, - {"$recursiveRef", 19}, - - // Then keywords that apply to any type - {"type", 20}, - {"disallow", 21}, - {"extends", 22}, - {"const", 23}, - {"enum", 24}, - {"optional", 25}, - {"requires", 26}, - {"allOf", 27}, - {"anyOf", 28}, - {"oneOf", 29}, - {"not", 30}, - {"if", 31}, - {"then", 32}, - {"else", 33}, - - // Then keywords about numbers - {"exclusiveMaximum", 34}, - {"maximum", 35}, - {"maximumCanEqual", 36}, - {"exclusiveMinimum", 37}, - {"minimum", 38}, - {"minimumCanEqual", 39}, - {"multipleOf", 40}, - {"divisibleBy", 41}, - {"maxDecimal", 42}, - - // Then keywords about strings - {"pattern", 43}, - {"format", 44}, - {"maxLength", 45}, - {"minLength", 46}, - {"contentEncoding", 47}, - {"contentMediaType", 48}, - {"contentSchema", 49}, - - // Then keywords about arrays - {"maxItems", 50}, - {"minItems", 51}, - {"uniqueItems", 52}, - {"maxContains", 53}, - {"minContains", 54}, - {"contains", 55}, - {"prefixItems", 56}, - {"items", 57}, - {"additionalItems", 58}, - {"unevaluatedItems", 59}, - - // Object - {"required", 60}, - {"maxProperties", 61}, - {"minProperties", 62}, - {"propertyNames", 63}, - {"properties", 64}, - {"patternProperties", 65}, - {"additionalProperties", 66}, - {"unevaluatedProperties", 67}, - {"dependentRequired", 68}, - {"dependencies", 69}, - {"dependentSchemas", 70}, - - // Reusable utilities go last - {"$defs", 71}, - {"definitions", 72}}; - - // Handle `x-` prefixed unknown keywords - if (keyword.starts_with("x-")) { - const auto match{rank.find("x-")}; - assert(match != rank.cend()); - return match->second; - } - - const auto match{rank.find(keyword)}; - if (match != rank.cend()) { - return match->second; - } else { - return otherwise; - } -} - -auto keyword_compare(const sourcemeta::core::JSON::String &left, - const sourcemeta::core::JSON::String &right) -> bool { - constexpr auto DEFAULT{std::numeric_limits::max()}; - const auto left_rank{keyword_rank(left, DEFAULT)}; - const auto right_rank{keyword_rank(right, DEFAULT)}; - if (left_rank == right_rank) { - return left < right; - } else { - return left_rank < right_rank; - } -} - -} // namespace - -namespace sourcemeta::core { - -auto format(JSON &schema, const SchemaWalker &walker, - const SchemaResolver &resolver, std::string_view default_dialect) - -> void { - assert(is_schema(schema)); - std::vector subschemas; - - { - SchemaFrame frame{SchemaFrame::Mode::Locations}; - frame.analyse(schema, walker, resolver, default_dialect); - - for (const auto &entry : frame.locations()) { - if (entry.second.type != SchemaFrame::LocationType::Resource && - entry.second.type != SchemaFrame::LocationType::Subschema) { - continue; - } - - subschemas.push_back(to_pointer(entry.second.pointer)); - } - } - - for (const auto &pointer : subschemas) { - auto &subschema{get(schema, pointer)}; - if (subschema.is_object()) { - subschema.reorder(keyword_compare); - } - } -} - -} // namespace sourcemeta::core diff --git a/src/core/jsonschema/frame.cc b/src/core/jsonschema/frame.cc deleted file mode 100644 index 541700963..000000000 --- a/src/core/jsonschema/frame.cc +++ /dev/null @@ -1,1842 +0,0 @@ -#include - -#include "helpers.h" - -#include // std::ranges::all_of, std::ranges::contains, std::ranges::sort -#include // assert -#include // std::less -#include // std::map -#include // std::optional -#include // std::ostringstream -#include // std::unordered_map -#include // std::unordered_set -#include // std::pair, std::move -#include // std::vector - -enum class AnchorType : std::uint8_t { Static, Dynamic, All }; - -// Static keyword strings for reference pointers -static const std::string KEYWORD_SCHEMA{"$schema"}; -static const std::string KEYWORD_REF{"$ref"}; -static const std::string KEYWORD_RECURSIVE_REF{"$recursiveRef"}; -static const std::string KEYWORD_DYNAMIC_REF{"$dynamicRef"}; - -namespace { - -auto is_valid_anchor_2020_12(const std::string_view name) -> bool { - if (name.empty()) { - return false; - } - - const auto first{name.front()}; - if (!((first >= 'A' && first <= 'Z') || (first >= 'a' && first <= 'z') || - first == '_')) { - return false; - } - - for (std::size_t index{1}; index < name.size(); ++index) { - const auto character{name[index]}; - if (!((character >= 'A' && character <= 'Z') || - (character >= 'a' && character <= 'z') || - (character >= '0' && character <= '9') || character == '-' || - character == '_' || character == '.')) { - return false; - } - } - - return true; -} - -auto is_valid_anchor(const std::string_view name) -> bool { - if (name.empty()) { - return false; - } - - const auto first{name.front()}; - if (!((first >= 'A' && first <= 'Z') || (first >= 'a' && first <= 'z'))) { - return false; - } - - for (std::size_t index{1}; index < name.size(); ++index) { - const auto character{name[index]}; - if (!((character >= 'A' && character <= 'Z') || - (character >= 'a' && character <= 'z') || - (character >= '0' && character <= '9') || character == '-' || - character == '_' || character == '.' || character == ':')) { - return false; - } - } - - return true; -} - -auto find_anchors(const sourcemeta::core::JSON &schema, - const sourcemeta::core::Vocabularies &vocabularies) - -> std::vector> { - std::vector> result; - - // 2020-12 - if (schema.is_object() && - vocabularies.contains( - sourcemeta::core::Vocabularies::Known::JSON_Schema_2020_12_Core)) { - const auto *dynamic_anchor{schema.try_at("$dynamicAnchor")}; - if (dynamic_anchor && dynamic_anchor->is_string()) { - const std::string_view dynamic_anchor_view{dynamic_anchor->to_string()}; - if (!is_valid_anchor_2020_12(dynamic_anchor_view)) { - throw sourcemeta::core::SchemaKeywordError( - "$dynamicAnchor", dynamic_anchor_view, - "Invalid dynamic anchor value"); - } - - result.emplace_back(dynamic_anchor_view, AnchorType::Dynamic); - } - - const auto *anchor_2020{schema.try_at("$anchor")}; - if (anchor_2020 && anchor_2020->is_string()) { - const std::string_view anchor_view{anchor_2020->to_string()}; - if (!is_valid_anchor_2020_12(anchor_view)) { - throw sourcemeta::core::SchemaKeywordError("$anchor", anchor_view, - "Invalid anchor value"); - } - - bool found = false; - for (auto &entry : result) { - if (entry.first == anchor_view) { - entry.second = AnchorType::All; - found = true; - break; - } - } - if (!found) { - result.emplace_back(anchor_view, AnchorType::Static); - } - } - } - - // 2019-09 - if (schema.is_object() && - vocabularies.contains( - sourcemeta::core::Vocabularies::Known::JSON_Schema_2019_09_Core)) { - const auto *recursive_anchor{schema.try_at("$recursiveAnchor")}; - if (recursive_anchor) { - if (recursive_anchor->is_boolean()) { - if (recursive_anchor->to_boolean()) { - // We store a 2019-09 recursive anchor as an empty anchor - result.emplace_back(std::string_view{}, AnchorType::Dynamic); - } - } else { - std::ostringstream value; - sourcemeta::core::stringify(*recursive_anchor, value); - throw sourcemeta::core::SchemaKeywordError( - "$recursiveAnchor", value.str(), "Invalid recursive anchor value"); - } - } - - const auto *anchor_2019{schema.try_at("$anchor")}; - if (anchor_2019 && anchor_2019->is_string()) { - const std::string_view anchor_view{anchor_2019->to_string()}; - if (!is_valid_anchor(anchor_view)) { - throw sourcemeta::core::SchemaKeywordError("$anchor", anchor_view, - "Invalid anchor value"); - } - - bool found = false; - for (auto &entry : result) { - if (entry.first == anchor_view) { - entry.second = AnchorType::All; - found = true; - break; - } - } - if (!found) { - result.emplace_back(anchor_view, AnchorType::Static); - } - } - } - - // Draft 7 and 6 - // Old `$id` anchor form - if (schema.is_object() && - (vocabularies.contains( - sourcemeta::core::Vocabularies::Known::JSON_Schema_Draft_7) || - vocabularies.contains( - sourcemeta::core::Vocabularies::Known::JSON_Schema_Draft_6))) { - const auto *id_value{schema.try_at("$id")}; - if (id_value) { - assert(id_value->is_string()); - const std::string_view id_view{id_value->to_string()}; - // A bare "#" carries no anchor name, so we treat it as no anchor at - // all. - if (id_view.starts_with('#') && id_view.size() > 1) { - const std::string_view anchor_view{id_view.substr(1)}; - // Per Draft 7 / 6 spec, the plain-name fragment in `$id` must - // begin with a letter `[A-Za-z]` followed by any number of - // letters, digits, hyphens, underscores, colons, or periods. - if (!is_valid_anchor(anchor_view)) { - throw sourcemeta::core::SchemaKeywordError("$id", id_view, - "Invalid anchor value"); - } - - result.emplace_back(anchor_view, AnchorType::Static); - } - } - } - - // Draft 4 - // Old `id` anchor form - if (schema.is_object() && - vocabularies.contains( - sourcemeta::core::Vocabularies::Known::JSON_Schema_Draft_4)) { - const auto *id_value{schema.try_at("id")}; - if (id_value) { - assert(id_value->is_string()); - const std::string_view id_view{id_value->to_string()}; - // A bare "#" carries no anchor name, so we treat it as no anchor at - // all. - if (id_view.starts_with('#') && id_view.size() > 1) { - // Draft 4 imposes no plain-name pattern on the fragment, but the - // value must still be a valid URI reference per RFC 3986 - if (!sourcemeta::core::URI::is_uri_reference(id_view)) { - throw sourcemeta::core::SchemaKeywordError( - "id", id_view, "The identifier is not a valid URI"); - } - - result.emplace_back(id_view.substr(1), AnchorType::Static); - } - } - } - - return result; -} - -template -auto find_nearest_bases_ref(const MapType &bases, - const sourcemeta::core::WeakPointer &pointer) - -> std::optional< - std::pair>, - sourcemeta::core::WeakPointer>> { - auto current_pointer{pointer}; - while (true) { - const auto match{bases.find(current_pointer)}; - if (match != bases.cend()) { - return std::make_pair(std::cref(match->second), current_pointer); - } - - if (current_pointer.empty()) { - break; - } - - current_pointer = current_pointer.initial(); - } - - return std::nullopt; -} - -template -auto find_nearest_bases(const MapType &bases, - const sourcemeta::core::WeakPointer &pointer, - const std::optional &default_base) - -> std::pair, sourcemeta::core::WeakPointer> { - const auto result{find_nearest_bases_ref(bases, pointer)}; - if (result.has_value()) { - return {result->first.get(), result->second}; - } - - if (default_base.has_value()) { - return {{StringType{default_base.value()}}, - sourcemeta::core::empty_weak_pointer}; - } - - return {{}, sourcemeta::core::empty_weak_pointer}; -} - -struct DialectAtPointer { - std::vector dialects; - sourcemeta::core::SchemaBaseDialect base_dialect; -}; - -struct CombinedWalkResult { - std::optional, - sourcemeta::core::WeakPointer>> - dialect_match; - std::vector> - every_base; -}; - -template -auto find_dialect_and_all_bases(const DialectMapType &base_dialects, - const BaseMapType &base_uris, - const sourcemeta::core::WeakPointer &pointer) - -> CombinedWalkResult { - CombinedWalkResult result; - - auto current_pointer{pointer}; - while (true) { - if (!result.dialect_match.has_value()) { - const auto dialect_it{base_dialects.find(current_pointer)}; - if (dialect_it != base_dialects.cend()) { - result.dialect_match = - std::make_pair(std::cref(dialect_it->second), current_pointer); - } - } - - const auto base_it{base_uris.find(current_pointer)}; - if (base_it != base_uris.cend()) { - for (const auto &base : base_it->second) { - result.every_base.emplace_back(std::string_view{base}, current_pointer); - } - } - - if (current_pointer.empty()) { - break; - } - - current_pointer = current_pointer.initial(); - } - - if (result.every_base.empty() || - result.every_base.back().second != sourcemeta::core::empty_weak_pointer) { - result.every_base.emplace_back(std::string_view{}, - sourcemeta::core::empty_weak_pointer); - } - - return result; -} - -auto supports_id_anchors(const sourcemeta::core::SchemaBaseDialect base_dialect) - -> bool { - using sourcemeta::core::SchemaBaseDialect; - switch (base_dialect) { - case SchemaBaseDialect::JSON_Schema_Draft_7: - case SchemaBaseDialect::JSON_Schema_Draft_7_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_6: - case SchemaBaseDialect::JSON_Schema_Draft_6_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_4: - case SchemaBaseDialect::JSON_Schema_Draft_4_Hyper: - return true; - default: - return false; - } -} - -auto set_base_and_fragment( - sourcemeta::core::SchemaFrame::ReferencesEntry &entry) -> void { - const std::string_view destination_view{entry.destination}; - if (destination_view.empty()) { - entry.base = std::string_view{}; - entry.fragment = std::nullopt; - return; - } - - const auto hash_position{destination_view.find('#')}; - if (hash_position != std::string::npos) { - // Has a fragment - if (hash_position == 0) { - // Starts with #, so no base - entry.base = std::string_view{}; - } else { - entry.base = destination_view.substr(0, hash_position); - } - entry.fragment = destination_view.substr(hash_position + 1); - } else { - // No fragment - entry.base = destination_view; - entry.fragment = std::nullopt; - } -} - -[[noreturn]] -auto throw_already_exists(const sourcemeta::core::JSON::String &uri) -> void { - throw sourcemeta::core::SchemaFrameError(uri, - "Schema identifier already exists"); -} - -auto store(sourcemeta::core::SchemaFrame::Locations &frame, - const sourcemeta::core::SchemaReferenceType type, - const sourcemeta::core::SchemaFrame::LocationType entry_type, - sourcemeta::core::JSON::String uri, const std::string_view base, - const sourcemeta::core::WeakPointer &pointer_from_root, - const std::size_t relative_pointer_offset, - const std::string_view dialect, - const sourcemeta::core::SchemaBaseDialect base_dialect, - const std::optional &parent, - const bool property_name, const bool orphan, - const bool ignore_if_present = false, - const bool already_canonical = false) -> void { - auto canonical{already_canonical ? std::move(uri) - : sourcemeta::core::URI::canonicalize(uri)}; - auto [iterator, inserted] = - frame.insert({{type, std::move(canonical)}, - {.parent = parent, - .type = entry_type, - .base = base, - .pointer = pointer_from_root, - .relative_pointer = relative_pointer_offset, - .dialect = dialect, - .base_dialect = base_dialect, - .property_name = property_name, - .orphan = orphan}}); - if (!ignore_if_present && !inserted) { - if (entry_type == sourcemeta::core::SchemaFrame::LocationType::Anchor) { - throw sourcemeta::core::SchemaAnchorCollisionError( - iterator->first.second, - sourcemeta::core::to_pointer(pointer_from_root), - sourcemeta::core::to_pointer(iterator->second.pointer)); - } - throw_already_exists(iterator->first.second); - } - - if (inserted && iterator->first.second == base) { - iterator->second.base = iterator->first.second; - } -} - -// Check misunderstood struct to be a function -// NOLINTNEXTLINE(bugprone-exception-escape) -struct InternalEntry { - sourcemeta::core::SchemaIteratorEntry common; - std::optional id; -}; - -// Check misunderstood struct to be a function -// NOLINTNEXTLINE(bugprone-exception-escape) -struct CacheSubschema { - bool orphan{}; - bool property_name{}; - std::optional parent{}; -}; - -} // namespace - -namespace sourcemeta::core { - -auto to_json(const SchemaReferenceType value) -> JSON { - return JSON{value == SchemaReferenceType::Static ? "static" : "dynamic"}; -} - -auto to_json(const SchemaFrame::LocationType value) -> JSON { - switch (value) { - case SchemaFrame::LocationType::Resource: - return JSON{"resource"}; - case SchemaFrame::LocationType::Anchor: - return JSON{"anchor"}; - case SchemaFrame::LocationType::Pointer: - return JSON{"pointer"}; - case SchemaFrame::LocationType::Subschema: - return JSON{"subschema"}; - default: - assert(false); - return JSON{nullptr}; - } -} - -auto SchemaFrame::to_json( - const std::optional &tracker) const -> JSON { - auto root{JSON::make_object()}; - - root.assign_assume_new("locations", JSON::make_object()); - root.at("locations").assign_assume_new("static", JSON::make_object()); - root.at("locations").assign_assume_new("dynamic", JSON::make_object()); - for (const auto &location : this->locations_) { - auto entry{JSON::make_object()}; - entry.assign_assume_new("parent", location.second.parent.has_value() - ? JSON{sourcemeta::core::to_string( - location.second.parent.value())} - : JSON{nullptr}); - entry.assign_assume_new("type", - sourcemeta::core::to_json(location.second.type)); - entry.assign_assume_new("root", this->root_.empty() ? JSON{nullptr} - : JSON{this->root_}); - entry.assign_assume_new("base", JSON{JSON::String{location.second.base}}); - entry.assign_assume_new( - "pointer", JSON{sourcemeta::core::to_string(location.second.pointer)}); - if (tracker.has_value()) { - entry.assign_assume_new("position", - sourcemeta::core::to_json(tracker.value().get( - to_pointer(location.second.pointer)))); - } else { - entry.assign_assume_new("position", sourcemeta::core::to_json(nullptr)); - } - - entry.assign_assume_new( - "relativePointer", - JSON{sourcemeta::core::to_string( - this->relative_instance_location(location.second))}); - entry.assign_assume_new("dialect", - JSON{JSON::String{location.second.dialect}}); - entry.assign_assume_new( - "baseDialect", - JSON{JSON::String{to_string(location.second.base_dialect)}}); - entry.assign_assume_new("propertyName", - JSON{location.second.property_name}); - entry.assign_assume_new("orphan", JSON{location.second.orphan}); - - switch (location.first.first) { - case SchemaReferenceType::Static: - root.at("locations") - .at("static") - .assign_assume_new(location.first.second, std::move(entry)); - break; - case SchemaReferenceType::Dynamic: - root.at("locations") - .at("dynamic") - .assign_assume_new(location.first.second, std::move(entry)); - break; - default: - assert(false); - } - } - - root.assign_assume_new("references", JSON::make_array()); - for (const auto &reference : this->references_) { - auto entry{JSON::make_object()}; - entry.assign_assume_new("type", - sourcemeta::core::to_json(reference.first.first)); - entry.assign_assume_new( - "origin", JSON{sourcemeta::core::to_string(reference.first.second)}); - - if (tracker.has_value()) { - entry.assign_assume_new("position", - sourcemeta::core::to_json(tracker.value().get( - to_pointer(reference.first.second)))); - } else { - entry.assign_assume_new("position", sourcemeta::core::to_json(nullptr)); - } - - entry.assign_assume_new( - "destination", sourcemeta::core::to_json(reference.second.destination)); - entry.assign_assume_new( - "base", - !reference.second.base.empty() - ? sourcemeta::core::to_json(JSON::String{reference.second.base}) - : sourcemeta::core::to_json(nullptr)); - entry.assign_assume_new( - "fragment", reference.second.fragment.has_value() - ? sourcemeta::core::to_json( - JSON::String{reference.second.fragment.value()}) - : sourcemeta::core::to_json(nullptr)); - root.at("references").push_back(std::move(entry)); - } - - return root; -} - -auto SchemaFrame::analyse(const JSON &root, const SchemaWalker &walker, - const SchemaResolver &resolver, - std::string_view default_dialect, - std::string_view default_id, - const SchemaFrame::Paths &paths) -> void { - this->reset(); - assert((std::unordered_set(paths.cbegin(), - paths.cend()) - .size() == paths.size())); - std::vector subschema_entries; - std::unordered_map - subschemas; - std::unordered_map, - WeakPointer::Hasher> - base_uris; - std::unordered_map - base_dialects; - - for (const auto &path : paths) { - // Passing paths that overlap is undefined behavior. No path should - // start with another one, else you are doing something wrong - assert(std::ranges::all_of(paths, [&path](const auto &other) { - return path == other || !path.starts_with(other); - })); - - const auto &schema{get(root, path)}; - - const auto root_base_dialect{ - sourcemeta::core::base_dialect(schema, resolver, default_dialect)}; - if (!root_base_dialect.has_value()) { - throw SchemaUnknownBaseDialectError(); - } - - // If we are dealing with nested schemas, then by definition - // the root has no identifier - std::optional root_id{std::nullopt}; - if (path.empty()) { - const auto maybe_id{sourcemeta::core::identify( - schema, root_base_dialect.value(), default_id)}; - if (!maybe_id.empty()) { - try { - root_id = URI::canonicalize(maybe_id); - } catch (const URIParseError &) { - throw SchemaKeywordError( - sourcemeta::core::id_keyword(root_base_dialect.value()), maybe_id, - "The identifier is not a valid URI"); - } - - this->root_ = root_id.value(); - } - } - - const std::string_view root_dialect{ - sourcemeta::core::dialect(schema, default_dialect)}; - assert(!root_dialect.empty()); - - // If the top-level schema has a specific identifier but the user - // passes a different default identifier, then the schema is by - // definition known by two names, and we should handle that accordingly - const bool has_explicit_different_id{root_id.has_value() && - !default_id.empty() && - root_id.value() != default_id}; - if (has_explicit_different_id) { - const auto default_id_canonical{URI::canonicalize(default_id)}; - // Use this->root_ as base - it contains root_id.value() and persists - store(this->locations_, SchemaReferenceType::Static, - SchemaFrame::LocationType::Resource, default_id_canonical, - this->root_, path, path.size(), root_dialect, - root_base_dialect.value(), std::nullopt, false, false); - - base_uris.insert({path, {root_id.value(), default_id_canonical}}); - } - - std::vector current_subschema_entries; - for (const auto &relative_entry : sourcemeta::core::SchemaIterator{ - schema, walker, resolver, default_dialect}) { - // Rephrase the iterator entry as being for the current base - auto entry{relative_entry}; - entry.pointer = path.concat(relative_entry.pointer); - if (entry.parent.has_value()) { - entry.parent = path.concat(relative_entry.parent.value()); - } - - // Dialect - assert(!entry.dialect.empty()); - assert(entry.base_dialect.has_value()); - base_dialects.insert( - {entry.pointer, - DialectAtPointer{.dialects = {entry.dialect}, - .base_dialect = entry.base_dialect.value()}}); - - // Schema identifier - // We need to store the default_id in a local variable to ensure - // it survives the identify() call, as identify() returns a string_view - const std::string default_id_for_entry{ - entry.pointer.empty() && root_id.has_value() ? root_id.value() - : std::string{}}; - const auto maybe_id{sourcemeta::core::identify(entry.subschema.get(), - entry.base_dialect.value(), - default_id_for_entry)}; - std::optional id{ - !maybe_id.empty() ? std::make_optional(maybe_id) - : std::nullopt}; - - // Store information - subschemas.emplace(entry.pointer, - CacheSubschema{.orphan = entry.orphan, - .property_name = entry.property_name, - .parent = entry.parent}); - subschema_entries.emplace_back( - InternalEntry{.common = std::move(entry), .id = std::move(id)}); - current_subschema_entries.emplace_back(subschema_entries.size() - 1); - } - - for (const auto &entry_index : current_subschema_entries) { - const auto &entry{subschema_entries[entry_index]}; - const auto &common_pointer_weak{entry.common.pointer}; - const auto &common_parent{entry.common.parent}; - if (entry.id.has_value()) { - assert(entry.common.base_dialect.has_value()); - const bool ref_overrides = - sourcemeta::core::ref_overrides_adjacent_keywords( - entry.common.base_dialect.value()); - const bool is_pre_2019_09_location_independent_identifier = - supports_id_anchors(entry.common.base_dialect.value()) && - entry.id.value().starts_with('#'); - - if ((!entry.common.subschema.get().defines("$ref") || !ref_overrides) && - // If we are dealing with a pre-2019-09 location independent - // identifier, we ignore it as a traditional identifier and take - // care of it as an anchor - !is_pre_2019_09_location_independent_identifier) { - const auto bases{find_nearest_bases( - base_uris, common_pointer_weak, - entry.id ? std::optional{*entry.id} - : std::nullopt)}; - for (const auto &base_string : bases.first) { - // Otherwise we end up pushing the top-level resource twice - if (entry_index == 0 && has_explicit_different_id && - !default_id.empty() && default_id == base_string) { - continue; - } - - sourcemeta::core::URI base; - sourcemeta::core::URI maybe_relative; - try { - base = sourcemeta::core::URI{base_string}; - maybe_relative = sourcemeta::core::URI{entry.id.value()}; - } catch (const sourcemeta::core::URIParseError &) { - throw sourcemeta::core::SchemaKeywordError( - sourcemeta::core::id_keyword( - entry.common.base_dialect.value()), - entry.id.value(), "The identifier is not a valid URI"); - } - - const auto maybe_fragment{maybe_relative.fragment()}; - - // Both 2019-09 and 2020-12 state: - // - // "$id" MUST NOT contain a non-empty fragment, and SHOULD NOT - // contain an empty fragment. - // - // See - // https://json-schema.org/draft/2019-09/draft-handrews-json-schema-02#rfc.section.8.2.2 - // See - // https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-01#section-8.2.1-5 - if (maybe_fragment.has_value() && !maybe_fragment.value().empty()) { - throw SchemaFrameError( - entry.id.value(), - "Identifiers must not contain non-empty fragments"); - } - - const bool maybe_relative_is_absolute{maybe_relative.is_absolute()}; - maybe_relative.resolve_from(base).canonicalize(); - const JSON::String new_id{maybe_relative.recompose()}; - - const auto maybe_match{ - this->locations_.find({SchemaReferenceType::Static, new_id})}; - if (maybe_match != this->locations_.cend() && - maybe_match->second.pointer != common_pointer_weak) { - throw_already_exists(new_id); - } - - if (!maybe_relative_is_absolute || - maybe_match == this->locations_.cend()) { - assert(entry.common.base_dialect.has_value()); - - store(this->locations_, SchemaReferenceType::Static, - SchemaFrame::LocationType::Resource, new_id, new_id, - common_pointer_weak, common_pointer_weak.size(), - entry.common.dialect, entry.common.base_dialect.value(), - common_parent, entry.common.property_name, - entry.common.orphan); - } - - auto base_uri_match{base_uris.find(common_pointer_weak)}; - if (base_uri_match != base_uris.cend()) { - if (!std::ranges::contains(base_uri_match->second, new_id)) { - base_uri_match->second.push_back(new_id); - } - } else { - base_uris.insert({common_pointer_weak, {new_id}}); - } - } - } - } - - if (this->mode_ != SchemaFrame::Mode::Locations) { - // Handle metaschema references - const auto maybe_metaschema{ - sourcemeta::core::dialect(entry.common.subschema.get(), {}, false)}; - if (!maybe_metaschema.empty()) { - sourcemeta::core::URI metaschema; - try { - metaschema = sourcemeta::core::URI{maybe_metaschema}; - } catch (const URIParseError &) { - throw SchemaKeywordError("$schema", maybe_metaschema, - "The dialect is not a valid URI"); - } - - const auto nearest_bases{find_nearest_bases( - base_uris, common_pointer_weak, - entry.id ? std::optional{*entry.id} - : std::nullopt)}; - if (!nearest_bases.first.empty()) { - metaschema.resolve_from(nearest_bases.first.front()); - } - - metaschema.canonicalize(); - assert(entry.common.subschema.get().defines("$schema")); - auto schema_pointer{common_pointer_weak}; - schema_pointer.push_back(std::cref(KEYWORD_SCHEMA)); - const auto [it, inserted] = this->references_.insert_or_assign( - {SchemaReferenceType::Static, std::move(schema_pointer)}, - SchemaFrame::ReferencesEntry{.original = maybe_metaschema, - .destination = - metaschema.recompose(), - .base = std::string_view{}, - .fragment = std::nullopt}); - set_base_and_fragment(it->second); - } - } - - // Handle schema anchors - for (const auto &[name, type] : find_anchors(entry.common.subschema.get(), - entry.common.vocabularies)) { - const auto bases{find_nearest_bases( - base_uris, common_pointer_weak, - entry.id ? std::optional{*entry.id} - : std::nullopt)}; - - if (bases.first.empty()) { - const auto anchor_uri{sourcemeta::core::URI::from_fragment(name)}; - const auto relative_anchor_uri{anchor_uri.recompose()}; - - if (type == AnchorType::Static || type == AnchorType::All) { - store(this->locations_, SchemaReferenceType::Static, - SchemaFrame::LocationType::Anchor, relative_anchor_uri, "", - common_pointer_weak, bases.second.size(), - entry.common.dialect, entry.common.base_dialect.value(), - common_parent, entry.common.property_name, - entry.common.orphan); - } - - if (type == AnchorType::Dynamic || type == AnchorType::All) { - store(this->locations_, SchemaReferenceType::Dynamic, - SchemaFrame::LocationType::Anchor, relative_anchor_uri, "", - common_pointer_weak, bases.second.size(), - entry.common.dialect, entry.common.base_dialect.value(), - common_parent, entry.common.property_name, - entry.common.orphan); - - // Register a dynamic anchor as a static anchor if possible too - if (entry.common.vocabularies.contains( - Vocabularies::Known::JSON_Schema_2020_12_Core)) { - store(this->locations_, SchemaReferenceType::Static, - SchemaFrame::LocationType::Anchor, relative_anchor_uri, "", - common_pointer_weak, bases.second.size(), - entry.common.dialect, entry.common.base_dialect.value(), - common_parent, entry.common.property_name, - entry.common.orphan, true); - } - } - } else { - bool is_first = true; - for (const auto &base_string : bases.first) { - sourcemeta::core::URI anchor_uri_builder{base_string}; - anchor_uri_builder.fragment(name); - anchor_uri_builder.canonicalize(); - const auto anchor_uri{anchor_uri_builder.recompose()}; - - if (!is_first && this->locations_.contains( - {SchemaReferenceType::Static, anchor_uri})) { - continue; - } - - const auto base_entry{this->locations_.find( - {SchemaReferenceType::Static, base_string})}; - - const std::string_view base_view{ - base_entry != this->locations_.cend() - ? std::string_view{base_entry->first.second} - : std::string_view{base_string}}; - - if (type == AnchorType::Static || type == AnchorType::All) { - store(this->locations_, - sourcemeta::core::SchemaReferenceType::Static, - SchemaFrame::LocationType::Anchor, anchor_uri, base_view, - common_pointer_weak, bases.second.size(), - entry.common.dialect, entry.common.base_dialect.value(), - common_parent, entry.common.property_name, - entry.common.orphan); - } - - if (type == AnchorType::Dynamic || type == AnchorType::All) { - store(this->locations_, - sourcemeta::core::SchemaReferenceType::Dynamic, - SchemaFrame::LocationType::Anchor, anchor_uri, base_view, - common_pointer_weak, bases.second.size(), - entry.common.dialect, entry.common.base_dialect.value(), - common_parent, entry.common.property_name, - entry.common.orphan); - - if (entry.common.vocabularies.contains( - Vocabularies::Known::JSON_Schema_2020_12_Core)) { - store(this->locations_, - sourcemeta::core::SchemaReferenceType::Static, - SchemaFrame::LocationType::Anchor, anchor_uri, base_view, - common_pointer_weak, bases.second.size(), - entry.common.dialect, entry.common.base_dialect.value(), - common_parent, entry.common.property_name, - entry.common.orphan, true); - } - } - - is_first = false; - } - } - } - } - - // It is important for the loop that follows to assume a specific ordering - // where smaller pointers (by number of tokens) are scanned first. - std::vector pointers; - for (const auto &weak_pointer : sourcemeta::core::PointerWalker{schema}) { - pointers.push_back(weak_pointer); - } - - std::ranges::sort(pointers, std::less<>()); - - // Pre-compute every possible pointer to the schema - for (const auto &relative_pointer : pointers) { - const auto pointer_weak{path.concat(relative_pointer)}; - - const auto combined{ - find_dialect_and_all_bases(base_dialects, base_uris, pointer_weak)}; - const auto &dialect_for_pointer{ - combined.dialect_match.has_value() - ? combined.dialect_match->first.get().dialects.front() - : root_dialect}; - const auto base_dialect_for_pointer{ - combined.dialect_match.has_value() - ? combined.dialect_match->first.get().base_dialect - : root_base_dialect.value()}; - const auto &every_base_result{combined.every_base}; - - std::optional> nearest_base_info; - for (const auto &entry : every_base_result) { - if (!entry.first.empty()) { - nearest_base_info = entry; - break; - } - } - - const auto subschema_it{subschemas.find(pointer_weak)}; - const bool is_subschema{subschema_it != subschemas.cend()}; - const auto nearest_base_depth = - nearest_base_info.has_value() ? nearest_base_info->second.size() : 0; - - std::string_view hoisted_base_view{}; - if (nearest_base_info.has_value()) { - const JSON::String nearest_base_str{nearest_base_info->first}; - const auto base_entry{this->locations_.find( - {SchemaReferenceType::Static, nearest_base_str})}; - if (base_entry != this->locations_.cend()) { - hoisted_base_view = base_entry->first.second; - } else { - hoisted_base_view = nearest_base_info->first; - } - } - - WeakPointer cached_base{}; - for (const auto &base : every_base_result) { - const auto resolved{cached_base == base.second - ? pointer_weak.resolve_from(cached_base) - : pointer_weak.resolve_from(base.second)}; - cached_base = base.second; - - auto relative_pointer_uri{ - base.first.empty() - ? sourcemeta::core::to_uri(resolved) - : sourcemeta::core::to_uri(resolved, base.first)}; - - relative_pointer_uri.canonicalize(); - auto result{relative_pointer_uri.recompose()}; - - bool contains = - this->locations_.contains({SchemaReferenceType::Static, result}); - - if (!contains) { - std::string_view base_view; - - if (nearest_base_info.has_value()) { - base_view = hoisted_base_view; - } else { - const JSON::String current_base{base.first}; - const auto base_entry{this->locations_.find( - {SchemaReferenceType::Static, current_base})}; - if (base_entry != this->locations_.cend()) { - base_view = base_entry->first.second; - } else { - base_view = base.first; - } - } - - if (is_subschema) { - store(this->locations_, SchemaReferenceType::Static, - SchemaFrame::LocationType::Subschema, std::move(result), - base_view, pointer_weak, nearest_base_depth, - dialect_for_pointer, base_dialect_for_pointer, - subschema_it->second.parent, - subschema_it->second.property_name, - subschema_it->second.orphan, false, true); - } else { - const auto &parent_pointer{combined.dialect_match.has_value() - ? combined.dialect_match->second - : empty_weak_pointer}; - const auto parent_subschema_it{subschemas.find(parent_pointer)}; - const bool parent_property_name{ - parent_subschema_it != subschemas.cend() && - parent_subschema_it->second.property_name}; - const bool parent_orphan{parent_subschema_it != subschemas.cend() && - parent_subschema_it->second.orphan}; - - store(this->locations_, SchemaReferenceType::Static, - SchemaFrame::LocationType::Pointer, std::move(result), - base_view, pointer_weak, nearest_base_depth, - dialect_for_pointer, base_dialect_for_pointer, parent_pointer, - parent_property_name, parent_orphan, false, true); - } - } - } - } - } - - if (this->mode_ == SchemaFrame::Mode::Locations) { - return; - } - - // Resolve references after all framing was performed - for (const auto &entry : subschema_entries) { - const auto &common_pointer_weak{entry.common.pointer}; - if (entry.common.subschema.get().is_object()) { - const auto nearest_bases{find_nearest_bases( - base_uris, common_pointer_weak, - entry.id ? std::optional{*entry.id} - : std::nullopt)}; - const auto *ref_value{entry.common.subschema.get().try_at("$ref")}; - if (ref_value) { - if (!ref_value->is_string()) { - std::ostringstream value; - sourcemeta::core::stringify(*ref_value, value); - throw sourcemeta::core::SchemaKeywordError("$ref", value.str(), - "Invalid reference value"); - } - - const auto &original{ref_value->to_string()}; - sourcemeta::core::URI ref; - try { - ref = sourcemeta::core::URI{original}; - } catch (const URIParseError &) { - throw sourcemeta::core::SchemaKeywordError( - "$ref", original, "The reference is not a valid URI"); - } - - if (!nearest_bases.first.empty()) { - ref.resolve_from(nearest_bases.first.front()); - } - - ref.canonicalize(); - auto ref_pointer{common_pointer_weak}; - ref_pointer.push_back(std::cref(KEYWORD_REF)); - const auto [it, inserted] = this->references_.insert_or_assign( - {SchemaReferenceType::Static, std::move(ref_pointer)}, - SchemaFrame::ReferencesEntry{.original = original, - .destination = ref.recompose(), - .base = std::string_view{}, - .fragment = std::nullopt}); - set_base_and_fragment(it->second); - } - - const auto *recursive_ref_value{ - entry.common.vocabularies.contains( - Vocabularies::Known::JSON_Schema_2019_09_Core) - ? entry.common.subschema.get().try_at("$recursiveRef") - : nullptr}; - if (recursive_ref_value) { - if (!recursive_ref_value->is_string()) { - std::ostringstream value; - sourcemeta::core::stringify(*recursive_ref_value, value); - throw sourcemeta::core::SchemaKeywordError( - "$recursiveRef", value.str(), - "Invalid recursive reference value"); - } - - const auto &ref{recursive_ref_value->to_string()}; - - // The behavior of this keyword is defined only for the value "#". - // Implementations MAY choose to consider other values to be errors. - // See - // https://json-schema.org/draft/2019-09/draft-handrews-json-schema-02#rfc.section.8.2.4.2.1 - if (ref != "#") { - throw sourcemeta::core::SchemaReferenceError( - entry.id.value_or(""), - to_pointer(common_pointer_weak).concat({"$recursiveRef"}), - "Invalid recursive reference"); - } - - auto anchor_uri_string{ - nearest_bases.first.empty() ? "" : nearest_bases.first.front()}; - const auto recursive_anchor{this->locations_.find( - {SchemaReferenceType::Dynamic, anchor_uri_string})}; - const auto reference_type{recursive_anchor == this->locations_.end() - ? SchemaReferenceType::Static - : SchemaReferenceType::Dynamic}; - const sourcemeta::core::URI anchor_uri{anchor_uri_string}; - auto recursive_ref_pointer{common_pointer_weak}; - recursive_ref_pointer.push_back(std::cref(KEYWORD_RECURSIVE_REF)); - const auto [it, inserted] = this->references_.insert_or_assign( - {reference_type, std::move(recursive_ref_pointer)}, - SchemaFrame::ReferencesEntry{.original = ref, - .destination = anchor_uri.recompose(), - .base = std::string_view{}, - .fragment = std::nullopt}); - set_base_and_fragment(it->second); - } - - const auto *dynamic_ref_value{ - entry.common.vocabularies.contains( - Vocabularies::Known::JSON_Schema_2020_12_Core) - ? entry.common.subschema.get().try_at("$dynamicRef") - : nullptr}; - if (dynamic_ref_value) { - if (!dynamic_ref_value->is_string()) { - std::ostringstream value; - sourcemeta::core::stringify(*dynamic_ref_value, value); - throw sourcemeta::core::SchemaKeywordError( - "$dynamicRef", value.str(), "Invalid dynamic reference value"); - } - - const auto &original{dynamic_ref_value->to_string()}; - sourcemeta::core::URI ref; - try { - ref = sourcemeta::core::URI{original}; - } catch (const URIParseError &) { - throw sourcemeta::core::SchemaKeywordError( - "$dynamicRef", original, - "The dynamic reference is not a valid URI"); - } - - if (!nearest_bases.first.empty()) { - ref.resolve_from(nearest_bases.first.front()); - } - - ref.canonicalize(); - auto ref_string{ref.recompose()}; - - // Note that here we cannot enforce the bookending requirement, - // as the dynamic reference may point to a schema resource that - // is not part of or bundled within the schema we are analyzing here. - - const auto has_fragment{ref.fragment().has_value()}; - const auto maybe_static_frame{ - this->locations_.find({SchemaReferenceType::Static, ref_string})}; - const auto maybe_dynamic_frame{ - this->locations_.find({SchemaReferenceType::Dynamic, ref_string})}; - const auto behaves_as_static{ - !has_fragment || - (has_fragment && maybe_static_frame != this->locations_.end() && - maybe_dynamic_frame == this->locations_.end())}; - auto dynamic_ref_pointer{common_pointer_weak}; - dynamic_ref_pointer.push_back(std::cref(KEYWORD_DYNAMIC_REF)); - const auto [it, inserted] = this->references_.insert_or_assign( - {behaves_as_static ? SchemaReferenceType::Static - : SchemaReferenceType::Dynamic, - std::move(dynamic_ref_pointer)}, - SchemaFrame::ReferencesEntry{.original = original, - .destination = std::move(ref_string), - .base = std::string_view{}, - .fragment = std::nullopt}); - set_base_and_fragment(it->second); - } - } - } - - // A schema is standalone if all references can be resolved within itself - this->standalone_ = - std::ranges::all_of(this->references_, [&](const auto &reference) { - assert(!reference.first.second.empty()); - assert(reference.first.second.back().is_property()); - // TODO: This check might need to be more elaborate given - // https://github.com/sourcemeta/core/issues/1390 - return reference.first.second.back().to_property() == "$schema" || - this->locations_.contains({SchemaReferenceType::Static, - reference.second.destination}) || - this->locations_.contains({SchemaReferenceType::Dynamic, - reference.second.destination}); - }); - - if (this->standalone_) { - // Find all dynamic anchors - // Values are pointers to full URIs in locations_ - std::unordered_map> - dynamic_anchors; - for (const auto &entry : this->locations_) { - if (entry.first.first != SchemaReferenceType::Dynamic || - entry.second.type != SchemaFrame::LocationType::Anchor) { - continue; - } - - const URI anchor_uri{entry.first.second}; - // Copy the fragment to avoid dangling string_view (anchor_uri is local) - const JSON::String fragment{anchor_uri.fragment().value_or("")}; - dynamic_anchors[fragment].push_back(&entry.first.second); - } - - // If there is a dynamic reference that only has one possible - // dynamic anchor destination, then that dynamic reference - // is a static reference in disguise - std::vector to_delete; - std::vector to_insert; - for (const auto &reference : this->references_) { - if (reference.first.first != SchemaReferenceType::Dynamic || - !reference.second.fragment.has_value()) { - continue; - } - - const auto match{dynamic_anchors.find( - JSON::String{reference.second.fragment.value()})}; - assert(match != dynamic_anchors.cend()); - // Otherwise we can assume there is only one possible target for the - // dynamic reference - if (match->second.size() != 1) { - continue; - } - - to_delete.push_back(reference.first); - to_insert.emplace_back( - SchemaFrame::References::key_type{SchemaReferenceType::Static, - reference.first.second}, - SchemaFrame::References::mapped_type{ - reference.second.original, *match->second.front(), - std::string_view{}, std::nullopt}); - } - - // Because we can't mutate a map as we are traversing it - - for (const auto &key : to_delete) { - this->references_.erase(key); - } - - for (auto &&entry : to_insert) { - const auto [it, inserted] = this->references_.emplace(std::move(entry)); - set_base_and_fragment(it->second); - } - } -} - -auto SchemaFrame::locations() const noexcept -> const Locations & { - return this->locations_; -} - -auto SchemaFrame::references() const noexcept -> const References & { - return this->references_; -} - -auto SchemaFrame::reference(const SchemaReferenceType type, - const WeakPointer &pointer) const - -> std::optional> { - const auto result{this->references_.find({type, pointer})}; - if (result != this->references_.cend()) { - return result->second; - } - - return std::nullopt; -} - -auto SchemaFrame::standalone() const noexcept -> bool { - return this->standalone_; -} - -auto SchemaFrame::root() const noexcept -> const JSON::String & { - return this->root_; -} - -auto SchemaFrame::vocabularies(const Location &location, - const SchemaResolver &resolver) const - -> Vocabularies { - return sourcemeta::core::vocabularies(resolver, location.base_dialect, - location.dialect); -} - -auto SchemaFrame::uri(const Location &location, - const WeakPointer &relative_schema_location) const - -> JSON::String { - return to_uri(this->relative_instance_location(location).concat( - relative_schema_location), - location.base) - .recompose(); -} - -auto SchemaFrame::traverse(const Location &location, - const WeakPointer &relative_schema_location) const - -> const Location & { - const auto new_uri{this->uri(location, relative_schema_location)}; - const auto static_match{ - this->locations_.find({SchemaReferenceType::Static, new_uri})}; - if (static_match != this->locations_.cend()) { - return static_match->second; - } - - const auto dynamic_match{ - this->locations_.find({SchemaReferenceType::Dynamic, new_uri})}; - assert(dynamic_match != this->locations_.cend()); - return dynamic_match->second; -} - -auto SchemaFrame::traverse(const std::string_view uri) const - -> std::optional> { - const JSON::String uri_string{uri}; - const auto static_result{ - this->locations_.find({SchemaReferenceType::Static, uri_string})}; - if (static_result != this->locations_.cend()) { - return static_result->second; - } - - const auto dynamic_result{ - this->locations_.find({SchemaReferenceType::Dynamic, uri_string})}; - if (dynamic_result != this->locations_.cend()) { - return dynamic_result->second; - } - - return std::nullopt; -} - -auto SchemaFrame::traverse(const WeakPointer &pointer) const - -> std::optional> { - this->populate_pointer_to_location(); - const auto iterator{this->pointer_to_location_.find(std::cref(pointer))}; - if (iterator == this->pointer_to_location_.cend() || - iterator->second.empty()) { - return std::nullopt; - } - - return *(iterator->second.front()); -} - -auto SchemaFrame::traverse(const WeakPointer &pointer, - const LocationType type) const - -> std::optional> { - this->populate_pointer_to_location(); - const auto iterator{this->pointer_to_location_.find(std::cref(pointer))}; - if (iterator == this->pointer_to_location_.cend()) { - return std::nullopt; - } - - for (const auto *location : iterator->second) { - if (location->type == type) { - return *location; - } - } - - return std::nullopt; -} - -auto SchemaFrame::uri(const WeakPointer &pointer) const - -> std::optional> { - this->populate_pointer_to_location(); - const auto iterator{this->pointer_to_location_.find(std::cref(pointer))}; - if (iterator == this->pointer_to_location_.cend()) { - return std::nullopt; - } - - const Location *best{nullptr}; - for (const auto *location : iterator->second) { - if (best == nullptr || location->type < best->type) { - best = location; - } - } - - if (best != nullptr) { - for (const auto &entry : this->locations_) { - if (&entry.second == best) { - return entry.first.second; - } - } - } - - return std::nullopt; -} - -auto SchemaFrame::dereference(const Location &location, - const WeakPointer &relative_schema_location) const - -> std::pair>> { - const auto effective_location{ - location.pointer.concat(relative_schema_location)}; - const auto maybe_reference_entry{this->references_.find( - {SchemaReferenceType::Static, effective_location})}; - if (maybe_reference_entry == this->references_.cend()) { - // If static dereferencing failed but we know the reference - // is dynamic, then report so, but without a location, as by - // definition we can't know the destination until at runtime - if (this->references_.contains( - {SchemaReferenceType::Dynamic, effective_location})) { - return {SchemaReferenceType::Dynamic, std::nullopt}; - } - - return {SchemaReferenceType::Static, std::nullopt}; - } - - const auto destination{ - this->locations_.find({SchemaReferenceType::Static, - maybe_reference_entry->second.destination})}; - assert(destination != this->locations_.cend()); - return {SchemaReferenceType::Static, destination->second}; -} - -auto SchemaFrame::has_references_to(const WeakPointer &pointer) const -> bool { - for (const auto &reference : this->references_) { - assert(!reference.first.second.empty()); - assert(reference.first.second.back().is_property()); - - if (reference.first.first == SchemaReferenceType::Static) { - const auto match{this->locations_.find( - {reference.first.first, reference.second.destination})}; - if (match != this->locations_.cend() && - match->second.pointer == pointer) { - return true; - } - } else { - for (const auto &location : this->locations_) { - if (location.second.type == LocationType::Anchor && - location.first.first == SchemaReferenceType::Dynamic && - location.second.pointer == pointer) { - if (!reference.second.fragment.has_value() || - URI{location.first.second}.fragment().value_or("") == - reference.second.fragment.value()) { - return true; - } - } - } - } - } - - return false; -} - -auto SchemaFrame::has_references_through(const WeakPointer &pointer) const - -> bool { - for (const auto &reference : this->references_) { - assert(!reference.first.second.empty()); - assert(reference.first.second.back().is_property()); - - if (reference.first.first == SchemaReferenceType::Static) { - const auto match{this->locations_.find( - {reference.first.first, reference.second.destination})}; - if (match != this->locations_.cend() && - match->second.pointer.starts_with(pointer)) { - return true; - } - } else { - for (const auto &location : this->locations_) { - if (location.second.type == LocationType::Anchor && - location.first.first == SchemaReferenceType::Dynamic && - location.second.pointer.starts_with(pointer)) { - if (!reference.second.fragment.has_value() || - URI{location.first.second}.fragment().value_or("") == - reference.second.fragment.value()) { - return true; - } - } - } - } - } - - return false; -} - -auto SchemaFrame::has_references_through(const WeakPointer &pointer, - const WeakPointer::Token &tail) const - -> bool { - for (const auto &reference : this->references_) { - assert(!reference.first.second.empty()); - assert(reference.first.second.back().is_property()); - - if (reference.first.first == SchemaReferenceType::Static) { - const auto match{this->locations_.find( - {reference.first.first, reference.second.destination})}; - if (match != this->locations_.cend() && - match->second.pointer.starts_with(pointer, tail)) { - return true; - } - } else { - for (const auto &location : this->locations_) { - if (location.second.type == LocationType::Anchor && - location.first.first == SchemaReferenceType::Dynamic && - location.second.pointer.starts_with(pointer, tail)) { - if (!reference.second.fragment.has_value() || - URI{location.first.second}.fragment().value_or("") == - reference.second.fragment.value()) { - return true; - } - } - } - } - } - - return false; -} - -auto SchemaFrame::relative_instance_location(const Location &location) const - -> WeakPointer { - return location.pointer.slice(location.relative_pointer); -} - -auto SchemaFrame::empty() const noexcept -> bool { - return this->locations_.empty() && this->references_.empty(); -} - -auto SchemaFrame::reset() -> void { - this->pointers_with_non_orphan_.clear(); - this->pointer_to_location_.clear(); - this->reachability_.clear(); - this->references_by_destination_.clear(); - this->location_members_children_.clear(); - this->descendants_by_pointer_.clear(); - this->potential_sources_by_location_.clear(); - this->reachability_graph_.clear(); - this->canonical_pointer_.clear(); - this->location_to_canonical_.clear(); - this->root_.clear(); - this->locations_.clear(); - this->references_.clear(); - this->standalone_ = false; -} - -auto SchemaFrame::populate_pointer_to_location() const -> void { - if (!this->pointer_to_location_.empty()) { - return; - } - - this->pointer_to_location_.reserve(this->locations_.size()); - for (const auto &entry : this->locations_) { - this->pointer_to_location_[std::cref(entry.second.pointer)].push_back( - &entry.second); - } -} - -auto SchemaFrame::populate_location_members( - const SchemaWalker &walker, const SchemaResolver &resolver) const -> void { - if (!this->location_members_children_.empty()) { - return; - } - - this->populate_pointer_to_location(); - - for (const auto &entry : this->locations_) { - if (entry.second.type != LocationType::Subschema) { - continue; - } - if (!entry.second.parent.has_value()) { - continue; - } - const auto &parent_pointer{entry.second.parent.value()}; - const auto relative{entry.second.pointer.slice(parent_pointer.size())}; - if (relative.empty() || !relative.at(0).is_property()) { - continue; - } - const auto parent_location{this->traverse(parent_pointer)}; - if (!parent_location.has_value()) { - continue; - } - const auto vocabs{this->vocabularies(parent_location->get(), resolver)}; - const auto &keyword_result{walker(relative.at(0).to_property(), vocabs)}; - if (keyword_result.type == SchemaKeywordType::LocationMembers) { - this->location_members_children_.insert(std::cref(entry.second.pointer)); - } - } -} - -auto SchemaFrame::populate_descendants() const -> void { - if (!this->descendants_by_pointer_.empty()) { - return; - } - - this->populate_pointer_to_location(); - - for (const auto &entry : this->locations_) { - if (entry.second.type == LocationType::Pointer) { - continue; - } - - const auto &pointer{entry.second.pointer}; - const auto *location{&entry.second}; - - WeakPointer prefix; - for (std::size_t index = 0; index <= pointer.size(); ++index) { - auto prefix_iter = this->pointer_to_location_.find(std::cref(prefix)); - if (prefix_iter != this->pointer_to_location_.end() && - !prefix_iter->second.empty()) { - const auto &key_pointer{prefix_iter->second.front()->pointer}; - this->descendants_by_pointer_[std::cref(key_pointer)].push_back( - location); - } - if (index < pointer.size()) { - const auto &token{pointer.at(index)}; - if (token.is_property()) { - prefix.emplace_back(token.to_property(), token.property_hash()); - } else { - prefix.push_back(token.to_index()); - } - } - } - } -} - -auto SchemaFrame::populate_potential_sources( - const SchemaWalker &walker, const SchemaResolver &resolver) const -> void { - if (!this->potential_sources_by_location_.empty()) { - return; - } - - this->populate_reference_graph(); - this->populate_location_members(walker, resolver); - - for (const auto &entry : this->locations_) { - if (entry.second.type == LocationType::Pointer) { - continue; - } - - const auto &pointer{entry.second.pointer}; - const auto *location{&entry.second}; - std::vector sources; - - WeakPointer ancestor = pointer; - bool first_iteration{true}; - while (first_iteration || !ancestor.empty()) { - auto destination_iterator = - this->references_by_destination_.find(std::cref(ancestor)); - if (destination_iterator != this->references_by_destination_.end()) { - bool crosses{false}; - if (ancestor != pointer) { - for (const auto &boundary_ref : this->location_members_children_) { - const auto &boundary{boundary_ref.get()}; - if (pointer.starts_with(boundary) && - !ancestor.starts_with(boundary)) { - crosses = true; - break; - } - } - } - - for (const auto *source_pointer : destination_iterator->second) { - sources.push_back( - PotentialSource{.source_pointer = source_pointer, - .source_parent = source_pointer->initial(), - .crosses = crosses}); - } - } - - if (ancestor.empty()) { - break; - } - ancestor = ancestor.initial(); - first_iteration = false; - } - - if (!sources.empty()) { - this->potential_sources_by_location_[location] = std::move(sources); - } - } -} - -auto SchemaFrame::populate_reference_graph() const -> void { - if (!this->references_by_destination_.empty()) { - return; - } - - std::unordered_map> - dynamic_anchors_by_fragment; - for (const auto &location : this->locations_) { - if (location.first.first == SchemaReferenceType::Dynamic && - location.second.type == LocationType::Anchor) { - const auto &uri{location.first.second}; - const auto hash_pos{uri.rfind('#')}; - if (hash_pos != std::string::npos) { - std::string_view fragment{uri.data() + hash_pos + 1, - uri.size() - hash_pos - 1}; - dynamic_anchors_by_fragment[fragment].push_back( - &location.second.pointer); - } - } - } - - std::vector> - reference_destinations; - reference_destinations.reserve(this->references_.size()); - - for (const auto &reference : this->references_) { - const auto &source_pointer{reference.first.second}; - if (source_pointer.empty()) { - continue; - } - - if (reference.first.first == SchemaReferenceType::Dynamic && - reference.second.fragment.has_value()) { - const auto &fragment{reference.second.fragment.value()}; - const auto match{dynamic_anchors_by_fragment.find(fragment)}; - if (match != dynamic_anchors_by_fragment.cend()) { - for (const auto *destination_pointer : match->second) { - reference_destinations.emplace_back(&source_pointer, - destination_pointer); - } - } - - continue; - } - - const auto destination_location{this->locations_.find( - {SchemaReferenceType::Static, reference.second.destination})}; - if (destination_location != this->locations_.cend()) { - reference_destinations.emplace_back( - &source_pointer, &destination_location->second.pointer); - } - } - - for (const auto &[source, destination] : reference_destinations) { - this->references_by_destination_[std::cref(*destination)].push_back(source); - } -} - -auto SchemaFrame::populate_reachability_graph( - const SchemaWalker &walker, const SchemaResolver &resolver) const -> void { - if (!this->reachability_graph_.empty()) { - return; - } - - this->populate_pointer_to_location(); - this->populate_location_members(walker, resolver); - this->populate_reference_graph(); - - for (const auto &entry : this->locations_) { - if (entry.second.pointer.empty()) { - continue; - } - - const auto parent_pointer{entry.second.pointer.initial()}; - auto parent_iterator = - this->pointer_to_location_.find(std::cref(parent_pointer)); - if (parent_iterator == this->pointer_to_location_.end()) { - continue; - } - - for (const Location *parent_location : parent_iterator->second) { - this->reachability_graph_[parent_location].push_back( - ReachabilityEdge{.target = &entry.second, - .orphan_context_only = entry.second.orphan, - .is_reference = false}); - } - } - - for (const auto &[destination_reference, sources] : - this->references_by_destination_) { - auto destination_locations_iterator = - this->pointer_to_location_.find(destination_reference); - if (destination_locations_iterator == this->pointer_to_location_.end()) { - continue; - } - - const Location *destination_location{nullptr}; - for (const auto *location : destination_locations_iterator->second) { - if (location->type != LocationType::Pointer) { - destination_location = location; - break; - } - } - - if (!destination_location && - !destination_locations_iterator->second.empty()) { - destination_location = destination_locations_iterator->second.front(); - } - - if (!destination_location) { - continue; - } - - for (const auto *source_pointer : sources) { - if (source_pointer->empty()) { - continue; - } - - const auto source_parent_pointer{source_pointer->initial()}; - auto source_parent_iterator = - this->pointer_to_location_.find(std::cref(source_parent_pointer)); - if (source_parent_iterator == this->pointer_to_location_.end()) { - continue; - } - - for (const Location *source_parent_location : - source_parent_iterator->second) { - this->reachability_graph_[source_parent_location].push_back( - ReachabilityEdge{.target = destination_location, - .orphan_context_only = false, - .is_reference = true}); - } - } - } - - for (const auto &entry : this->locations_) { - auto result = this->canonical_pointer_.emplace( - std::cref(entry.second.pointer), &entry.second.pointer); - this->location_to_canonical_[&entry.second] = - result.second ? &entry.second.pointer : result.first->second; - } -} - -auto SchemaFrame::populate_reachability(const Location &base, - const SchemaWalker &walker, - const SchemaResolver &resolver) const - -> const ReachabilityCache & { - const ReachabilityKey key{.pointer = &base.pointer, .orphan = base.orphan}; - auto cache_iterator = this->reachability_.find(key); - if (cache_iterator != this->reachability_.end()) { - return cache_iterator->second; - } - - auto &cache = this->reachability_[key]; - this->populate_reachability_graph(walker, resolver); - - const Location *base_location{&base}; - std::vector queue; - std::unordered_set visited; - - queue.push_back(base_location); - visited.insert(base_location); - auto base_canonical_iterator = - this->location_to_canonical_.find(base_location); - if (base_canonical_iterator != this->location_to_canonical_.end()) { - cache.emplace(base_canonical_iterator->second, true); - } - - std::size_t queue_index{0}; - while (queue_index < queue.size()) { - const Location *current = queue[queue_index++]; - - auto edges_iterator = this->reachability_graph_.find(current); - if (edges_iterator == this->reachability_graph_.end()) { - continue; - } - - for (const auto &edge : edges_iterator->second) { - if (visited.contains(edge.target)) { - continue; - } - - if (edge.orphan_context_only && !base.orphan && !current->orphan) { - continue; - } - - if (!edge.is_reference && edge.orphan_context_only) { - auto target_iterator = this->location_members_children_.find( - std::cref(edge.target->pointer)); - if (target_iterator != this->location_members_children_.end()) { - const auto keyword_path{edge.target->pointer.initial()}; - if (keyword_path.starts_with(current->pointer)) { - continue; - } - } - } - - visited.insert(edge.target); - queue.push_back(edge.target); - - auto target_canonical_iterator = - this->location_to_canonical_.find(edge.target); - if (target_canonical_iterator != this->location_to_canonical_.end()) { - cache.emplace(target_canonical_iterator->second, true); - } - } - } - - return cache; -} - -auto SchemaFrame::is_reachable(const Location &base, const Location &location, - const SchemaWalker &walker, - const SchemaResolver &resolver) const -> bool { - assert(location.type != LocationType::Pointer); - const auto &cache{this->populate_reachability(base, walker, resolver)}; - auto canonical_iterator = this->location_to_canonical_.find(&location); - if (canonical_iterator == this->location_to_canonical_.end()) { - return false; - } - const auto iterator{cache.find(canonical_iterator->second)}; - return iterator != cache.end() && iterator->second; -} - -} // namespace sourcemeta::core diff --git a/src/core/jsonschema/helpers.h b/src/core/jsonschema/helpers.h deleted file mode 100644 index b3ca84fa2..000000000 --- a/src/core/jsonschema/helpers.h +++ /dev/null @@ -1,86 +0,0 @@ -#ifndef SOURCEMETA_CORE_JSONSCHEMA_HELPERS_H -#define SOURCEMETA_CORE_JSONSCHEMA_HELPERS_H - -#include - -#include // assert -#include // std::string_view - -namespace sourcemeta::core { - -inline auto id_keyword(const SchemaBaseDialect base_dialect) - -> std::string_view { - switch (base_dialect) { - case SchemaBaseDialect::JSON_Schema_2020_12: - case SchemaBaseDialect::JSON_Schema_2020_12_Hyper: - case SchemaBaseDialect::JSON_Schema_2019_09: - case SchemaBaseDialect::JSON_Schema_2019_09_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_7: - case SchemaBaseDialect::JSON_Schema_Draft_7_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_6: - case SchemaBaseDialect::JSON_Schema_Draft_6_Hyper: - return "$id"; - case SchemaBaseDialect::JSON_Schema_Draft_4: - case SchemaBaseDialect::JSON_Schema_Draft_4_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_3: - case SchemaBaseDialect::JSON_Schema_Draft_3_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_2_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_1_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_0_Hyper: - return "id"; - } - - assert(false); - return "$id"; -} - -inline auto definitions_keyword(const SchemaBaseDialect base_dialect) - -> std::string_view { - switch (base_dialect) { - case SchemaBaseDialect::JSON_Schema_2020_12: - case SchemaBaseDialect::JSON_Schema_2020_12_Hyper: - case SchemaBaseDialect::JSON_Schema_2019_09: - case SchemaBaseDialect::JSON_Schema_2019_09_Hyper: - return "$defs"; - case SchemaBaseDialect::JSON_Schema_Draft_7: - case SchemaBaseDialect::JSON_Schema_Draft_7_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_6: - case SchemaBaseDialect::JSON_Schema_Draft_6_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_4: - case SchemaBaseDialect::JSON_Schema_Draft_4_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_3: - case SchemaBaseDialect::JSON_Schema_Draft_3_Hyper: - return "definitions"; - case SchemaBaseDialect::JSON_Schema_Draft_2_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_1_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_0_Hyper: - return ""; - } - - assert(false); - return "$defs"; -} - -// In older drafts, the presence of `$ref` would override any sibling keywords -// See -// https://json-schema.org/draft-07/draft-handrews-json-schema-01#rfc.section.8.3 -inline auto -ref_overrides_adjacent_keywords(const SchemaBaseDialect base_dialect) -> bool { - switch (base_dialect) { - case SchemaBaseDialect::JSON_Schema_Draft_7: - case SchemaBaseDialect::JSON_Schema_Draft_7_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_6: - case SchemaBaseDialect::JSON_Schema_Draft_6_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_4: - case SchemaBaseDialect::JSON_Schema_Draft_4_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_3: - case SchemaBaseDialect::JSON_Schema_Draft_3_Hyper: - return true; - default: - return false; - } -} - -} // namespace sourcemeta::core - -#endif diff --git a/src/core/jsonschema/include/sourcemeta/core/jsonschema.h b/src/core/jsonschema/include/sourcemeta/core/jsonschema.h deleted file mode 100644 index 658168beb..000000000 --- a/src/core/jsonschema/include/sourcemeta/core/jsonschema.h +++ /dev/null @@ -1,520 +0,0 @@ -#ifndef SOURCEMETA_CORE_JSONSCHEMA_H_ -#define SOURCEMETA_CORE_JSONSCHEMA_H_ - -#ifndef SOURCEMETA_CORE_JSONSCHEMA_EXPORT -#include -#endif - -#include -#include - -// NOLINTBEGIN(misc-include-cleaner) -#include -#include -#include -#include -#include -// NOLINTEND(misc-include-cleaner) - -#include // std::uint8_t -#include // std::function -#include // std::optional, std::nullopt -#include // std::set -#include // std::string -#include // std::string_view - -/// @defgroup jsonschema JSON Schema -/// @brief A set of JSON Schema utilities across draft versions. -/// -/// This functionality is included as follows: -/// -/// ```cpp -/// #include -/// ``` - -namespace sourcemeta::core { - -/// @ingroup jsonschema -/// A default resolver that relies on built-in official schemas. -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto schema_resolver(const std::string_view identifier) -> std::optional; - -/// @ingroup jsonschema -/// Check if a given identifier corresponds to a known built-in schema -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto is_known_schema(const std::string_view identifier) noexcept -> bool; - -/// @ingroup jsonschema -/// Check if a given URI corresponds to an official schema released by the -/// JSON Schema organisation -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto is_official_schema(const std::string_view identifier) noexcept -> bool; - -/// @ingroup jsonschema -/// A default schema walker with support for a wide range of drafts -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto schema_walker(const std::string_view keyword, - const Vocabularies &vocabularies) - -> const SchemaWalkerResult &; - -/// @ingroup jsonschema -/// Stringify a base dialect to its URI -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto to_string(const SchemaBaseDialect base_dialect) -> std::string_view; - -/// @ingroup jsonschema -/// Parse a base dialect URI to its enum representation -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto to_base_dialect(const std::string_view base_dialect) - -> std::optional; - -/// @ingroup jsonschema -/// -/// Calculate the priority of a keyword that determines the ordering in which a -/// JSON Schema implementation should evaluate keyword on a subschema. It does -/// so based on the keyword dependencies expressed in the schema walker. The -/// higher the priority, the more the evaluation of such keyword must be -/// delayed. -/// -/// For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "prefixItems": [ true, true ], -/// "items": false -/// })JSON"); -/// -/// const auto vocabularies{ -/// sourcemeta::core::vocabularies( -/// document, sourcemeta::core::schema_resolver)}; -/// -/// assert(sourcemeta::core::schema_keyword_priority( -/// "prefixItems", vocabularies, -/// sourcemeta::core::schema_walker) == 0); -/// -/// // The "items" keyword must be evaluated after the "prefixItems" keyword -/// assert(sourcemeta::core::schema_keyword_priority( -/// "items", vocabularies, -/// sourcemeta::core::schema_walker) == 1); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto schema_keyword_priority(const std::string_view keyword, - const Vocabularies &vocabularies, - const SchemaWalker &walker) -> std::uint64_t; - -/// @ingroup jsonschema -/// -/// This function returns true if the given JSON instance is of a -/// schema-compatible type: an object or a boolean. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document{true}; -/// assert(sourcemeta::core::is_schema(document)); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto is_schema(const JSON &schema) -> bool; - -/// @ingroup jsonschema -/// -/// This function returns true if the given JSON instance is a schema -/// semantically equivalent to the empty schema. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document{true}; -/// assert(sourcemeta::core::is_empty_schema(document)); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto is_empty_schema(const JSON &schema) -> bool; - -/// @ingroup jsonschema -/// -/// This function returns the URI identifier of the given schema, or an empty -/// string view if the schema has no identifier. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "$id": "https://sourcemeta.com/example-schema" -/// })JSON"); -/// -/// const auto id{sourcemeta::core::identify( -/// document, sourcemeta::core::schema_resolver)}; -/// assert(!id.empty()); -/// assert(id == "https://sourcemeta.com/example-schema"); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto identify(const JSON &schema, const SchemaResolver &resolver, - std::string_view default_dialect = "", - std::string_view default_id = "", - bool allow_dialect_override = true) -> std::string_view; - -/// @ingroup jsonschema -/// -/// A shortcut to sourcemeta::core::identify if you know the base dialect -/// of the schema. -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto identify(const JSON &schema, const SchemaBaseDialect base_dialect, - std::string_view default_id = "") -> std::string_view; - -/// @ingroup jsonschema -/// -/// This function removes the top-level URI identifier of the given schema, if -/// any, given you know its base dialect. It is the caller responsibility to -/// ensure the schema doesn't perform relative references that might have -/// depended on such top-level identifier. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "$id": "https://sourcemeta.com/example-schema" -/// })JSON"); -/// -/// sourcemeta::core::anonymize(document, -/// sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -/// -/// const auto id{sourcemeta::core::identify( -/// document, sourcemeta::core::schema_resolver)}; -/// assert(id.empty()); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto anonymize(JSON &schema, const SchemaBaseDialect base_dialect) -> void; - -/// @ingroup jsonschema -/// -/// This function sets the identifier of a schema, replacing the existing one, -/// if any. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "$id": "https://sourcemeta.com/example-schema" -/// })JSON"); -/// -/// sourcemeta::core::reidentify(document, -/// "https://example.com/my-new-id", -/// sourcemeta::core::schema_resolver); -/// -/// const auto id{sourcemeta::core::identify( -/// document, sourcemeta::core::schema_resolver)}; -/// assert(!id.empty()); -/// assert(id == "https://example.com/my-new-id"); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto reidentify(JSON &schema, std::string_view new_identifier, - const SchemaResolver &resolver, - std::string_view default_dialect = "") -> void; - -/// @ingroup jsonschema -/// -/// A shortcut to sourcemeta::core::reidentify if you know the base -/// dialect of the schema. -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto reidentify(JSON &schema, std::string_view new_identifier, - const SchemaBaseDialect base_dialect) -> void; - -/// @ingroup jsonschema -/// -/// Get the dialect URI that corresponds to a JSON Schema instance. -/// The result is empty if the dialect cannot be determined. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "type": "object" -/// })JSON"); -/// -/// const auto dialect{sourcemeta::core::dialect(document)}; -/// assert(!dialect.empty()); -/// assert(dialect == "https://json-schema.org/draft/2020-12/schema"); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto dialect(const JSON &schema, std::string_view default_dialect = "", - bool allow_dialect_override = true) -> std::string_view; - -/// @ingroup jsonschema -/// -/// Get the metaschema document that describes the given schema. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "type": "object" -/// })JSON"); -/// -/// const sourcemeta::core::JSON metaschema{ -/// sourcemeta::core::metaschema( -/// document, sourcemeta::core::schema_resolver)}; -/// -/// sourcemeta::core::prettify(metaschema, std::cout); -/// std::cout << std::endl; -/// ``` -/// -/// This function will throw if the metaschema cannot be determined or resolved. -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto metaschema(const JSON &schema, const SchemaResolver &resolver, - std::string_view default_dialect = "") -> JSON; - -/// @ingroup jsonschema -/// -/// Get the base dialect that applies to the given schema. If you set -/// a default dialect URI, this will be used if the given schema does not -/// declare the `$schema` keyword. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "type": "object" -/// })JSON"); -/// -/// const auto base_dialect{ -/// sourcemeta::core::base_dialect( -/// document, sourcemeta::core::schema_resolver)}; -/// -/// assert(base_dialect.has_value()); -/// assert(base_dialect.value() == -/// sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto base_dialect(const JSON &schema, const SchemaResolver &resolver, - std::string_view default_dialect = "", - bool allow_dialect_override = true) - -> std::optional; - -/// @ingroup jsonschema -/// -/// Parse the `$vocabulary` keyword from a given schema, if set. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "$vocabulary": { -/// "https://json-schema.org/draft/2020-12/vocab/core": true, -/// "https://json-schema.org/draft/2020-12/vocab/applicator": true -/// } -/// })JSON"); -/// -/// const auto result{ -/// sourcemeta::core::parse_vocabularies( -/// document, sourcemeta::core::schema_resolver)}; -/// -/// assert(result.has_value()); -/// assert(result->size() == 2); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto parse_vocabularies(const JSON &schema, const SchemaResolver &resolver, - std::string_view default_dialect = "") - -> std::optional; - -/// @ingroup jsonschema -/// -/// A shortcut to sourcemeta::core::parse_vocabularies when the base dialect -/// is already known. -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto parse_vocabularies(const JSON &schema, - const SchemaBaseDialect base_dialect) - -> std::optional; - -/// @ingroup jsonschema -/// -/// List the vocabularies that a specific schema makes use of. If you set a -/// default dialect URI, this will be used if the given schema does not -/// declare the -/// `$schema` keyword. The resulting map values are set to `true` or `false` -/// depending on whether the corresponding vocabulary is required or optional, -/// respectively. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "type": "object" -/// })JSON"); -/// -/// const auto vocabularies{ -/// sourcemeta::core::vocabularies( -/// document, sourcemeta::core::schema_resolver)}; -/// -/// assert(vocabularies.at("https://json-schema.org/draft/2020-12/vocab/core")); -/// assert(vocabularies.at("https://json-schema.org/draft/2020-12/vocab/applicator")); -/// assert(vocabularies.at("https://json-schema.org/draft/2020-12/vocab/unevaluated")); -/// assert(vocabularies.at("https://json-schema.org/draft/2020-12/vocab/validation")); -/// assert(vocabularies.at("https://json-schema.org/draft/2020-12/vocab/meta-data")); -/// assert(vocabularies.at("https://json-schema.org/draft/2020-12/vocab/format-annotation")); -/// assert(vocabularies.at("https://json-schema.org/draft/2020-12/vocab/content")); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto vocabularies(const JSON &schema, const SchemaResolver &resolver, - std::string_view default_dialect = "") -> Vocabularies; - -/// @ingroup jsonschema -/// -/// A shortcut to sourcemeta::core::vocabularies based on the base -/// dialect and dialect URI. -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto vocabularies(const SchemaResolver &resolver, - const SchemaBaseDialect base_dialect, - std::string_view dialect) -> Vocabularies; - -/// @ingroup jsonschema -/// -/// Format a JSON Schema document by reordering all object properties throughout -/// the entire document according to an opinionated JSON Schema aware ordering. -/// This function modifies the schema in-place. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// #include -/// -/// sourcemeta::core::JSON schema = -/// sourcemeta::core::parse_json( -/// "{ \"type\": \"string\", \"minLength\": 3 }"); -/// sourcemeta::core::format(schema, sourcemeta::core::schema_walker, -/// sourcemeta::core::schema_resolver); -/// std::ostringstream stream; -/// sourcemeta::core::prettify(schema, stream); -/// std::cout << stream.str() << std::endl; -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto format(JSON &schema, const SchemaWalker &walker, - const SchemaResolver &resolver, - std::string_view default_dialect = "") -> void; - -/// @ingroup jsonschema -/// -/// Given a schema identifier, this function creates a JSON Schema wrapper that -/// references such schema. This is useful when trying to validate an instance -/// against a specific subset of a schema, as the wrapper allows you to make use -/// of JSON Schema referencing to get there without reinventing the wheel. For -/// example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON result = -/// sourcemeta::core::wrap("https://www.example.com#/foo/bar"); -/// -/// sourcemeta::core::prettify(result, std::cerr); -/// std::cerr << "\n"; -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto wrap(std::string_view identifier) -> JSON; - -/// @ingroup jsonschema -/// -/// Wrap a schema to only access one of its subschemas. This is useful if you -/// want to perform validation on only a specific part of the schema without -/// having to reinvent the wheel. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "items": { "type": "string" } -/// })JSON"); -/// -/// sourcemeta::core::SchemaFrame frame{ -/// sourcemeta::core::SchemaFrame::Mode::References}; -/// frame.analyse(document, sourcemeta::core::schema_walker, -/// sourcemeta::core::schema_resolver); -/// -/// const auto location{frame.traverse( -/// sourcemeta::core::WeakPointer{"items"}, -/// sourcemeta::core::SchemaFrame::LocationType::Subschema)}; -/// -/// sourcemeta::core::WeakPointer base; -/// const sourcemeta::core::JSON result = -/// sourcemeta::core::wrap(document, frame, location.value().get(), -/// sourcemeta::core::schema_resolver, base); -/// -/// sourcemeta::core::prettify(result, std::cerr); -/// std::cerr << "\n"; -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto wrap(const JSON &schema, const SchemaFrame &frame, - const SchemaFrame::Location &location, const SchemaResolver &resolver, - WeakPointer &base) -> JSON; - -/// @ingroup jsonschema -/// -/// Parse the value of a JSON Schema `type` keyword (which can be a string or -/// an array of strings) into a set of native JSON types. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const auto type{sourcemeta::core::parse_json(R"JSON([ "string", "null" -/// ])JSON")}; const auto types{sourcemeta::core::parse_schema_type(type)}; -/// assert(types.test( -/// static_cast(sourcemeta::core::JSON::Type::String))); -/// assert(types.test( -/// static_cast(sourcemeta::core::JSON::Type::Null))); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto parse_schema_type(const JSON &type) -> JSON::TypeSet; - -} // namespace sourcemeta::core - -#endif diff --git a/src/core/jsonschema/include/sourcemeta/core/jsonschema_bundle.h b/src/core/jsonschema/include/sourcemeta/core/jsonschema_bundle.h deleted file mode 100644 index 18f4fe645..000000000 --- a/src/core/jsonschema/include/sourcemeta/core/jsonschema_bundle.h +++ /dev/null @@ -1,195 +0,0 @@ -#ifndef SOURCEMETA_CORE_JSONSCHEMA_BUNDLE_H -#define SOURCEMETA_CORE_JSONSCHEMA_BUNDLE_H - -#ifndef SOURCEMETA_CORE_JSONSCHEMA_EXPORT -#include -#endif - -#include -#include - -// NOLINTBEGIN(misc-include-cleaner) -#include -#include -// NOLINTEND(misc-include-cleaner) - -#include // std::function -#include // std::string_view - -namespace sourcemeta::core { - -/// @ingroup jsonschema -/// A callback to get dependency information -/// - Origin URI (empty if none) -/// - Pointer (reference keyword from the origin) -/// - Target URI -/// - Target schema -using DependencyCallback = std::function; - -/// @ingroup jsonschema -/// -/// This function recursively traverses and reports the external references in a -/// schema. For example: -/// -/// ```cpp -/// #include -/// #include -/// -/// // A custom resolver that knows about an additional schema -/// static auto test_resolver(std::string_view identifier) -/// -> std::optional { -/// if (identifier == "https://www.example.com/test") { -/// return sourcemeta::core::parse_json(R"JSON({ -/// "$id": "https://www.example.com/test", -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "type": "string" -/// })JSON"); -/// } else { -/// return sourcemeta::core::schema_resolver(identifier); -/// } -/// } -/// -/// sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "items": { "$ref": "https://www.example.com/test" } -/// })JSON"); -/// -/// sourcemeta::core::dependencies(document, -/// sourcemeta::core::schema_walker, test_resolver, -/// [](const auto &origin, -/// const auto &pointer, -/// const auto &target, -/// const auto &schema) { -/// // Do something with the information -/// }); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto dependencies(const JSON &schema, const SchemaWalker &walker, - const SchemaResolver &resolver, - const DependencyCallback &callback, - std::string_view default_dialect = "", - std::string_view default_id = "", - const SchemaFrame::Paths &paths = {empty_weak_pointer}) - -> void; - -/// @ingroup jsonschema -/// -/// This function bundles a JSON Schema (starting from Draft 4) by embedding -/// every remote reference into the top level schema resource, handling circular -/// dependencies and more. This overload mutates the input schema. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// // A custom resolver that knows about an additional schema -/// static auto test_resolver(std::string_view identifier) -/// -> std::optional { -/// if (identifier == "https://www.example.com/test") { -/// return sourcemeta::core::parse_json(R"JSON({ -/// "$id": "https://www.example.com/test", -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "type": "string" -/// })JSON"); -/// } else { -/// return sourcemeta::core::schema_resolver(identifier); -/// } -/// } -/// -/// sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "items": { "$ref": "https://www.example.com/test" } -/// })JSON"); -/// -/// sourcemeta::core::bundle(document, -/// sourcemeta::core::schema_walker, test_resolver); -/// -/// const sourcemeta::core::JSON expected = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "items": { "$ref": "https://www.example.com/test" }, -/// "$defs": { -/// "https://www.example.com/test": { -/// "$id": "https://www.example.com/test", -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "type": "string" -/// } -/// } -/// })JSON"); -/// -/// assert(document == expected); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto bundle(JSON &schema, const SchemaWalker &walker, - const SchemaResolver &resolver, - std::string_view default_dialect = "", - std::string_view default_id = "", - const std::optional &default_container = std::nullopt, - const SchemaFrame::Paths &paths = {empty_weak_pointer}) -> void; - -/// @ingroup jsonschema -/// -/// This function bundles a JSON Schema (starting from Draft 4) by embedding -/// every remote reference into the top level schema resource, handling circular -/// dependencies and more. This overload returns a new schema, without mutating -/// the input schema. For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// // A custom resolver that knows about an additional schema -/// static auto test_resolver(std::string_view identifier) -/// -> std::optional { -/// if (identifier == "https://www.example.com/test") { -/// return sourcemeta::core::parse_json(R"JSON({ -/// "$id": "https://www.example.com/test", -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "type": "string" -/// })JSON"); -/// } else { -/// return sourcemeta::core::schema_resolver(identifier); -/// } -/// } -/// -/// const sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "items": { "$ref": "https://www.example.com/test" } -/// })JSON"); -/// -/// const sourcemeta::core::JSON result = -/// sourcemeta::core::bundle(document, -/// sourcemeta::core::schema_walker, test_resolver); -/// -/// const sourcemeta::core::JSON expected = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "items": { "$ref": "https://www.example.com/test" }, -/// "$defs": { -/// "https://www.example.com/test": { -/// "$id": "https://www.example.com/test", -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "type": "string" -/// } -/// } -/// })JSON"); -/// -/// assert(result == expected); -/// ``` -SOURCEMETA_CORE_JSONSCHEMA_EXPORT -auto bundle(const JSON &schema, const SchemaWalker &walker, - const SchemaResolver &resolver, - std::string_view default_dialect = "", - std::string_view default_id = "", - const std::optional &default_container = std::nullopt, - const SchemaFrame::Paths &paths = {empty_weak_pointer}) -> JSON; - -} // namespace sourcemeta::core - -#endif diff --git a/src/core/jsonschema/include/sourcemeta/core/jsonschema_error.h b/src/core/jsonschema/include/sourcemeta/core/jsonschema_error.h deleted file mode 100644 index 6dd586c16..000000000 --- a/src/core/jsonschema/include/sourcemeta/core/jsonschema_error.h +++ /dev/null @@ -1,278 +0,0 @@ -#ifndef SOURCEMETA_CORE_JSONSCHEMA_ERROR_H -#define SOURCEMETA_CORE_JSONSCHEMA_ERROR_H - -#ifndef SOURCEMETA_CORE_JSONSCHEMA_EXPORT -#include -#endif - -#include - -#include // std::exception -#include // std::string -#include // std::string_view - -namespace sourcemeta::core { - -// Exporting symbols that depends on the standard C++ library is considered -// safe. -// https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-2-c4275?view=msvc-170&redirectedfrom=MSDN -#if defined(_MSC_VER) -#pragma warning(disable : 4251 4275) -#endif - -/// @ingroup jsonschema -/// An error that represents a general schema error event -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaError : public std::exception { -public: - SchemaError(const char *message) : message_{message} {} - SchemaError(std::string message) = delete; - SchemaError(std::string &&message) = delete; - SchemaError(std::string_view message) = delete; - - [[nodiscard]] auto what() const noexcept -> const char * override { - return this->message_; - } - -private: - const char *message_; -}; - -/// @ingroup jsonschema -/// An error that represents a schema resolution failure event -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaResolutionError - : public std::exception { -public: - SchemaResolutionError(const std::string_view identifier, const char *message) - : identifier_{identifier}, message_{message} {} - - [[nodiscard]] auto what() const noexcept -> const char * override { - return this->message_; - } - - [[nodiscard]] auto identifier() const noexcept -> std::string_view { - return this->identifier_; - } - -private: - std::string identifier_; - const char *message_; -}; - -/// @ingroup jsonschema -/// An error that represents a relative meta-schema resolution failure event -/// Relative references to meta-schemas are invalid as per the specification -/// See https://json-schema.org/draft/2020-12/json-schema-core#section-8.1.1-2 -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaRelativeMetaschemaResolutionError - : public SchemaResolutionError { -public: - SchemaRelativeMetaschemaResolutionError(const std::string_view identifier) - : SchemaResolutionError{identifier, - "Relative meta-schema URIs are not valid " - "according to the JSON Schema specification"} {} -}; - -/// @ingroup jsonschema -/// An error that represents a schema vocabulary error -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaVocabularyError - : public std::exception { -public: - SchemaVocabularyError(const std::string_view uri, const char *message) - : uri_{uri}, message_{message} {} - - [[nodiscard]] auto what() const noexcept -> const char * override { - return this->message_; - } - - [[nodiscard]] auto uri() const noexcept -> std::string_view { - return this->uri_; - } - -private: - std::string uri_; - const char *message_; -}; - -/// @ingroup jsonschema -/// An error that represents a schema resolution failure event -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaReferenceError - : public std::exception { -public: - SchemaReferenceError(const std::string_view identifier, - Pointer schema_location, const char *message) - : identifier_{identifier}, schema_location_{std::move(schema_location)}, - message_{message} {} - - [[nodiscard]] auto what() const noexcept -> const char * override { - return this->message_; - } - - [[nodiscard]] auto identifier() const noexcept -> std::string_view { - return this->identifier_; - } - - [[nodiscard]] auto location() const noexcept -> const Pointer & { - return this->schema_location_; - } - -private: - std::string identifier_; - Pointer schema_location_; - const char *message_; -}; - -/// @ingroup jsonschema -/// An error that represents that the dialect of the schema could not determined -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaUnknownDialectError - : public std::exception { -public: - SchemaUnknownDialectError() = default; - - [[nodiscard]] auto what() const noexcept -> const char * override { - return "Could not determine the dialect of the schema"; - } -}; - -/// @ingroup jsonschema -/// An error that represents that the base dialect of the schema could not -/// determined -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaUnknownBaseDialectError - : public std::exception { -public: - SchemaUnknownBaseDialectError() = default; - - [[nodiscard]] auto what() const noexcept -> const char * override { - return "Could not determine the base dialect of the schema"; - } -}; - -/// @ingroup jsonschema -/// In JSON Schema Draft 7 and older, a schema that defines `$ref` is a -/// reference object where every other keywords are ignored -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaReferenceObjectResourceError - : public std::exception { -public: - SchemaReferenceObjectResourceError(const std::string_view identifier) - : identifier_{identifier} {} - - [[nodiscard]] auto what() const noexcept -> const char * override { - return "A schema with a top-level `$ref` in JSON Schema Draft 7 and older " - "dialects ignores every sibling keywords (like identifiers and " - "meta-schema declarations) and therefore many operations, like " - "bundling, are not possible without undefined behavior"; - } - - [[nodiscard]] auto identifier() const noexcept -> std::string_view { - return this->identifier_; - } - -private: - std::string identifier_; -}; - -/// @ingroup jsonschema -/// An error that represents an unrecognized base dialect -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaBaseDialectError - : public std::exception { -public: - SchemaBaseDialectError(const std::string_view base_dialect) - : base_dialect_{base_dialect} {} - - [[nodiscard]] auto what() const noexcept -> const char * override { - return "Unrecognized base dialect"; - } - - [[nodiscard]] auto base_dialect() const noexcept -> std::string_view { - return this->base_dialect_; - } - -private: - std::string base_dialect_; -}; - -/// @ingroup jsonschema -/// An error that represents a schema keyword error -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaKeywordError - : public std::exception { -public: - SchemaKeywordError(const std::string_view keyword, - const std::string_view value, const char *message) - : keyword_{keyword}, value_{value}, message_{message} {} - - [[nodiscard]] auto what() const noexcept -> const char * override { - return this->message_; - } - - [[nodiscard]] auto value() const noexcept -> std::string_view { - return this->value_; - } - - [[nodiscard]] auto keyword() const noexcept -> std::string_view { - return this->keyword_; - } - -private: - std::string keyword_; - std::string value_; - const char *message_; -}; - -/// @ingroup jsonschema -/// An error that represents a schema frame error -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaFrameError - : public std::exception { -public: - SchemaFrameError(const std::string_view identifier, const char *message) - : identifier_{identifier}, message_{message} {} - - [[nodiscard]] auto what() const noexcept -> const char * override { - return this->message_; - } - - [[nodiscard]] auto identifier() const noexcept -> std::string_view { - return this->identifier_; - } - -private: - std::string identifier_; - const char *message_; -}; - -/// @ingroup jsonschema -/// An error that represents a schema anchor collision error -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaAnchorCollisionError - : public std::exception { -public: - SchemaAnchorCollisionError(const std::string_view identifier, - Pointer location, Pointer other) - : identifier_{identifier}, location_(std::move(location)), - other_(std::move(other)) {} - - [[nodiscard]] auto what() const noexcept -> const char * override { - return "Schema anchor already exists"; - } - - [[nodiscard]] auto identifier() const noexcept -> std::string_view { - return this->identifier_; - } - - [[nodiscard]] auto location() const noexcept -> const Pointer & { - return this->location_; - } - - [[nodiscard]] auto other() const noexcept -> const Pointer & { - return this->other_; - } - -private: - std::string identifier_; - Pointer location_; - Pointer other_; -}; - -#if defined(_MSC_VER) -#pragma warning(default : 4251 4275) -#endif - -} // namespace sourcemeta::core - -#endif diff --git a/src/core/jsonschema/include/sourcemeta/core/jsonschema_frame.h b/src/core/jsonschema/include/sourcemeta/core/jsonschema_frame.h deleted file mode 100644 index cbc85e378..000000000 --- a/src/core/jsonschema/include/sourcemeta/core/jsonschema_frame.h +++ /dev/null @@ -1,352 +0,0 @@ -#ifndef SOURCEMETA_CORE_JSONSCHEMA_FRAME_H_ -#define SOURCEMETA_CORE_JSONSCHEMA_FRAME_H_ - -#ifndef SOURCEMETA_CORE_JSONSCHEMA_EXPORT -#include -#endif - -#include -#include - -#include -#include - -#include // std::invocable -#include // std::uint8_t -#include // std::reference_wrapper -#include // std::map -#include // std::optional -#include // std::set -#include // std::tuple -#include // std::unordered_map -#include // std::unordered_set -#include // std::pair -#include // std::vector - -namespace sourcemeta::core { - -/// @ingroup jsonschema -/// -/// This class performs a static analysis pass on the input schema, computing -/// things such as the static identifiers and references of a schema. -/// -/// For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$id": "https://www.example.com/schema", -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "items": { "$id": "foo", "type": "string" }, -/// "properties": { -/// "foo": { "$anchor": "test", "type": "number" }, -/// "bar": { "$ref": "#/properties/foo" } -/// } -/// })JSON"); -/// -/// sourcemeta::core::SchemaFrame -/// frame{sourcemeta::core::SchemaFrame::Mode::References}; -/// -/// frame.analyse(document, -/// sourcemeta::core::schema_walker, -/// sourcemeta::core::schema_resolver); -/// ``` -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaFrame { -public: - /// The mode of framing. More extensive analysis can be compute and memory - /// intensive - enum class Mode : std::uint8_t { Locations, References }; - - SchemaFrame(const Mode mode) : mode_{mode} {} - - // We rely on internal caches that would be dangling otherwise - SchemaFrame(const SchemaFrame &) = delete; - auto operator=(const SchemaFrame &) -> SchemaFrame & = delete; - SchemaFrame(SchemaFrame &&) = delete; - auto operator=(SchemaFrame &&) -> SchemaFrame & = delete; - - // Query the current mode that the schema frame was configured with - [[nodiscard]] auto mode() const noexcept -> Mode { return this->mode_; } - - /// A single entry in a JSON Schema reference map - struct ReferencesEntry { - std::string_view original; - // TODO: This one is tricky to turn into a view, as there is no - // location entry to point to if it is an external unresolved reference - JSON::String destination; - // Empty means no base - std::string_view base; - std::optional fragment; - }; - - /// A JSON Schema reference map is a mapping of a JSON Pointer - /// of a subschema to a destination static reference URI. - /// For convenience, the value consists of the URI on its entirety, - /// but also broken down by its potential fragment component. - /// The reference type is part of the key as it is possible to - /// have a static and a dynamic reference to the same location - /// on the same schema object. - using References = - std::map, ReferencesEntry>; - -#if defined(__GNUC__) -#pragma GCC diagnostic push -// GCC believes that a member of an enum class (which is namespaced by -// definition), can shadow an alias defined even on a different namespace. -#pragma GCC diagnostic ignored "-Wshadow" -#endif - /// @ingroup jsonschema - /// The type of a location frame - enum class LocationType : std::uint8_t { - Resource, - Anchor, - // TODO: Distinguish between a Pointer and a Keyword - Pointer, - Subschema - }; -#if defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - - /// A location entry - struct Location { - std::optional parent; - LocationType type; - std::string_view base; - WeakPointer pointer; - std::size_t relative_pointer; - std::string_view dialect; - SchemaBaseDialect base_dialect; - bool property_name; - bool orphan; - }; - - /// A JSON Schema reference frame is a mapping of URIs to schema identifiers, - /// JSON Pointers within the schema, and subschemas dialects. We call it - /// reference frame as this mapping is essential for resolving references. - // TODO: Consider replacing std::map with std::flat_map once libc++ - // supports it (__cpp_lib_flat_map) for better cache locality - using Locations = - // While it might seem weird that we namespace the location URIs with a - // reference type, it is essential for distinguishing schema resource URIs - // from `$recursiveRef: true` on another place of the schema schema - // resource, as otherwise they would both have the exact same URI, but - // point to different places. - std::map, Location>; - - /// A list of paths to frame within a schema wrapper - using Paths = std::vector; - - /// Export the frame entries as JSON - [[nodiscard]] auto to_json( - const std::optional &tracker = std::nullopt) const - -> JSON; - - /// Analyse a schema or set of schemas from a given root. Passing - /// multiple paths that have any overlap is undefined behaviour - auto analyse(const JSON &root, const SchemaWalker &walker, - const SchemaResolver &resolver, - std::string_view default_dialect = "", - std::string_view default_id = "", - const Paths &paths = {empty_weak_pointer}) -> void; - - /// Access the analysed schema locations - [[nodiscard]] auto locations() const noexcept -> const Locations &; - - /// Access the analysed schema references - [[nodiscard]] auto references() const noexcept -> const References &; - - /// Get a specific reference entry by type and pointer - [[nodiscard]] auto reference(const SchemaReferenceType type, - const WeakPointer &pointer) const - -> std::optional>; - - /// Check whether the analysed schema has no external references - [[nodiscard]] auto standalone() const noexcept -> bool; - - /// Get the root schema identifier (empty if none) - [[nodiscard]] auto root() const noexcept -> const JSON::String &; - - /// Get the vocabularies associated with a location entry - [[nodiscard]] auto vocabularies(const Location &location, - const SchemaResolver &resolver) const - -> Vocabularies; - - /// Get the URI associated with a location entry - [[nodiscard]] auto - uri(const Location &location, - const WeakPointer &relative_schema_location = empty_weak_pointer) const - -> JSON::String; - - /// Get the location associated by traversing a pointer from another location - [[nodiscard]] auto traverse(const Location &location, - const WeakPointer &relative_schema_location) const - -> const Location &; - - /// Get the location associated with a given URI - [[nodiscard]] auto traverse(const std::string_view uri) const - -> std::optional>; - - /// Get the location associated with a given pointer - [[nodiscard]] auto traverse(const WeakPointer &pointer) const - -> std::optional>; - - /// Get the location of a specific type associated with a given pointer - [[nodiscard]] auto traverse(const WeakPointer &pointer, - const LocationType type) const - -> std::optional>; - - /// Turn an absolute pointer into a location URI - [[nodiscard]] auto uri(const WeakPointer &pointer) const - -> std::optional>; - - /// Try to dereference a reference location into its destination location - [[nodiscard]] auto dereference( - const Location &location, - const WeakPointer &relative_schema_location = empty_weak_pointer) const - -> std::pair>>; - - /// Iterate over all resource URIs in the frame - template F> - auto for_each_resource_uri(const F &callback) const -> void { - for (const auto &[key, location] : this->locations_) { - if (location.type == LocationType::Resource) { - callback(key.second); - } - } - } - - /// Iterate over all unresolved references (where destination cannot be - /// traversed) - template F> - auto for_each_unresolved_reference(const F &callback) const -> void { - for (const auto &[key, reference] : this->references_) { - if (!this->traverse(reference.destination).has_value()) { - callback(key.second, reference); - } - } - } - - /// Check if there are any references to a given location pointer - [[nodiscard]] auto has_references_to(const WeakPointer &pointer) const - -> bool; - - /// Check if there are any references that go through a given location pointer - [[nodiscard]] auto has_references_through(const WeakPointer &pointer) const - -> bool; - /// Check if there are any references that go through a given location pointer - /// with a tail token - [[nodiscard]] auto - has_references_through(const WeakPointer &pointer, - const WeakPointer::Token &tail) const -> bool; - - /// Get the relative instance location pointer for a given location entry - [[nodiscard]] auto relative_instance_location(const Location &location) const - -> WeakPointer; - - /// Check if the frame has no analysed data - [[nodiscard]] auto empty() const noexcept -> bool; - - /// Reset the frame, clearing all analysed data - auto reset() -> void; - - /// Determines if a location could be evaluated during validation - [[nodiscard]] auto is_reachable(const Location &base, - const Location &location, - const SchemaWalker &walker, - const SchemaResolver &resolver) const -> bool; - -private: - Mode mode_; -// Exporting symbols that depends on the standard C++ library is considered -// safe. -// https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-2-c4275?view=msvc-170&redirectedfrom=MSDN -#if defined(_MSC_VER) -#pragma warning(disable : 4251 4275) -#endif - JSON::String root_; - Locations locations_; - References references_; - mutable std::unordered_map, - std::vector, WeakPointer::Hasher, - WeakPointer::Comparator> - pointer_to_location_; - mutable std::unordered_set, - WeakPointer::Hasher, WeakPointer::Comparator> - pointers_with_non_orphan_; - using ReachabilityCache = std::unordered_map; - struct ReachabilityKey { - const WeakPointer *pointer; - bool orphan; - auto operator==(const ReachabilityKey &other) const noexcept -> bool { - return this->pointer == other.pointer && this->orphan == other.orphan; - } - }; - struct ReachabilityKeyHasher { - auto operator()(const ReachabilityKey &key) const noexcept -> std::size_t { - return std::hash{}(key.pointer) ^ - (std::hash{}(key.orphan) << 1); - } - }; - mutable std::unordered_map - reachability_; - mutable std::unordered_map, - std::vector, - WeakPointer::Hasher, WeakPointer::Comparator> - references_by_destination_; - mutable std::unordered_set, - WeakPointer::Hasher, WeakPointer::Comparator> - location_members_children_; - mutable std::unordered_map, - std::vector, WeakPointer::Hasher, - WeakPointer::Comparator> - descendants_by_pointer_; - struct PotentialSource { - const WeakPointer *source_pointer; - WeakPointer source_parent; - bool crosses; - }; - mutable std::unordered_map> - potential_sources_by_location_; - struct ReachabilityEdge { - const Location *target; - bool orphan_context_only; - bool is_reference; - }; - mutable std::unordered_map> - reachability_graph_; - mutable std::unordered_map, - const WeakPointer *, WeakPointer::Hasher, - WeakPointer::Comparator> - canonical_pointer_; - mutable std::unordered_map - location_to_canonical_; - bool standalone_{false}; - - auto populate_pointer_to_location() const -> void; - auto populate_reference_graph() const -> void; - auto populate_location_members(const SchemaWalker &walker, - const SchemaResolver &resolver) const -> void; - auto populate_descendants() const -> void; - auto populate_potential_sources(const SchemaWalker &walker, - const SchemaResolver &resolver) const -> void; - auto populate_reachability_graph(const SchemaWalker &walker, - const SchemaResolver &resolver) const - -> void; - auto populate_reachability(const Location &base, const SchemaWalker &walker, - const SchemaResolver &resolver) const - -> const ReachabilityCache &; -#if defined(_MSC_VER) -#pragma warning(default : 4251 4275) -#endif -}; - -} // namespace sourcemeta::core - -#endif diff --git a/src/core/jsonschema/include/sourcemeta/core/jsonschema_types.h b/src/core/jsonschema/include/sourcemeta/core/jsonschema_types.h deleted file mode 100644 index 30f0ddfcc..000000000 --- a/src/core/jsonschema/include/sourcemeta/core/jsonschema_types.h +++ /dev/null @@ -1,234 +0,0 @@ -#ifndef SOURCEMETA_CORE_JSONSCHEMA_TYPES_H_ -#define SOURCEMETA_CORE_JSONSCHEMA_TYPES_H_ - -#include -#include -#include - -#include // std::uint8_t -#include // std::function, std::reference_wrapper -#include // std::optional -#include // std::string -#include // std::string_view -#include // std::unordered_set - -namespace sourcemeta::core { - -// Take a URI and get back a schema -/// @ingroup jsonschema -/// -/// Some functions need to reference other schemas by their URIs. To accomplish -/// this in a generic and flexible way, these functions take resolver functions -/// as arguments, of the type sourcemeta::core::SchemaResolver. -/// -/// For convenience, we provide the following default resolvers: -/// -/// - sourcemeta::core::schema_resolver -/// -/// You can implement resolvers to read from a local storage, to send HTTP -/// requests, or anything your application might require. Unless your resolver -/// is trivial, it is recommended to create a callable object that implements -/// the function interface. -using SchemaResolver = std::function(std::string_view)>; - -/// @ingroup jsonschema -/// The reference type -enum class SchemaReferenceType : std::uint8_t { Static, Dynamic }; - -/// @ingroup jsonschema -/// All the known JSON Schema base dialects -enum class SchemaBaseDialect : std::uint8_t { - JSON_Schema_2020_12, - JSON_Schema_2020_12_Hyper, - JSON_Schema_2019_09, - JSON_Schema_2019_09_Hyper, - JSON_Schema_Draft_7, - JSON_Schema_Draft_7_Hyper, - JSON_Schema_Draft_6, - JSON_Schema_Draft_6_Hyper, - JSON_Schema_Draft_4, - JSON_Schema_Draft_4_Hyper, - JSON_Schema_Draft_3, - JSON_Schema_Draft_3_Hyper, - JSON_Schema_Draft_2_Hyper, - JSON_Schema_Draft_1_Hyper, - JSON_Schema_Draft_0_Hyper -}; - -#if defined(__GNUC__) -#pragma GCC diagnostic push -// For some strange reason, GCC on Debian 11 believes that a member of -// an enum class (which is namespaced by definition), can shadow an -// alias defined even on a different namespace. -#pragma GCC diagnostic ignored "-Wshadow" -#endif -/// @ingroup jsonschema -/// Determines the type of a JSON Schema keyword -enum class SchemaKeywordType : std::uint8_t { - /// The JSON Schema keyword is unknown - Unknown, - /// The JSON Schema keyword is a non-applicator assertion - Assertion, - /// The JSON Schema keyword is a non-applicator annotation - Annotation, - /// The JSON Schema keyword is a reference - Reference, - /// The JSON Schema keyword is known but doesn't match any other type - Other, - /// The JSON Schema keyword is considered to be a comment without any - /// additional meaning - Comment, - /// The JSON Schema keyword is a reserved location that potentially - /// takes an object as argument, whose values are potentially - /// JSON Schema definitions - LocationMembers, - - /// The JSON Schema keyword is an applicator that potentially - /// takes an object as argument, whose values are potentially - /// JSON Schema definitions. - /// The instance traverses based on the members as property names - ApplicatorMembersTraversePropertyStatic, - /// The JSON Schema keyword is an applicator that potentially - /// takes an object as argument, whose values are potentially - /// JSON Schema definitions. - /// The instance traverses based on the members as property regular - /// expressions - ApplicatorMembersTraversePropertyRegex, - /// The JSON Schema keyword is an applicator that potentially - /// takes a JSON Schema definition as an argument - /// The instance traverses to some of the properties - ApplicatorValueTraverseSomeProperty, - /// The JSON Schema keyword is an applicator that potentially - /// takes a JSON Schema definition as an argument - /// The instance traverses to any property key - ApplicatorValueTraverseAnyPropertyKey, - /// The JSON Schema keyword is an applicator that potentially - /// takes a JSON Schema definition as an argument - /// The instance traverses to any item - ApplicatorValueTraverseAnyItem, - /// The JSON Schema keyword is an applicator that potentially - /// takes a JSON Schema definition as an argument - /// The instance traverses to some of the items - ApplicatorValueTraverseSomeItem, - /// The JSON Schema keyword is an applicator that potentially - /// takes a JSON Schema definition as an argument - /// The instance traverses back to the parent - ApplicatorValueTraverseParent, - /// The JSON Schema keyword is an applicator that potentially - /// takes an array of potentially JSON Schema definitions - /// as an argument - /// The instance traverses based on the element indexes - ApplicatorElementsTraverseItem, - /// The JSON Schema keyword is an applicator that may take a JSON Schema - /// definition or an array of potentially JSON Schema definitions - /// as an argument - /// The instance traverses to any item or based on the element indexes - ApplicatorValueOrElementsTraverseAnyItemOrItem, - /// The JSON Schema keyword is an applicator that may take a JSON Schema - /// definition or an array of potentially JSON Schema definitions - /// as an argument without affecting the instance location. - /// The instance does not traverse - ApplicatorValueOrElementsInPlace, - /// The JSON Schema keyword is an applicator that potentially - /// takes an object as argument, whose values are potentially - /// JSON Schema definitions without affecting the instance location. - /// The instance does not traverse - ApplicatorMembersInPlaceSome, - /// The JSON Schema keyword is an applicator that potentially - /// takes an array of potentially JSON Schema definitions - /// as an argument without affecting the instance location. - /// The instance does not traverse - ApplicatorElementsInPlace, - /// The JSON Schema keyword is an applicator that potentially - /// takes an array of potentially JSON Schema definitions - /// as an argument without affecting the instance location - /// The instance does not traverse, and only some of the - /// elements apply. - ApplicatorElementsInPlaceSome, - /// The JSON Schema keyword is an applicator that potentially - /// takes an array of potentially JSON Schema definitions - /// as an argument without affecting the instance location - /// The instance does not traverse, and only some of the - /// elements apply in negated form. - ApplicatorElementsInPlaceSomeNegate, - /// The JSON Schema keyword is an applicator that potentially - /// takes a JSON Schema definition as an argument without affecting the - /// instance location. - /// The instance does not traverse, and only applies some of the times. - ApplicatorValueInPlaceMaybe, - /// The JSON Schema keyword is an applicator that potentially - /// takes a JSON Schema definition as an argument but its evaluation follows - /// special rules. - /// The instance does not traverse - ApplicatorValueInPlaceOther, - /// The JSON Schema keyword is an applicator that potentially - /// takes a JSON Schema definition as an argument but the instance is expected - /// to not validate against it. - /// The instance does not traverse - ApplicatorValueInPlaceNegate, -}; -#if defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - -/// @ingroup jsonschema -/// A structure that encapsulates the result of walker over a specific keyword -struct SchemaWalkerResult { - /// The walker strategy to continue traversing across the schema - SchemaKeywordType type; - /// The vocabulary associated with the keyword, if any - std::optional vocabulary; - /// The keywords a given keyword depends on (if any) during the evaluation - /// process - std::unordered_set dependencies; - /// The keywords a given keyword depends on for evaluation ordering purposes - /// only (not semantic dependencies) - std::unordered_set order_dependencies; - /// The JSON instance types that this keyword applies to (empty means all) - JSON::TypeSet instances; - - // Prevent accidental copies, as walker results are always returned by - // reference - SchemaWalkerResult(const SchemaWalkerResult &) = delete; - auto operator=(const SchemaWalkerResult &) -> SchemaWalkerResult & = delete; - SchemaWalkerResult(SchemaWalkerResult &&) = default; - auto operator=(SchemaWalkerResult &&) -> SchemaWalkerResult & = default; - ~SchemaWalkerResult() = default; - - SchemaWalkerResult(SchemaKeywordType type_, - std::optional vocabulary_, - std::unordered_set dependencies_, - std::unordered_set order_dependencies_, - JSON::TypeSet instances_) - : type{type_}, vocabulary{std::move(vocabulary_)}, - dependencies{std::move(dependencies_)}, - order_dependencies{std::move(order_dependencies_)}, - instances{instances_} {} -}; - -/// @ingroup jsonschema -/// -/// For walking purposes, some functions need to understand which JSON Schema -/// keywords declare other JSON Schema definitions. To accomplish this in a -/// generic and flexible way that does not assume the use any vocabulary other -/// than `core`, these functions take a walker function as argument. -using SchemaWalker = std::function; - -/// @ingroup jsonschema -/// An entry of a schema iterator. -struct SchemaIteratorEntry { - std::optional parent; - WeakPointer pointer; - // TODO: Use "known" enum classes + strings for dialects - std::string_view dialect; - Vocabularies vocabularies; - std::optional base_dialect; - std::reference_wrapper subschema; - bool orphan; - bool property_name; -}; - -} // namespace sourcemeta::core - -#endif diff --git a/src/core/jsonschema/include/sourcemeta/core/jsonschema_vocabularies.h b/src/core/jsonschema/include/sourcemeta/core/jsonschema_vocabularies.h deleted file mode 100644 index 345d1213f..000000000 --- a/src/core/jsonschema/include/sourcemeta/core/jsonschema_vocabularies.h +++ /dev/null @@ -1,198 +0,0 @@ -#ifndef SOURCEMETA_CORE_JSONSCHEMA_VOCABULARIES_H_ -#define SOURCEMETA_CORE_JSONSCHEMA_VOCABULARIES_H_ - -#ifndef SOURCEMETA_CORE_JSONSCHEMA_EXPORT -#include -#endif - -#include - -#include // std::bitset -#include // assert -#include // std::uint32_t, std::size_t -#include // std::formatter, std::format_context, std::format_parse_context, std::format_to -#include // std::optional -#include // std::ostream -#include // std::ostringstream -#include // std::out_of_range -#include // std::string_view -#include // std::unordered_map -#include // std::unordered_set -#include // std::pair -#include // std::variant -#include // std::vector - -namespace sourcemeta::core { - -/// @ingroup jsonschema -/// Optimized vocabulary set using bitflags for known vocabularies -/// and a fallback `std::unordered_map` for custom vocabularies. -struct SOURCEMETA_CORE_JSONSCHEMA_EXPORT Vocabularies { - enum class Known : std::uint8_t { - // Pre-vocabulary dialects (treated as vocabularies) - JSON_Schema_Draft_0 = 0, - JSON_Schema_Draft_0_Hyper = 1, - JSON_Schema_Draft_1 = 2, - JSON_Schema_Draft_1_Hyper = 3, - JSON_Schema_Draft_2 = 4, - JSON_Schema_Draft_2_Hyper = 5, - JSON_Schema_Draft_3 = 6, - JSON_Schema_Draft_3_Hyper = 7, - JSON_Schema_Draft_4 = 8, - JSON_Schema_Draft_4_Hyper = 9, - JSON_Schema_Draft_6 = 10, - JSON_Schema_Draft_6_Hyper = 11, - JSON_Schema_Draft_7 = 12, - JSON_Schema_Draft_7_Hyper = 13, - // 2019-09 vocabularies - JSON_Schema_2019_09_Core = 14, - JSON_Schema_2019_09_Applicator = 15, - JSON_Schema_2019_09_Validation = 16, - JSON_Schema_2019_09_Meta_Data = 17, - JSON_Schema_2019_09_Format = 18, - JSON_Schema_2019_09_Content = 19, - JSON_Schema_2019_09_Hyper_Schema = 20, - // 2020-12 vocabularies - JSON_Schema_2020_12_Core = 21, - JSON_Schema_2020_12_Applicator = 22, - JSON_Schema_2020_12_Unevaluated = 23, - JSON_Schema_2020_12_Validation = 24, - JSON_Schema_2020_12_Meta_Data = 25, - JSON_Schema_2020_12_Format_Annotation = 26, - JSON_Schema_2020_12_Format_Assertion = 27, - JSON_Schema_2020_12_Content = 28, - // OpenAPI - // https://spec.openapis.org/oas/v3.1.0.html#fixed-fields-19 - OpenAPI_3_1_Base = 29, - // https://spec.openapis.org/oas/v3.2.0.html#base-vocabulary - OpenAPI_3_2_Base = 30 - }; - - // NOTE: Must be kept in sync with the Known enum above - static constexpr std::size_t KNOWN_VOCABULARY_COUNT = 31; - - /// A vocabulary URI type that can be either a known vocabulary enum or a - /// custom string URI - using URI = std::variant; - -public: - Vocabularies() = default; - Vocabularies(const Vocabularies &) = default; - Vocabularies(Vocabularies &&) noexcept = default; - auto operator=(const Vocabularies &) -> Vocabularies & = default; - auto operator=(Vocabularies &&) noexcept -> Vocabularies & = default; - ~Vocabularies() = default; - - /// Construct from initializer list - Vocabularies(std::initializer_list> init); - - /// Construct from initializer list using known vocabulary enums - Vocabularies(std::initializer_list> init); - - /// Check if a vocabulary is enabled - [[nodiscard]] auto contains(const JSON::String &uri) const noexcept -> bool; - - /// Check if a known vocabulary is enabled - [[nodiscard]] auto contains(Known vocabulary) const noexcept -> bool; - - /// Check if any of the given known vocabularies are enabled - [[nodiscard]] auto - contains_any(std::initializer_list vocabularies) const noexcept - -> bool; - - /// Insert a vocabulary with its required/optional status - auto insert(const JSON::String &uri, bool required) noexcept -> void; - - /// Insert a known vocabulary with its required/optional status - auto insert(Known vocabulary, bool required) noexcept -> void; - - /// Get vocabulary status by URI - [[nodiscard]] auto get(const JSON::String &uri) const noexcept - -> std::optional; - - /// Get known vocabulary status - [[nodiscard]] auto get(Known vocabulary) const noexcept - -> std::optional; - - /// Get the number of vocabularies (required + optional + custom) - [[nodiscard]] auto size() const noexcept -> std::size_t; - - /// Check if there are no vocabularies - [[nodiscard]] auto empty() const noexcept -> bool; - - /// Check if there are any unknown vocabularies - [[nodiscard]] auto has_unknown() const noexcept -> bool; - - /// Throw if the current vocabularies have required ones outside the given - /// supported set - auto throw_if_any_unsupported(const std::unordered_set &supported, - const char *message) const -> void; - - /// Throw if any unknown vocabulary is required - auto throw_if_any_unknown_required(const char *message) const -> void; - -private: - // Invariant: required_known and optional_known must be mutually exclusive - // A vocabulary can be either required (true) OR optional (false), never both -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4251) -#endif - std::bitset required_known{}; - std::bitset optional_known{}; - // Lazily initialized only when unknown (non-official) vocabularies are used - std::optional> unknown{std::nullopt}; -#ifdef _MSC_VER -#pragma warning(pop) -#endif -}; - -/// Convert a known vocabulary enum to its URI string -SOURCEMETA_CORE_JSONSCHEMA_EXPORT auto -operator<<(std::ostream &stream, Vocabularies::Known vocabulary) - -> std::ostream &; - -/// Convert a vocabulary URI to its string representation -SOURCEMETA_CORE_JSONSCHEMA_EXPORT auto -operator<<(std::ostream &stream, const Vocabularies::URI &vocabulary) - -> std::ostream &; - -/// Stringify a known vocabulary to a string -SOURCEMETA_CORE_JSONSCHEMA_EXPORT auto to_string(Vocabularies::Known vocabulary) - -> std::string_view; - -/// Stringify a vocabulary URI to a string -SOURCEMETA_CORE_JSONSCHEMA_EXPORT auto -to_string(const Vocabularies::URI &vocabulary) -> std::string_view; - -} // namespace sourcemeta::core - -template <> struct std::formatter { - constexpr auto parse(std::format_parse_context &context) - -> decltype(context.begin()) { - return context.begin(); - } - - auto format(const sourcemeta::core::Vocabularies::Known value, - std::format_context &context) const -> decltype(context.out()) { - std::ostringstream stream; - stream << value; - return std::format_to(context.out(), "{}", stream.str()); - } -}; - -template <> struct std::formatter { - constexpr auto parse(std::format_parse_context &context) - -> decltype(context.begin()) { - return context.begin(); - } - - auto format(const sourcemeta::core::Vocabularies::URI &value, - std::format_context &context) const -> decltype(context.out()) { - std::ostringstream stream; - stream << value; - return std::format_to(context.out(), "{}", stream.str()); - } -}; - -#endif diff --git a/src/core/jsonschema/include/sourcemeta/core/jsonschema_walker.h b/src/core/jsonschema/include/sourcemeta/core/jsonschema_walker.h deleted file mode 100644 index 7c039ed2d..000000000 --- a/src/core/jsonschema/include/sourcemeta/core/jsonschema_walker.h +++ /dev/null @@ -1,208 +0,0 @@ -#ifndef SOURCEMETA_CORE_JSONSCHEMA_WALKER_H_ -#define SOURCEMETA_CORE_JSONSCHEMA_WALKER_H_ - -#ifndef SOURCEMETA_CORE_JSONSCHEMA_EXPORT -#include -#endif - -#include - -#include - -#include // std::uint64_t -#include // std::optional -#include // std::string_view -#include // std::vector - -namespace sourcemeta::core { - -/// @ingroup jsonschema -/// -/// Return an iterator over the subschemas of a given JSON Schema definition -/// according to the applicators understood by the provided walker function. -/// This walker recursively traverses over every subschema of -/// the JSON Schema definition, including the top-level schema, reporting back -/// each subschema. -/// -/// For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "type": "object", -/// "properties": { -/// "foo": { -/// "type": "array", -/// "items": { -/// "type": "string" -/// } -/// } -/// } -/// })JSON"); -/// -/// for (const auto &entry : -/// sourcemeta::core::SchemaIterator{ -/// document, sourcemeta::core::schema_walker, -/// sourcemeta::core::schema_resolver}) { -/// sourcemeta::core::prettify( -/// sourcemeta::core::get(document, entry.pointer), std::cout); -/// std::cout << "\n"; -/// } -/// ``` -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaIterator { -private: - using internal = typename std::vector; - -public: - using const_iterator = typename internal::const_iterator; - SchemaIterator(const JSON &input, const SchemaWalker &walker, - const SchemaResolver &resolver, - std::string_view default_dialect = ""); - [[nodiscard]] auto begin() const -> const_iterator; - [[nodiscard]] auto end() const -> const_iterator; - [[nodiscard]] auto cbegin() const -> const_iterator; - [[nodiscard]] auto cend() const -> const_iterator; - -private: -// Exporting symbols that depends on the standard C++ library is considered -// safe. -// https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-2-c4275?view=msvc-170&redirectedfrom=MSDN -#if defined(_MSC_VER) -#pragma warning(disable : 4251) -#endif - internal subschemas{}; -#if defined(_MSC_VER) -#pragma warning(default : 4251) -#endif -}; - -/// @ingroup jsonschema -/// -/// Return an iterator over the subschemas of a given JSON Schema definition -/// according to the applicators understood by the provided walker function. -/// This walker traverse over the first-level of subschemas of the JSON Schema -/// definition, ignoring the top-level schema and reporting back each subschema. -/// -/// Note that we don't promise any specific walking ordering. -/// -/// For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "type": "object", -/// "properties": { -/// "foo": { -/// "type": "array", -/// "items": { -/// "type": "string" -/// } -/// } -/// } -/// })JSON"); -/// -/// for (const auto &entry : -/// sourcemeta::core::SchemaIteratorFlat{ -/// document, sourcemeta::core::schema_walker, -/// sourcemeta::core::schema_resolver}) { -/// sourcemeta::core::prettify( -/// sourcemeta::core::get(document, entry.pointer), std::cout); -/// std::cout << "\n"; -/// } -/// ``` -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaIteratorFlat { -private: - using internal = typename std::vector; - -public: - using const_iterator = typename internal::const_iterator; - SchemaIteratorFlat(const JSON &input, const SchemaWalker &walker, - const SchemaResolver &resolver, - std::string_view default_dialect = ""); - [[nodiscard]] auto begin() const -> const_iterator; - [[nodiscard]] auto end() const -> const_iterator; - [[nodiscard]] auto cbegin() const -> const_iterator; - [[nodiscard]] auto cend() const -> const_iterator; - -private: -// Exporting symbols that depends on the standard C++ library is considered -// safe. -// https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-2-c4275?view=msvc-170&redirectedfrom=MSDN -#if defined(_MSC_VER) -#pragma warning(disable : 4251) -#endif - internal subschemas{}; -#if defined(_MSC_VER) -#pragma warning(default : 4251) -#endif -}; - -/// @ingroup jsonschema -/// -/// Return an iterator over the top-level keywords of a given JSON Schema -/// definition in the order in which an implementation must evaluate them. -/// -/// For example: -/// -/// ```cpp -/// #include -/// #include -/// #include -/// -/// const sourcemeta::core::JSON document = -/// sourcemeta::core::parse_json(R"JSON({ -/// "$schema": "https://json-schema.org/draft/2020-12/schema", -/// "type": "object", -/// "properties": {}, -/// "additionalProperties": true, -/// "patternProperties": {} -/// })JSON"); -/// -/// for (const auto &entry : -/// sourcemeta::core::SchemaKeywordIterator{ -/// document, sourcemeta::core::schema_walker, -/// sourcemeta::core::schema_resolver}) { -/// sourcemeta::core::stringify(entry.pointer, std::cout); -/// std::cout << "\n"; -/// } -/// ``` -class SOURCEMETA_CORE_JSONSCHEMA_EXPORT SchemaKeywordIterator { -private: - using internal = typename std::vector; - -public: - using const_iterator = typename internal::const_iterator; - SchemaKeywordIterator(const JSON &input, const SchemaWalker &walker, - const SchemaResolver &resolver, - std::string_view default_dialect = ""); - [[nodiscard]] auto begin() const -> const_iterator; - [[nodiscard]] auto end() const -> const_iterator; - [[nodiscard]] auto cbegin() const -> const_iterator; - [[nodiscard]] auto cend() const -> const_iterator; - -private: -// Exporting symbols that depends on the standard C++ library is considered -// safe. -// https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-2-c4275?view=msvc-170&redirectedfrom=MSDN -#if defined(_MSC_VER) -#pragma warning(disable : 4251) -#endif - internal entries{}; -#if defined(_MSC_VER) -#pragma warning(default : 4251) -#endif -}; - -} // namespace sourcemeta::core - -#endif diff --git a/src/core/jsonschema/jsonschema.cc b/src/core/jsonschema/jsonschema.cc deleted file mode 100644 index 39971abd3..000000000 --- a/src/core/jsonschema/jsonschema.cc +++ /dev/null @@ -1,819 +0,0 @@ -#include - -#include "helpers.h" - -#include // std::max, std::ranges::fold_left -#include // assert -#include // std::uint64_t -#include // std::numeric_limits -#include // std::ostringstream -#include // std::string_view -#include // std::remove_reference_t -#include // std::unordered_map -#include // std::unordered_set -#include // std::move, std::to_underlying - -auto sourcemeta::core::is_schema(const sourcemeta::core::JSON &schema) -> bool { - return schema.is_object() || schema.is_boolean(); -} - -// TODO: Make this function detect schemas only using identifier/comment -// keywords, etc -auto sourcemeta::core::is_empty_schema(const sourcemeta::core::JSON &schema) - -> bool { - return (schema.is_boolean() && schema.to_boolean()) || - (schema.is_object() && schema.empty()); -} - -auto sourcemeta::core::to_string(const SchemaBaseDialect base_dialect) - -> std::string_view { - switch (base_dialect) { - case SchemaBaseDialect::JSON_Schema_2020_12: - return "https://json-schema.org/draft/2020-12/schema"; - case SchemaBaseDialect::JSON_Schema_2020_12_Hyper: - return "https://json-schema.org/draft/2020-12/hyper-schema"; - case SchemaBaseDialect::JSON_Schema_2019_09: - return "https://json-schema.org/draft/2019-09/schema"; - case SchemaBaseDialect::JSON_Schema_2019_09_Hyper: - return "https://json-schema.org/draft/2019-09/hyper-schema"; - case SchemaBaseDialect::JSON_Schema_Draft_7: - return "http://json-schema.org/draft-07/schema#"; - case SchemaBaseDialect::JSON_Schema_Draft_7_Hyper: - return "http://json-schema.org/draft-07/hyper-schema#"; - case SchemaBaseDialect::JSON_Schema_Draft_6: - return "http://json-schema.org/draft-06/schema#"; - case SchemaBaseDialect::JSON_Schema_Draft_6_Hyper: - return "http://json-schema.org/draft-06/hyper-schema#"; - case SchemaBaseDialect::JSON_Schema_Draft_4: - return "http://json-schema.org/draft-04/schema#"; - case SchemaBaseDialect::JSON_Schema_Draft_4_Hyper: - return "http://json-schema.org/draft-04/hyper-schema#"; - case SchemaBaseDialect::JSON_Schema_Draft_3: - return "http://json-schema.org/draft-03/schema#"; - case SchemaBaseDialect::JSON_Schema_Draft_3_Hyper: - return "http://json-schema.org/draft-03/hyper-schema#"; - case SchemaBaseDialect::JSON_Schema_Draft_2_Hyper: - return "http://json-schema.org/draft-02/hyper-schema#"; - case SchemaBaseDialect::JSON_Schema_Draft_1_Hyper: - return "http://json-schema.org/draft-01/hyper-schema#"; - case SchemaBaseDialect::JSON_Schema_Draft_0_Hyper: - return "http://json-schema.org/draft-00/hyper-schema#"; - } - - assert(false); - return {}; -} - -auto sourcemeta::core::to_base_dialect(const std::string_view base_dialect) - -> std::optional { - if (base_dialect == "https://json-schema.org/draft/2020-12/schema" || - base_dialect == "http://json-schema.org/draft/2020-12/schema") { - return SchemaBaseDialect::JSON_Schema_2020_12; - } else if (base_dialect == - "https://json-schema.org/draft/2020-12/hyper-schema" || - base_dialect == - "http://json-schema.org/draft/2020-12/hyper-schema") { - return SchemaBaseDialect::JSON_Schema_2020_12_Hyper; - } else if (base_dialect == "https://json-schema.org/draft/2019-09/schema" || - base_dialect == "http://json-schema.org/draft/2019-09/schema") { - return SchemaBaseDialect::JSON_Schema_2019_09; - } else if (base_dialect == - "https://json-schema.org/draft/2019-09/hyper-schema" || - base_dialect == - "http://json-schema.org/draft/2019-09/hyper-schema") { - return SchemaBaseDialect::JSON_Schema_2019_09_Hyper; - } else if (base_dialect == "http://json-schema.org/draft-07/schema#" || - base_dialect == "https://json-schema.org/draft-07/schema#") { - return SchemaBaseDialect::JSON_Schema_Draft_7; - } else if (base_dialect == "http://json-schema.org/draft-07/hyper-schema#" || - base_dialect == "https://json-schema.org/draft-07/hyper-schema#") { - return SchemaBaseDialect::JSON_Schema_Draft_7_Hyper; - } else if (base_dialect == "http://json-schema.org/draft-06/schema#" || - base_dialect == "https://json-schema.org/draft-06/schema#") { - return SchemaBaseDialect::JSON_Schema_Draft_6; - } else if (base_dialect == "http://json-schema.org/draft-06/hyper-schema#" || - base_dialect == "https://json-schema.org/draft-06/hyper-schema#") { - return SchemaBaseDialect::JSON_Schema_Draft_6_Hyper; - } else if (base_dialect == "http://json-schema.org/draft-04/schema#" || - base_dialect == "https://json-schema.org/draft-04/schema#") { - return SchemaBaseDialect::JSON_Schema_Draft_4; - } else if (base_dialect == "http://json-schema.org/draft-04/hyper-schema#" || - base_dialect == "https://json-schema.org/draft-04/hyper-schema#") { - return SchemaBaseDialect::JSON_Schema_Draft_4_Hyper; - } else if (base_dialect == "http://json-schema.org/draft-03/schema#" || - base_dialect == "https://json-schema.org/draft-03/schema#") { - return SchemaBaseDialect::JSON_Schema_Draft_3; - } else if (base_dialect == "http://json-schema.org/draft-03/hyper-schema#" || - base_dialect == "https://json-schema.org/draft-03/hyper-schema#") { - return SchemaBaseDialect::JSON_Schema_Draft_3_Hyper; - } else if (base_dialect == "http://json-schema.org/draft-02/hyper-schema#" || - base_dialect == "https://json-schema.org/draft-02/hyper-schema#") { - return SchemaBaseDialect::JSON_Schema_Draft_2_Hyper; - } else if (base_dialect == "http://json-schema.org/draft-01/hyper-schema#" || - base_dialect == "https://json-schema.org/draft-01/hyper-schema#") { - return SchemaBaseDialect::JSON_Schema_Draft_1_Hyper; - } else if (base_dialect == "http://json-schema.org/draft-00/hyper-schema#" || - base_dialect == "https://json-schema.org/draft-00/hyper-schema#") { - return SchemaBaseDialect::JSON_Schema_Draft_0_Hyper; - } - - return std::nullopt; -} - -auto sourcemeta::core::identify(const sourcemeta::core::JSON &schema, - const SchemaResolver &resolver, - std::string_view default_dialect, - std::string_view default_id, - const bool allow_dialect_override) - -> std::string_view { - try { - const auto maybe_base_dialect{sourcemeta::core::base_dialect( - schema, resolver, default_dialect, allow_dialect_override)}; - if (maybe_base_dialect.has_value()) { - return identify(schema, maybe_base_dialect.value(), default_id); - } - return default_id; - } catch (const SchemaResolutionError &) { - if (!default_id.empty()) { - return default_id; - } - throw; - } -} - -auto sourcemeta::core::identify(const JSON &schema, - const SchemaBaseDialect base_dialect, - std::string_view default_id) - -> std::string_view { - if (!schema.is_object()) { - return default_id; - } - - const std::string keyword{sourcemeta::core::id_keyword(base_dialect)}; - - if (!schema.defines(keyword)) { - return default_id; - } - - const auto &identifier{schema.at(keyword)}; - if (!identifier.is_string()) { - std::ostringstream value; - sourcemeta::core::stringify(identifier, value); - throw sourcemeta::core::SchemaKeywordError( - keyword, value.str(), "The schema identifier is invalid"); - } - - // In older drafts, the presence of `$ref` would override any sibling - // keywords. Note that `$ref` was first introduced in Draft 3, so we - // don't check for base dialects lower than that. - // See - // https://json-schema.org/draft-07/draft-handrews-json-schema-01#rfc.section.8.3 - if (schema.defines("$ref") && - (base_dialect == SchemaBaseDialect::JSON_Schema_Draft_7 || - base_dialect == SchemaBaseDialect::JSON_Schema_Draft_7_Hyper || - base_dialect == SchemaBaseDialect::JSON_Schema_Draft_6 || - base_dialect == SchemaBaseDialect::JSON_Schema_Draft_6_Hyper || - base_dialect == SchemaBaseDialect::JSON_Schema_Draft_4 || - base_dialect == SchemaBaseDialect::JSON_Schema_Draft_4_Hyper || - base_dialect == SchemaBaseDialect::JSON_Schema_Draft_3 || - base_dialect == SchemaBaseDialect::JSON_Schema_Draft_3_Hyper)) { - return default_id; - } - - // An empty string identifier and an identifier consisting solely of the - // empty-fragment marker "#" are both valid URI-references that resolve to - // the parent base, carrying no information. We treat them as if no - // identifier was declared at all (i.e. no new schema resource is - // introduced). - // See - // https://json-schema.org/draft/2019-09/draft-handrews-json-schema-02#rfc.section.8.2.2 - // See - // https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-01#section-8.2.1-5 - if (identifier.to_string().empty() || identifier.to_string() == "#") { - return default_id; - } - - return identifier.to_string(); -} - -auto sourcemeta::core::anonymize(JSON &schema, - const SchemaBaseDialect base_dialect) -> void { - if (schema.is_object()) { - schema.erase(sourcemeta::core::id_keyword(base_dialect)); - } -} - -auto sourcemeta::core::reidentify(JSON &schema, std::string_view new_identifier, - const SchemaResolver &resolver, - std::string_view default_dialect) -> void { - const auto resolved_base_dialect{ - sourcemeta::core::base_dialect(schema, resolver, default_dialect)}; - if (!resolved_base_dialect.has_value()) { - throw sourcemeta::core::SchemaUnknownBaseDialectError(); - } - - reidentify(schema, new_identifier, resolved_base_dialect.value()); -} - -auto sourcemeta::core::reidentify(JSON &schema, std::string_view new_identifier, - const SchemaBaseDialect base_dialect) - -> void { - assert(is_schema(schema)); - assert(schema.is_object()); - schema.assign(sourcemeta::core::id_keyword(base_dialect), - JSON{new_identifier}); - - // If we reidentify, and the identifier is still not retrievable, then - // we are facing the Draft 7 `$ref` sibling edge case, and we cannot - // really continue - if (schema.defines("$ref") && identify(schema, base_dialect).empty()) { - throw SchemaReferenceObjectResourceError(new_identifier); - } -} - -auto sourcemeta::core::dialect(const sourcemeta::core::JSON &schema, - std::string_view default_dialect, - const bool allow_dialect_override) - -> std::string_view { - assert(sourcemeta::core::is_schema(schema)); - - if (allow_dialect_override && schema.is_object()) { - const auto *override_value{ - schema.try_at("x-sourcemeta-dialect-override-subschema")}; - if (override_value && override_value->is_string() && - !override_value->to_string().empty()) { - return override_value->to_string(); - } - } - - if (schema.is_boolean() || !schema.defines("$schema")) { - return default_dialect; - } - - const auto &dialect_value{schema.at("$schema")}; - if (!dialect_value.is_string()) { - std::ostringstream value; - sourcemeta::core::stringify(dialect_value, value); - throw sourcemeta::core::SchemaKeywordError("$schema", value.str(), - "The dialect value is invalid"); - } - - return dialect_value.to_string(); -} - -auto sourcemeta::core::metaschema( - const sourcemeta::core::JSON &schema, - const sourcemeta::core::SchemaResolver &resolver, - std::string_view default_dialect) -> JSON { - const auto effective_dialect{ - sourcemeta::core::dialect(schema, default_dialect)}; - if (effective_dialect.empty()) { - throw sourcemeta::core::SchemaUnknownDialectError(); - } - - const auto maybe_metaschema{resolver(effective_dialect)}; - if (!maybe_metaschema.has_value()) { - // Relative meta-schema references are invalid according to the - // JSON Schema specifications. They must be absolute ones - const URI effective_dialect_uri{effective_dialect}; - if (effective_dialect_uri.is_relative()) { - throw sourcemeta::core::SchemaRelativeMetaschemaResolutionError( - effective_dialect); - } else { - throw sourcemeta::core::SchemaResolutionError( - effective_dialect, "Could not resolve the metaschema of the schema"); - } - } - - return maybe_metaschema.value(); -} - -static auto -base_dialect_with_visited(const sourcemeta::core::JSON &schema, - const sourcemeta::core::SchemaResolver &resolver, - std::string_view default_dialect, - std::unordered_set &visited, - const bool allow_dialect_override) - -> std::optional { - assert(sourcemeta::core::is_schema(schema)); - const std::string_view effective_dialect{sourcemeta::core::dialect( - schema, default_dialect, allow_dialect_override)}; - - // There is no metaschema information whatsoever - // Nothing we can do at this point - if (effective_dialect.empty()) { - return std::nullopt; - } - - // Check for known base dialects - const auto result{sourcemeta::core::to_base_dialect(effective_dialect)}; - if (result.has_value()) { - return result; - } - - // Detect cycles in the metaschema chain - if (!visited.emplace(effective_dialect).second) { - throw sourcemeta::core::SchemaUnknownBaseDialectError(); - } - - // Otherwise, traverse the metaschema hierarchy up - const std::optional metaschema{ - resolver(effective_dialect)}; - if (!metaschema.has_value()) { - sourcemeta::core::URI effective_dialect_uri; - try { - effective_dialect_uri = sourcemeta::core::URI{effective_dialect}; - } catch (const sourcemeta::core::URIParseError &) { - throw sourcemeta::core::SchemaKeywordError( - "$schema", effective_dialect, "The dialect is not a valid URI"); - } - - // Relative meta-schema references are invalid according to the - // JSON Schema specifications. They must be absolute ones - if (effective_dialect_uri.is_relative()) { - throw sourcemeta::core::SchemaRelativeMetaschemaResolutionError( - effective_dialect); - } else { - throw sourcemeta::core::SchemaResolutionError( - effective_dialect, "Could not resolve the metaschema of the schema"); - } - } - - // If the metaschema declares the same dialect (self-descriptive), and it's - // not an official dialect, we cannot determine the base dialect - const std::string_view metaschema_dialect{sourcemeta::core::dialect( - metaschema.value(), effective_dialect, allow_dialect_override)}; - if (metaschema_dialect == effective_dialect) { - throw sourcemeta::core::SchemaUnknownBaseDialectError(); - } - - return base_dialect_with_visited(metaschema.value(), resolver, - effective_dialect, visited, - allow_dialect_override); -} - -auto sourcemeta::core::base_dialect( - const sourcemeta::core::JSON &schema, - const sourcemeta::core::SchemaResolver &resolver, - std::string_view default_dialect, const bool allow_dialect_override) - -> std::optional { - std::unordered_set visited; - return base_dialect_with_visited(schema, resolver, default_dialect, visited, - allow_dialect_override); -} - -namespace { -auto core_vocabulary_known( - const sourcemeta::core::SchemaBaseDialect base_dialect) - -> sourcemeta::core::Vocabularies::Known { - using sourcemeta::core::SchemaBaseDialect; - using sourcemeta::core::Vocabularies; - switch (base_dialect) { - case SchemaBaseDialect::JSON_Schema_2020_12: - case SchemaBaseDialect::JSON_Schema_2020_12_Hyper: - return Vocabularies::Known::JSON_Schema_2020_12_Core; - case SchemaBaseDialect::JSON_Schema_2019_09: - case SchemaBaseDialect::JSON_Schema_2019_09_Hyper: - return Vocabularies::Known::JSON_Schema_2019_09_Core; - default: - assert(false); - return Vocabularies::Known::JSON_Schema_2020_12_Core; - } -} - -auto dialect_to_known(const std::string_view dialect) - -> std::optional { - using sourcemeta::core::Vocabularies; - if (dialect == "http://json-schema.org/draft-07/schema#") { - return Vocabularies::Known::JSON_Schema_Draft_7; - } - if (dialect == "http://json-schema.org/draft-07/hyper-schema#") { - return Vocabularies::Known::JSON_Schema_Draft_7_Hyper; - } - if (dialect == "http://json-schema.org/draft-06/schema#") { - return Vocabularies::Known::JSON_Schema_Draft_6; - } - if (dialect == "http://json-schema.org/draft-06/hyper-schema#") { - return Vocabularies::Known::JSON_Schema_Draft_6_Hyper; - } - if (dialect == "http://json-schema.org/draft-04/schema#") { - return Vocabularies::Known::JSON_Schema_Draft_4; - } - if (dialect == "http://json-schema.org/draft-04/hyper-schema#") { - return Vocabularies::Known::JSON_Schema_Draft_4_Hyper; - } - if (dialect == "http://json-schema.org/draft-03/schema#") { - return Vocabularies::Known::JSON_Schema_Draft_3; - } - if (dialect == "http://json-schema.org/draft-03/hyper-schema#") { - return Vocabularies::Known::JSON_Schema_Draft_3_Hyper; - } - if (dialect == "http://json-schema.org/draft-02/schema#") { - return Vocabularies::Known::JSON_Schema_Draft_2; - } - if (dialect == "http://json-schema.org/draft-02/hyper-schema#") { - return Vocabularies::Known::JSON_Schema_Draft_2_Hyper; - } - if (dialect == "http://json-schema.org/draft-01/schema#") { - return Vocabularies::Known::JSON_Schema_Draft_1; - } - if (dialect == "http://json-schema.org/draft-01/hyper-schema#") { - return Vocabularies::Known::JSON_Schema_Draft_1_Hyper; - } - if (dialect == "http://json-schema.org/draft-00/schema#") { - return Vocabularies::Known::JSON_Schema_Draft_0; - } - if (dialect == "http://json-schema.org/draft-00/hyper-schema#") { - return Vocabularies::Known::JSON_Schema_Draft_0_Hyper; - } - return std::nullopt; -} - -auto base_dialect_to_known(const sourcemeta::core::SchemaBaseDialect dialect) - -> sourcemeta::core::Vocabularies::Known { - using sourcemeta::core::SchemaBaseDialect; - using sourcemeta::core::Vocabularies; - switch (dialect) { - case SchemaBaseDialect::JSON_Schema_Draft_7: - return Vocabularies::Known::JSON_Schema_Draft_7; - case SchemaBaseDialect::JSON_Schema_Draft_7_Hyper: - return Vocabularies::Known::JSON_Schema_Draft_7_Hyper; - case SchemaBaseDialect::JSON_Schema_Draft_6: - return Vocabularies::Known::JSON_Schema_Draft_6; - case SchemaBaseDialect::JSON_Schema_Draft_6_Hyper: - return Vocabularies::Known::JSON_Schema_Draft_6_Hyper; - case SchemaBaseDialect::JSON_Schema_Draft_4: - return Vocabularies::Known::JSON_Schema_Draft_4; - case SchemaBaseDialect::JSON_Schema_Draft_4_Hyper: - return Vocabularies::Known::JSON_Schema_Draft_4_Hyper; - case SchemaBaseDialect::JSON_Schema_Draft_3: - return Vocabularies::Known::JSON_Schema_Draft_3; - case SchemaBaseDialect::JSON_Schema_Draft_3_Hyper: - return Vocabularies::Known::JSON_Schema_Draft_3_Hyper; - case SchemaBaseDialect::JSON_Schema_Draft_2_Hyper: - return Vocabularies::Known::JSON_Schema_Draft_2_Hyper; - case SchemaBaseDialect::JSON_Schema_Draft_1_Hyper: - return Vocabularies::Known::JSON_Schema_Draft_1_Hyper; - case SchemaBaseDialect::JSON_Schema_Draft_0_Hyper: - return Vocabularies::Known::JSON_Schema_Draft_0_Hyper; - default: - assert(false); - return Vocabularies::Known::JSON_Schema_Draft_7; - } -} - -auto is_pre_vocabulary_base_dialect( - const sourcemeta::core::SchemaBaseDialect base_dialect) -> bool { - using sourcemeta::core::SchemaBaseDialect; - switch (base_dialect) { - case SchemaBaseDialect::JSON_Schema_Draft_7: - case SchemaBaseDialect::JSON_Schema_Draft_7_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_6: - case SchemaBaseDialect::JSON_Schema_Draft_6_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_4: - case SchemaBaseDialect::JSON_Schema_Draft_4_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_3: - case SchemaBaseDialect::JSON_Schema_Draft_3_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_2_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_1_Hyper: - case SchemaBaseDialect::JSON_Schema_Draft_0_Hyper: - return true; - default: - return false; - } -} -} // namespace - -auto sourcemeta::core::parse_vocabularies( - const sourcemeta::core::JSON &schema, - const sourcemeta::core::SchemaBaseDialect base_dialect) - -> std::optional { - if (base_dialect != - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12 && - base_dialect != - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12_Hyper && - base_dialect != - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09 && - base_dialect != - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09_Hyper) { - return std::nullopt; - } - - if (!schema.is_object()) { - return std::nullopt; - } - - const auto *vocabulary_entry{schema.try_at("$vocabulary")}; - if (!vocabulary_entry) { - return std::nullopt; - } - - assert(vocabulary_entry->is_object()); - sourcemeta::core::Vocabularies result; - for (const auto &entry : vocabulary_entry->as_object()) { - assert(entry.second.is_boolean()); - result.insert(entry.first, entry.second.to_boolean()); - } - - return result; -} - -auto sourcemeta::core::parse_vocabularies( - const sourcemeta::core::JSON &schema, - const sourcemeta::core::SchemaResolver &resolver, - std::string_view default_dialect) - -> std::optional { - const auto schema_base_dialect{ - sourcemeta::core::base_dialect(schema, resolver, default_dialect)}; - if (schema_base_dialect.has_value()) { - return sourcemeta::core::parse_vocabularies(schema, - schema_base_dialect.value()); - } else { - return std::nullopt; - } -} - -auto sourcemeta::core::vocabularies( - const sourcemeta::core::JSON &schema, - const sourcemeta::core::SchemaResolver &resolver, - std::string_view default_dialect) -> sourcemeta::core::Vocabularies { - const auto resolved_base_dialect{ - sourcemeta::core::base_dialect(schema, resolver, default_dialect)}; - if (!resolved_base_dialect.has_value()) { - throw sourcemeta::core::SchemaUnknownBaseDialectError(); - } - - const std::string_view resolved_dialect{ - sourcemeta::core::dialect(schema, default_dialect)}; - if (resolved_dialect.empty()) { - // If the schema has no declared metaschema and the user didn't - // provide a explicit default, then we cannot do anything. - // Better to abort instead of trying to guess. - throw sourcemeta::core::SchemaUnknownDialectError(); - } - - return vocabularies(resolver, resolved_base_dialect.value(), - resolved_dialect); -} - -auto sourcemeta::core::vocabularies(const SchemaResolver &resolver, - const SchemaBaseDialect base_dialect, - std::string_view dialect) - -> sourcemeta::core::Vocabularies { - const auto base_dialect_string{to_string(base_dialect)}; - // As a performance optimization shortcut - if (base_dialect_string == dialect || - to_base_dialect(dialect) == base_dialect) { - if (base_dialect == SchemaBaseDialect::JSON_Schema_2020_12) { - return Vocabularies{ - {Vocabularies::Known::JSON_Schema_2020_12_Core, true}, - {Vocabularies::Known::JSON_Schema_2020_12_Applicator, true}, - {Vocabularies::Known::JSON_Schema_2020_12_Unevaluated, true}, - {Vocabularies::Known::JSON_Schema_2020_12_Validation, true}, - {Vocabularies::Known::JSON_Schema_2020_12_Meta_Data, true}, - {Vocabularies::Known::JSON_Schema_2020_12_Format_Annotation, true}, - {Vocabularies::Known::JSON_Schema_2020_12_Content, true}}; - } else if (base_dialect == SchemaBaseDialect::JSON_Schema_2019_09) { - return Vocabularies{ - {Vocabularies::Known::JSON_Schema_2019_09_Core, true}, - {Vocabularies::Known::JSON_Schema_2019_09_Applicator, true}, - {Vocabularies::Known::JSON_Schema_2019_09_Validation, true}, - {Vocabularies::Known::JSON_Schema_2019_09_Meta_Data, true}, - {Vocabularies::Known::JSON_Schema_2019_09_Format, false}, - {Vocabularies::Known::JSON_Schema_2019_09_Content, true}}; - } - } - - /* - * (1) If the dialect is pre-vocabularies, then the - * dialect itself is conceptually the only vocabulary - */ - - // This is an exhaustive list of all official dialects in the pre-vocabulary - // world - if (dialect == "http://json-schema.org/draft-07/schema#" || - dialect == "http://json-schema.org/draft-06/schema#" || - dialect == "http://json-schema.org/draft-04/schema#" || - dialect == "http://json-schema.org/draft-03/schema#" || - dialect == "http://json-schema.org/draft-02/schema#" || - dialect == "http://json-schema.org/draft-01/schema#" || - dialect == "http://json-schema.org/draft-00/schema#") { - const auto known = dialect_to_known(dialect); - if (known.has_value()) { - return Vocabularies{{known.value(), true}}; - } - return Vocabularies{{std::string{dialect}, true}}; - } - - /* - * (2) If the base dialect is pre-vocabularies, then the - * base dialect itself is conceptually the only vocabulary - */ - - if (is_pre_vocabulary_base_dialect(base_dialect)) { - return Vocabularies{{base_dialect_to_known(base_dialect), true}}; - } - - /* - * (3) If the dialect is vocabulary aware, then fetch such dialect - */ - - const std::optional maybe_schema_dialect{ - resolver(dialect)}; - if (!maybe_schema_dialect.has_value()) { - throw sourcemeta::core::SchemaResolutionError( - dialect, "Could not resolve the metaschema of the schema"); - } - const sourcemeta::core::JSON &schema_dialect{maybe_schema_dialect.value()}; - // At this point we are sure that the dialect is vocabulary aware and the - // identifier keyword is indeed `$id`, so we can avoid the added - // complexity of the generic `id` function. - assert(schema_dialect.defines("$id") && schema_dialect.at("$id").is_string()); - - /* - * (4) Retrieve the vocabularies explicitly or implicitly declared by the - * dialect - */ - - const auto core{core_vocabulary_known(base_dialect)}; - auto result{parse_vocabularies(schema_dialect, base_dialect) - .value_or(Vocabularies{})}; - if (result.empty()) { - result.insert(core, true); - } - - // The specification recommends these checks - if (!result.contains(core)) { - throw sourcemeta::core::SchemaError( - "The core vocabulary must always be present"); - } else { - const auto core_status{result.get(core)}; - if (core_status.has_value() && !core_status.value()) { - throw sourcemeta::core::SchemaError( - "The core vocabulary must always be required"); - } - } - - return result; -} - -auto sourcemeta::core::schema_keyword_priority( - std::string_view keyword, - const sourcemeta::core::Vocabularies &vocabularies, - const sourcemeta::core::SchemaWalker &walker) -> std::uint64_t { - const auto &result{walker(keyword, vocabularies)}; - const auto priority_from_dependencies{std::ranges::fold_left( - result.dependencies, static_cast(0), - [&vocabularies, &walker](const auto accumulator, const auto &dependency) { - return std::max( - accumulator, - schema_keyword_priority(dependency, vocabularies, walker) + 1); - })}; - const auto priority_from_order_dependencies{std::ranges::fold_left( - result.order_dependencies, static_cast(0), - [&vocabularies, &walker](const auto accumulator, const auto &dependency) { - return std::max( - accumulator, - schema_keyword_priority(dependency, vocabularies, walker) + 1); - })}; - return std::max(priority_from_dependencies, priority_from_order_dependencies); -} - -auto sourcemeta::core::wrap(const std::string_view identifier) - -> sourcemeta::core::JSON { - auto result{JSON::make_object()}; - // JSON Schema 2020-12 is the first dialect that truly supports cross-dialect - // references In practice, others do, but we can play it safe here - result.assign_assume_new( - "$schema", JSON{"https://json-schema.org/draft/2020-12/schema"}); - result.assign_assume_new("$ref", JSON{identifier}); - return result; -} - -auto sourcemeta::core::wrap( - const sourcemeta::core::JSON &schema, - const sourcemeta::core::SchemaFrame &frame, - const sourcemeta::core::SchemaFrame::Location &location, - const sourcemeta::core::SchemaResolver &resolver, - sourcemeta::core::WeakPointer &base) -> sourcemeta::core::JSON { - assert(frame.mode() == SchemaFrame::Mode::References); - assert(location.type != SchemaFrame::LocationType::Pointer); - - const auto &pointer{location.pointer}; - if (pointer.empty()) { - auto copy = schema; - if (copy.is_object()) { - copy.assign("$schema", JSON{location.dialect}); - } - - return copy; - } - - assert(try_get(schema, pointer)); - const auto has_internal_references{ - std::any_of(frame.references().cbegin(), frame.references().cend(), - [&pointer](const auto &reference) { - return reference.first.second.starts_with(pointer); - })}; - - if (!has_internal_references) { - auto subschema{get(schema, pointer)}; - if (subschema.is_object()) { - subschema.assign("$schema", JSON{location.dialect}); - } - - return subschema; - } - - auto copy = schema; - copy.assign("$schema", JSON{location.dialect}); - - auto result{JSON::make_object()}; - // JSON Schema 2020-12 is the first dialect that truly supports - // cross-dialect references In practice, others do, but we can - // play it safe here - result.assign_assume_new( - "$schema", JSON{"https://json-schema.org/draft/2020-12/schema"}); - // We need to make sure the schema we are wrapping always has an identifier, - // at least an artificial one, otherwise a standalone instance of `$schema` - // outside of the root of a schema resource is not valid according to - // JSON Schema - // However, note that we use a relative URI so that references to - // other schemas whose top-level identifiers are relative URIs don't - // get affected. Otherwise, we would cause unintended base resolution. - constexpr std::string_view WRAPPER_IDENTIFIER{"__sourcemeta-core-wrap__"}; - const auto maybe_id{identify(copy, resolver, location.dialect)}; - const auto id{maybe_id.empty() ? WRAPPER_IDENTIFIER : maybe_id}; - - URI uri{id}; - - try { - reidentify(copy, id, resolver, location.dialect); - - // Otherwise we will get an error with the `WRAPPER_IDENTIFIER`, which will - // be confusing to end users - } catch (const SchemaReferenceObjectResourceError &) { - throw SchemaError( - "Cannot process a JSON Schema Draft 7 or older with a top-level " - "`$ref` (which overrides sibling keywords) without introducing " - "undefined behavior"); - } - - result.assign_assume_new("$defs", JSON::make_object()); - result.at("$defs").assign_assume_new("schema", std::move(copy)); - - // Add a reference to the schema - if (!uri.fragment().has_value() || uri.fragment().value().empty()) { - uri.fragment(to_string(pointer)); - result.assign_assume_new("$ref", JSON{uri.recompose()}); - } else { - static const JSON::String DEFS{"$defs"}; - static const JSON::String SCHEMA{"schema"}; - result.assign_assume_new( - "$ref", - JSON{to_uri(WeakPointer{std::cref(DEFS), std::cref(SCHEMA)}.concat( - pointer)) - .recompose()}); - } - - static const JSON::String REF{"$ref"}; - base.push_back(REF); - return result; -} - -static auto parse_schema_type_string(const sourcemeta::core::JSON::String &type, - sourcemeta::core::JSON::TypeSet &result) - -> void { - if (type == "null") { - result.set(std::to_underlying(sourcemeta::core::JSON::Type::Null)); - } else if (type == "boolean") { - result.set(std::to_underlying(sourcemeta::core::JSON::Type::Boolean)); - } else if (type == "object") { - result.set(std::to_underlying(sourcemeta::core::JSON::Type::Object)); - } else if (type == "array") { - result.set(std::to_underlying(sourcemeta::core::JSON::Type::Array)); - } else if (type == "number") { - result.set(std::to_underlying(sourcemeta::core::JSON::Type::Integer)); - result.set(std::to_underlying(sourcemeta::core::JSON::Type::Real)); - } else if (type == "integer") { - result.set(std::to_underlying(sourcemeta::core::JSON::Type::Integer)); - } else if (type == "string") { - result.set(std::to_underlying(sourcemeta::core::JSON::Type::String)); - } -} - -auto sourcemeta::core::parse_schema_type(const sourcemeta::core::JSON &type) - -> sourcemeta::core::JSON::TypeSet { - sourcemeta::core::JSON::TypeSet result; - if (type.is_string()) { - parse_schema_type_string(type.to_string(), result); - } else if (type.is_array()) { - for (const auto &item : type.as_array()) { - if (item.is_string()) { - parse_schema_type_string(item.to_string(), result); - } - } - } - - return result; -} diff --git a/src/core/jsonschema/known_resolver.cmake b/src/core/jsonschema/known_resolver.cmake deleted file mode 100644 index 991dda43f..000000000 --- a/src/core/jsonschema/known_resolver.cmake +++ /dev/null @@ -1,100 +0,0 @@ -# If PROJECT_SOURCE_DIR is not defined, exit -if(NOT PROJECT_SOURCE_DIR) - message(FATAL_ERROR "Missing PROJECT_SOURCE_DIR") -endif() - -# JSON Schema 2020-12 -set(JSON_SCHEMA_2020_12_DIR "${PROJECT_SOURCE_DIR}/vendor/jsonschema-2020-12") -file(READ "${JSON_SCHEMA_2020_12_DIR}/schema.json" METASCHEMA_JSONSCHEMA_2020_12) -file(READ "${JSON_SCHEMA_2020_12_DIR}/hyper-schema.json" METASCHEMA_HYPERSCHEMA_2020_12) -file(READ "${JSON_SCHEMA_2020_12_DIR}/meta/applicator.json" METASCHEMA_JSONSCHEMA_2020_12_APPLICATOR) -file(READ "${JSON_SCHEMA_2020_12_DIR}/meta/content.json" METASCHEMA_JSONSCHEMA_2020_12_CONTENT) -file(READ "${JSON_SCHEMA_2020_12_DIR}/meta/core.json" METASCHEMA_JSONSCHEMA_2020_12_CORE) -file(READ "${JSON_SCHEMA_2020_12_DIR}/meta/format-annotation.json" METASCHEMA_JSONSCHEMA_2020_12_FORMAT_ANNOTATION) -file(READ "${JSON_SCHEMA_2020_12_DIR}/meta/format-assertion.json" METASCHEMA_JSONSCHEMA_2020_12_FORMAT_ASSERTION) -file(READ "${JSON_SCHEMA_2020_12_DIR}/meta/hyper-schema.json" METASCHEMA_JSONSCHEMA_2020_12_HYPER_SCHEMA) -file(READ "${JSON_SCHEMA_2020_12_DIR}/meta/meta-data.json" METASCHEMA_JSONSCHEMA_2020_12_META_DATA) -file(READ "${JSON_SCHEMA_2020_12_DIR}/meta/unevaluated.json" METASCHEMA_JSONSCHEMA_2020_12_UNEVALUATED) -file(READ "${JSON_SCHEMA_2020_12_DIR}/meta/validation.json" METASCHEMA_JSONSCHEMA_2020_12_VALIDATION) -file(READ "${JSON_SCHEMA_2020_12_DIR}/links.json" METASCHEMA_LINKS_2020_12) -file(READ "${JSON_SCHEMA_2020_12_DIR}/output/schema.json" METASCHEMA_JSONSCHEMA_2020_12_OUTPUT) - -# JSON Schema 2019-09 -set(JSON_SCHEMA_2019_09_DIR "${PROJECT_SOURCE_DIR}/vendor/jsonschema-2019-09") -file(READ "${JSON_SCHEMA_2019_09_DIR}/schema.json" METASCHEMA_JSONSCHEMA_2019_09) -file(READ "${JSON_SCHEMA_2019_09_DIR}/hyper-schema.json" METASCHEMA_HYPERSCHEMA_2019_09) -file(READ "${JSON_SCHEMA_2019_09_DIR}/meta/applicator.json" METASCHEMA_JSONSCHEMA_2019_09_APPLICATOR) -file(READ "${JSON_SCHEMA_2019_09_DIR}/meta/content.json" METASCHEMA_JSONSCHEMA_2019_09_CONTENT) -file(READ "${JSON_SCHEMA_2019_09_DIR}/meta/core.json" METASCHEMA_JSONSCHEMA_2019_09_CORE) -file(READ "${JSON_SCHEMA_2019_09_DIR}/meta/format.json" METASCHEMA_JSONSCHEMA_2019_09_FORMAT) -file(READ "${JSON_SCHEMA_2019_09_DIR}/meta/hyper-schema.json" METASCHEMA_JSONSCHEMA_2019_09_HYPER_SCHEMA) -file(READ "${JSON_SCHEMA_2019_09_DIR}/meta/meta-data.json" METASCHEMA_JSONSCHEMA_2019_09_META_DATA) -file(READ "${JSON_SCHEMA_2019_09_DIR}/meta/validation.json" METASCHEMA_JSONSCHEMA_2019_09_VALIDATION) -file(READ "${JSON_SCHEMA_2019_09_DIR}/links.json" METASCHEMA_LINKS_2019_09) -file(READ "${JSON_SCHEMA_2019_09_DIR}/output/hyper-schema.json" METASCHEMA_HYPERSCHEMA_2019_09_OUTPUT) -file(READ "${JSON_SCHEMA_2019_09_DIR}/output/schema.json" METASCHEMA_JSONSCHEMA_2019_09_OUTPUT) - -# JSON Schema Draft7 -set(JSON_SCHEMA_DRAFT7_DIR "${PROJECT_SOURCE_DIR}/vendor/jsonschema-draft7") -file(READ "${JSON_SCHEMA_DRAFT7_DIR}/schema.json" METASCHEMA_JSONSCHEMA_DRAFT7) -file(READ "${JSON_SCHEMA_DRAFT7_DIR}/hyper-schema.json" METASCHEMA_HYPERSCHEMA_DRAFT7) -file(READ "${JSON_SCHEMA_DRAFT7_DIR}/hyper-schema-output.json" METASCHEMA_HYPERSCHEMA_DRAFT7_OUTPUT) -file(READ "${JSON_SCHEMA_DRAFT7_DIR}/links.json" METASCHEMA_LINKS_DRAFT7) - -# JSON Schema Draft6 -set(JSON_SCHEMA_DRAFT6_DIR "${PROJECT_SOURCE_DIR}/vendor/jsonschema-draft6") -file(READ "${JSON_SCHEMA_DRAFT6_DIR}/schema.json" METASCHEMA_JSONSCHEMA_DRAFT6) -file(READ "${JSON_SCHEMA_DRAFT6_DIR}/hyper-schema.json" METASCHEMA_HYPERSCHEMA_DRAFT6) -file(READ "${JSON_SCHEMA_DRAFT6_DIR}/links.json" METASCHEMA_LINKS_DRAFT6) - -# JSON Schema Draft4 -set(JSON_SCHEMA_DRAFT4_DIR "${PROJECT_SOURCE_DIR}/vendor/jsonschema-draft4") -file(READ "${JSON_SCHEMA_DRAFT4_DIR}/schema.json" METASCHEMA_JSONSCHEMA_DRAFT4) -file(READ "${JSON_SCHEMA_DRAFT4_DIR}/hyper-schema.json" METASCHEMA_HYPERSCHEMA_DRAFT4) -file(READ "${JSON_SCHEMA_DRAFT4_DIR}/links.json" METASCHEMA_LINKS_DRAFT4) - -# JSON Schema Draft3 -set(JSON_SCHEMA_DRAFT3_DIR "${PROJECT_SOURCE_DIR}/vendor/jsonschema-draft3") -file(READ "${JSON_SCHEMA_DRAFT3_DIR}/schema.json" METASCHEMA_JSONSCHEMA_DRAFT3) -file(READ "${JSON_SCHEMA_DRAFT3_DIR}/hyper-schema.json" METASCHEMA_HYPERSCHEMA_DRAFT3) -file(READ "${JSON_SCHEMA_DRAFT3_DIR}/json-ref.json" METASCHEMA_JSON_REF_DRAFT3) -file(READ "${JSON_SCHEMA_DRAFT3_DIR}/links.json" METASCHEMA_LINKS_DRAFT3) - -# JSON Schema Draft2 -set(JSON_SCHEMA_DRAFT2_DIR "${PROJECT_SOURCE_DIR}/vendor/jsonschema-draft2") -file(READ "${JSON_SCHEMA_DRAFT2_DIR}/schema.json" METASCHEMA_JSONSCHEMA_DRAFT2) -file(READ "${JSON_SCHEMA_DRAFT2_DIR}/hyper-schema.json" METASCHEMA_HYPERSCHEMA_DRAFT2) -file(READ "${JSON_SCHEMA_DRAFT2_DIR}/json-ref.json" METASCHEMA_JSON_REF_DRAFT2) -file(READ "${JSON_SCHEMA_DRAFT2_DIR}/links.json" METASCHEMA_LINKS_DRAFT2) - -# JSON Schema Draft1 -set(JSON_SCHEMA_DRAFT1_DIR "${PROJECT_SOURCE_DIR}/vendor/jsonschema-draft1") -file(READ "${JSON_SCHEMA_DRAFT1_DIR}/schema.json" METASCHEMA_JSONSCHEMA_DRAFT1) -file(READ "${JSON_SCHEMA_DRAFT1_DIR}/hyper-schema.json" METASCHEMA_HYPERSCHEMA_DRAFT1) -file(READ "${JSON_SCHEMA_DRAFT1_DIR}/json-ref.json" METASCHEMA_JSON_REF_DRAFT1) -file(READ "${JSON_SCHEMA_DRAFT1_DIR}/links.json" METASCHEMA_LINKS_DRAFT1) - -# JSON Schema Draft0 -set(JSON_SCHEMA_DRAFT0_DIR "${PROJECT_SOURCE_DIR}/vendor/jsonschema-draft0") -file(READ "${JSON_SCHEMA_DRAFT0_DIR}/schema.json" METASCHEMA_JSONSCHEMA_DRAFT0) -file(READ "${JSON_SCHEMA_DRAFT0_DIR}/hyper-schema.json" METASCHEMA_HYPERSCHEMA_DRAFT0) -file(READ "${JSON_SCHEMA_DRAFT0_DIR}/json-ref.json" METASCHEMA_JSON_REF_DRAFT0) -file(READ "${JSON_SCHEMA_DRAFT0_DIR}/links.json" METASCHEMA_LINKS_DRAFT0) - -# OpenAPI v3.2 -set(OPENAPI_3_2_DIR "${PROJECT_SOURCE_DIR}/vendor/openapi/oas/3.2") -file(READ "${OPENAPI_3_2_DIR}/meta/2025-09-17" OPENAPI_OAS_3_2_META_2025_09_17) -file(READ "${OPENAPI_3_2_DIR}/dialect/2025-09-17" OPENAPI_OAS_3_2_DIALECT_2025_09_17) - -# OpenAPI v3.1 -set(OPENAPI_3_1_DIR "${PROJECT_SOURCE_DIR}/vendor/openapi/oas/3.1") -file(READ "${OPENAPI_3_1_DIR}/meta/base" OPENAPI_OAS_3_1_META_BASE) -file(READ "${OPENAPI_3_1_DIR}/dialect/base" OPENAPI_OAS_3_1_DIALECT_BASE) - -if(NOT KNOWN_RESOLVER_INPUT) - message(FATAL_ERROR "Missing KNOWN_RESOLVER_INPUT") -endif() -if(NOT KNOWN_RESOLVER_OUTPUT) - message(FATAL_ERROR "Missing KNOWN_RESOLVER_OUTPUT") -endif() -configure_file("${KNOWN_RESOLVER_INPUT}" "${KNOWN_RESOLVER_OUTPUT}" @ONLY) diff --git a/src/core/jsonschema/known_resolver.in.cc b/src/core/jsonschema/known_resolver.in.cc deleted file mode 100644 index 2ece4db5c..000000000 --- a/src/core/jsonschema/known_resolver.in.cc +++ /dev/null @@ -1,604 +0,0 @@ -#include - -#include // std::uint8_t - -enum class KnownSchema : std::uint8_t { - JSONSCHEMA_2020_12, - HYPERSCHEMA_2020_12, - JSONSCHEMA_2020_12_APPLICATOR, - JSONSCHEMA_2020_12_CONTENT, - JSONSCHEMA_2020_12_CORE, - JSONSCHEMA_2020_12_FORMAT_ANNOTATION, - JSONSCHEMA_2020_12_FORMAT_ASSERTION, - JSONSCHEMA_2020_12_HYPER_SCHEMA, - JSONSCHEMA_2020_12_META_DATA, - JSONSCHEMA_2020_12_UNEVALUATED, - JSONSCHEMA_2020_12_VALIDATION, - LINKS_2020_12, - JSONSCHEMA_2020_12_OUTPUT, - - JSONSCHEMA_2019_09, - HYPERSCHEMA_2019_09, - JSONSCHEMA_2019_09_APPLICATOR, - JSONSCHEMA_2019_09_CONTENT, - JSONSCHEMA_2019_09_CORE, - JSONSCHEMA_2019_09_FORMAT, - JSONSCHEMA_2019_09_HYPER_SCHEMA, - JSONSCHEMA_2019_09_META_DATA, - JSONSCHEMA_2019_09_VALIDATION, - LINKS_2019_09, - JSONSCHEMA_2019_09_OUTPUT, - HYPERSCHEMA_2019_09_OUTPUT, - - JSONSCHEMA_DRAFT7, - HYPERSCHEMA_DRAFT7, - LINKS_DRAFT7, - HYPERSCHEMA_DRAFT7_OUTPUT, - - JSONSCHEMA_DRAFT6, - HYPERSCHEMA_DRAFT6, - LINKS_DRAFT6, - - JSONSCHEMA_DRAFT4, - HYPERSCHEMA_DRAFT4, - LINKS_DRAFT4, - - JSONSCHEMA_DRAFT3, - HYPERSCHEMA_DRAFT3, - LINKS_DRAFT3, - JSON_REF_DRAFT3, - - JSONSCHEMA_DRAFT2, - HYPERSCHEMA_DRAFT2, - LINKS_DRAFT2, - JSON_REF_DRAFT2, - - JSONSCHEMA_DRAFT1, - HYPERSCHEMA_DRAFT1, - LINKS_DRAFT1, - JSON_REF_DRAFT1, - - JSONSCHEMA_DRAFT0, - HYPERSCHEMA_DRAFT0, - LINKS_DRAFT0, - JSON_REF_DRAFT0, - - OAS_3_2_DIALECT_2025_09_17, - OAS_3_2_META_2025_09_17, - - OAS_3_1_DIALECT_BASE, - OAS_3_1_META_BASE, - - UNKNOWN -}; - -static auto parse_identifier(const std::string_view identifier) -> KnownSchema { - // JSON Schema 2020-12 - if (identifier == "https://json-schema.org/draft/2020-12/schema" || - identifier == "https://json-schema.org/draft/2020-12/schema#" || - identifier == "http://json-schema.org/draft/2020-12/schema" || - identifier == "http://json-schema.org/draft/2020-12/schema#") { - return KnownSchema::JSONSCHEMA_2020_12; - } else if (identifier == - "https://json-schema.org/draft/2020-12/hyper-schema" || - identifier == - "https://json-schema.org/draft/2020-12/hyper-schema#" || - identifier == - "http://json-schema.org/draft/2020-12/hyper-schema" || - identifier == - "http://json-schema.org/draft/2020-12/hyper-schema#") { - return KnownSchema::HYPERSCHEMA_2020_12; - } else if (identifier == - "https://json-schema.org/draft/2020-12/meta/applicator" || - identifier == - "http://json-schema.org/draft/2020-12/meta/applicator") { - return KnownSchema::JSONSCHEMA_2020_12_APPLICATOR; - } else if (identifier == - "https://json-schema.org/draft/2020-12/meta/content" || - identifier == - "http://json-schema.org/draft/2020-12/meta/content") { - return KnownSchema::JSONSCHEMA_2020_12_CONTENT; - } else if (identifier == "https://json-schema.org/draft/2020-12/meta/core" || - identifier == "http://json-schema.org/draft/2020-12/meta/core") { - return KnownSchema::JSONSCHEMA_2020_12_CORE; - } else if ( - identifier == - "https://json-schema.org/draft/2020-12/meta/format-annotation" || - identifier == - "http://json-schema.org/draft/2020-12/meta/format-annotation") { - return KnownSchema::JSONSCHEMA_2020_12_FORMAT_ANNOTATION; - } else if (identifier == "https://json-schema.org/draft/2020-12/meta/" - "format-assertion" || - identifier == - "http://json-schema.org/draft/2020-12/meta/format-assertion") { - return KnownSchema::JSONSCHEMA_2020_12_FORMAT_ASSERTION; - } else if (identifier == - "https://json-schema.org/draft/2020-12/meta/hyper-schema" || - identifier == - "http://json-schema.org/draft/2020-12/meta/hyper-schema") { - return KnownSchema::JSONSCHEMA_2020_12_HYPER_SCHEMA; - } else if (identifier == - "https://json-schema.org/draft/2020-12/meta/meta-data" || - identifier == - "http://json-schema.org/draft/2020-12/meta/meta-data") { - return KnownSchema::JSONSCHEMA_2020_12_META_DATA; - } else if (identifier == - "https://json-schema.org/draft/2020-12/meta/unevaluated" || - identifier == - "http://json-schema.org/draft/2020-12/meta/unevaluated") { - return KnownSchema::JSONSCHEMA_2020_12_UNEVALUATED; - } else if (identifier == - "https://json-schema.org/draft/2020-12/meta/validation" || - identifier == - "http://json-schema.org/draft/2020-12/meta/validation") { - return KnownSchema::JSONSCHEMA_2020_12_VALIDATION; - } else if (identifier == "https://json-schema.org/draft/2020-12/links" || - identifier == "http://json-schema.org/draft/2020-12/links") { - return KnownSchema::LINKS_2020_12; - } else if (identifier == - "https://json-schema.org/draft/2020-12/output/schema" || - identifier == - "http://json-schema.org/draft/2020-12/output/schema") { - return KnownSchema::JSONSCHEMA_2020_12_OUTPUT; - - // JSON Schema 2019-09 - } else if (identifier == "https://json-schema.org/draft/2019-09/schema" || - identifier == "https://json-schema.org/draft/2019-09/schema#" || - identifier == "http://json-schema.org/draft/2019-09/schema" || - identifier == "http://json-schema.org/draft/2019-09/schema#") { - return KnownSchema::JSONSCHEMA_2019_09; - } else if (identifier == - "https://json-schema.org/draft/2019-09/hyper-schema" || - identifier == - "https://json-schema.org/draft/2019-09/hyper-schema#" || - identifier == - "http://json-schema.org/draft/2019-09/hyper-schema" || - identifier == - "http://json-schema.org/draft/2019-09/hyper-schema#") { - return KnownSchema::HYPERSCHEMA_2019_09; - } else if (identifier == - "https://json-schema.org/draft/2019-09/meta/applicator" || - identifier == - "http://json-schema.org/draft/2019-09/meta/applicator") { - return KnownSchema::JSONSCHEMA_2019_09_APPLICATOR; - } else if (identifier == - "https://json-schema.org/draft/2019-09/meta/content" || - identifier == - "http://json-schema.org/draft/2019-09/meta/content") { - return KnownSchema::JSONSCHEMA_2019_09_CONTENT; - } else if (identifier == "https://json-schema.org/draft/2019-09/meta/core" || - identifier == "http://json-schema.org/draft/2019-09/meta/core") { - return KnownSchema::JSONSCHEMA_2019_09_CORE; - } else if (identifier == - "https://json-schema.org/draft/2019-09/meta/format" || - identifier == "http://json-schema.org/draft/2019-09/meta/format") { - return KnownSchema::JSONSCHEMA_2019_09_FORMAT; - } else if (identifier == - "https://json-schema.org/draft/2019-09/meta/hyper-schema" || - identifier == - "http://json-schema.org/draft/2019-09/meta/hyper-schema") { - return KnownSchema::JSONSCHEMA_2019_09_HYPER_SCHEMA; - } else if (identifier == - "https://json-schema.org/draft/2019-09/meta/meta-data" || - identifier == - "http://json-schema.org/draft/2019-09/meta/meta-data") { - return KnownSchema::JSONSCHEMA_2019_09_META_DATA; - } else if (identifier == - "https://json-schema.org/draft/2019-09/meta/validation" || - identifier == - "http://json-schema.org/draft/2019-09/meta/validation") { - return KnownSchema::JSONSCHEMA_2019_09_VALIDATION; - } else if (identifier == "https://json-schema.org/draft/2019-09/links" || - identifier == "http://json-schema.org/draft/2019-09/links") { - return KnownSchema::LINKS_2019_09; - } else if (identifier == - "https://json-schema.org/draft/2019-09/output/schema" || - identifier == - "http://json-schema.org/draft/2019-09/output/schema") { - return KnownSchema::JSONSCHEMA_2019_09_OUTPUT; - } else if (identifier == - "https://json-schema.org/draft/2019-09/output/hyper-schema" || - identifier == - "http://json-schema.org/draft/2019-09/output/hyper-schema") { - return KnownSchema::HYPERSCHEMA_2019_09_OUTPUT; - - // JSON Schema Draft7 - } else if (identifier == "http://json-schema.org/draft-07/schema#" || - identifier == "http://json-schema.org/draft-07/schema" || - identifier == "https://json-schema.org/draft-07/schema#" || - identifier == "https://json-schema.org/draft-07/schema") { - return KnownSchema::JSONSCHEMA_DRAFT7; - } else if (identifier == "http://json-schema.org/draft-07/hyper-schema#" || - identifier == "http://json-schema.org/draft-07/hyper-schema" || - identifier == "https://json-schema.org/draft-07/hyper-schema#" || - identifier == "https://json-schema.org/draft-07/hyper-schema") { - return KnownSchema::HYPERSCHEMA_DRAFT7; - } else if (identifier == "http://json-schema.org/draft-07/links#" || - identifier == "http://json-schema.org/draft-07/links" || - identifier == "https://json-schema.org/draft-07/links#" || - identifier == "https://json-schema.org/draft-07/links") { - return KnownSchema::LINKS_DRAFT7; - } else if (identifier == - "http://json-schema.org/draft-07/hyper-schema-output" || - identifier == - "https://json-schema.org/draft-07/hyper-schema-output") { - return KnownSchema::HYPERSCHEMA_DRAFT7_OUTPUT; - - // JSON Schema Draft6 - } else if (identifier == "http://json-schema.org/draft-06/schema#" || - identifier == "http://json-schema.org/draft-06/schema" || - identifier == "https://json-schema.org/draft-06/schema#" || - identifier == "https://json-schema.org/draft-06/schema") { - return KnownSchema::JSONSCHEMA_DRAFT6; - } else if (identifier == "http://json-schema.org/draft-06/hyper-schema#" || - identifier == "http://json-schema.org/draft-06/hyper-schema" || - identifier == "https://json-schema.org/draft-06/hyper-schema#" || - identifier == "https://json-schema.org/draft-06/hyper-schema") { - return KnownSchema::HYPERSCHEMA_DRAFT6; - } else if (identifier == "http://json-schema.org/draft-06/links#" || - identifier == "http://json-schema.org/draft-06/links" || - identifier == "https://json-schema.org/draft-06/links#" || - identifier == "https://json-schema.org/draft-06/links") { - return KnownSchema::LINKS_DRAFT6; - - // JSON Schema Draft4 - } else if (identifier == "http://json-schema.org/draft-04/schema#" || - identifier == "http://json-schema.org/draft-04/schema" || - identifier == "https://json-schema.org/draft-04/schema#" || - identifier == "https://json-schema.org/draft-04/schema") { - return KnownSchema::JSONSCHEMA_DRAFT4; - } else if (identifier == "http://json-schema.org/draft-04/hyper-schema#" || - identifier == "http://json-schema.org/draft-04/hyper-schema" || - identifier == "https://json-schema.org/draft-04/hyper-schema#" || - identifier == "https://json-schema.org/draft-04/hyper-schema") { - return KnownSchema::HYPERSCHEMA_DRAFT4; - } else if (identifier == "http://json-schema.org/draft-04/links#" || - identifier == "http://json-schema.org/draft-04/links" || - identifier == "https://json-schema.org/draft-04/links#" || - identifier == "https://json-schema.org/draft-04/links") { - return KnownSchema::LINKS_DRAFT4; - - // JSON Schema Draft3 - } else if (identifier == "http://json-schema.org/draft-03/schema#" || - identifier == "http://json-schema.org/draft-03/schema" || - identifier == "https://json-schema.org/draft-03/schema#" || - identifier == "https://json-schema.org/draft-03/schema") { - return KnownSchema::JSONSCHEMA_DRAFT3; - } else if (identifier == "http://json-schema.org/draft-03/hyper-schema#" || - identifier == "http://json-schema.org/draft-03/hyper-schema" || - identifier == "https://json-schema.org/draft-03/hyper-schema#" || - identifier == "https://json-schema.org/draft-03/hyper-schema") { - return KnownSchema::HYPERSCHEMA_DRAFT3; - } else if (identifier == "http://json-schema.org/draft-03/links#" || - identifier == "http://json-schema.org/draft-03/links" || - identifier == "https://json-schema.org/draft-03/links#" || - identifier == "https://json-schema.org/draft-03/links") { - return KnownSchema::LINKS_DRAFT3; - } else if (identifier == "http://json-schema.org/draft-03/json-ref#" || - identifier == "http://json-schema.org/draft-03/json-ref" || - identifier == "https://json-schema.org/draft-03/json-ref#" || - identifier == "https://json-schema.org/draft-03/json-ref") { - return KnownSchema::JSON_REF_DRAFT3; - - // JSON Schema Draft2 - } else if (identifier == "http://json-schema.org/draft-02/schema#" || - identifier == "http://json-schema.org/draft-02/schema" || - identifier == "https://json-schema.org/draft-02/schema#" || - identifier == "https://json-schema.org/draft-02/schema") { - return KnownSchema::JSONSCHEMA_DRAFT2; - } else if (identifier == "http://json-schema.org/draft-02/hyper-schema#" || - identifier == "http://json-schema.org/draft-02/hyper-schema" || - identifier == "https://json-schema.org/draft-02/hyper-schema#" || - identifier == "https://json-schema.org/draft-02/hyper-schema") { - return KnownSchema::HYPERSCHEMA_DRAFT2; - } else if (identifier == "http://json-schema.org/draft-02/links#" || - identifier == "http://json-schema.org/draft-02/links" || - identifier == "https://json-schema.org/draft-02/links#" || - identifier == "https://json-schema.org/draft-02/links") { - return KnownSchema::LINKS_DRAFT2; - } else if (identifier == "http://json-schema.org/draft-02/json-ref#" || - identifier == "http://json-schema.org/draft-02/json-ref" || - identifier == "https://json-schema.org/draft-02/json-ref#" || - identifier == "https://json-schema.org/draft-02/json-ref") { - return KnownSchema::JSON_REF_DRAFT2; - - // JSON Schema Draft1 - } else if (identifier == "http://json-schema.org/draft-01/schema#" || - identifier == "http://json-schema.org/draft-01/schema" || - identifier == "https://json-schema.org/draft-01/schema#" || - identifier == "https://json-schema.org/draft-01/schema") { - return KnownSchema::JSONSCHEMA_DRAFT1; - } else if (identifier == "http://json-schema.org/draft-01/hyper-schema#" || - identifier == "http://json-schema.org/draft-01/hyper-schema" || - identifier == "https://json-schema.org/draft-01/hyper-schema#" || - identifier == "https://json-schema.org/draft-01/hyper-schema") { - return KnownSchema::HYPERSCHEMA_DRAFT1; - } else if (identifier == "http://json-schema.org/draft-01/links#" || - identifier == "http://json-schema.org/draft-01/links" || - identifier == "https://json-schema.org/draft-01/links#" || - identifier == "https://json-schema.org/draft-01/links") { - return KnownSchema::LINKS_DRAFT1; - } else if (identifier == "http://json-schema.org/draft-01/json-ref#" || - identifier == "http://json-schema.org/draft-01/json-ref" || - identifier == "https://json-schema.org/draft-01/json-ref#" || - identifier == "https://json-schema.org/draft-01/json-ref") { - return KnownSchema::JSON_REF_DRAFT1; - - // JSON Schema Draft0 - } else if (identifier == "http://json-schema.org/draft-00/schema#" || - identifier == "http://json-schema.org/draft-00/schema" || - identifier == "https://json-schema.org/draft-00/schema#" || - identifier == "https://json-schema.org/draft-00/schema") { - return KnownSchema::JSONSCHEMA_DRAFT0; - } else if (identifier == "http://json-schema.org/draft-00/hyper-schema#" || - identifier == "http://json-schema.org/draft-00/hyper-schema" || - identifier == "https://json-schema.org/draft-00/hyper-schema#" || - identifier == "https://json-schema.org/draft-00/hyper-schema") { - return KnownSchema::HYPERSCHEMA_DRAFT0; - } else if (identifier == "http://json-schema.org/draft-00/links#" || - identifier == "http://json-schema.org/draft-00/links" || - identifier == "https://json-schema.org/draft-00/links#" || - identifier == "https://json-schema.org/draft-00/links") { - return KnownSchema::LINKS_DRAFT0; - } else if (identifier == "http://json-schema.org/draft-00/json-ref#" || - identifier == "http://json-schema.org/draft-00/json-ref" || - identifier == "https://json-schema.org/draft-00/json-ref#" || - identifier == "https://json-schema.org/draft-00/json-ref") { - return KnownSchema::JSON_REF_DRAFT0; - - // OpenAPI v3.2 - } else if (identifier == - "https://spec.openapis.org/oas/3.2/dialect/2025-09-17") { - return KnownSchema::OAS_3_2_DIALECT_2025_09_17; - } else if (identifier == - "https://spec.openapis.org/oas/3.2/meta/2025-09-17") { - return KnownSchema::OAS_3_2_META_2025_09_17; - - // OpenAPI v3.1 - } else if (identifier == "https://spec.openapis.org/oas/3.1/dialect/base") { - return KnownSchema::OAS_3_1_DIALECT_BASE; - } else if (identifier == "https://spec.openapis.org/oas/3.1/meta/base") { - return KnownSchema::OAS_3_1_META_BASE; - } - - return KnownSchema::UNKNOWN; -} - -auto sourcemeta::core::schema_resolver(const std::string_view identifier) - -> std::optional { - switch (parse_identifier(identifier)) { - case KnownSchema::JSONSCHEMA_2020_12: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2020_12@)EOF"); - case KnownSchema::HYPERSCHEMA_2020_12: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_HYPERSCHEMA_2020_12@)EOF"); - case KnownSchema::JSONSCHEMA_2020_12_APPLICATOR: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2020_12_APPLICATOR@)EOF"); - case KnownSchema::JSONSCHEMA_2020_12_CONTENT: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2020_12_CONTENT@)EOF"); - case KnownSchema::JSONSCHEMA_2020_12_CORE: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2020_12_CORE@)EOF"); - case KnownSchema::JSONSCHEMA_2020_12_FORMAT_ANNOTATION: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2020_12_FORMAT_ANNOTATION@)EOF"); - case KnownSchema::JSONSCHEMA_2020_12_FORMAT_ASSERTION: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2020_12_FORMAT_ASSERTION@)EOF"); - case KnownSchema::JSONSCHEMA_2020_12_HYPER_SCHEMA: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2020_12_HYPER_SCHEMA@)EOF"); - case KnownSchema::JSONSCHEMA_2020_12_META_DATA: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2020_12_META_DATA@)EOF"); - case KnownSchema::JSONSCHEMA_2020_12_UNEVALUATED: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2020_12_UNEVALUATED@)EOF"); - case KnownSchema::JSONSCHEMA_2020_12_VALIDATION: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2020_12_VALIDATION@)EOF"); - case KnownSchema::LINKS_2020_12: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_LINKS_2020_12@)EOF"); - case KnownSchema::JSONSCHEMA_2020_12_OUTPUT: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2020_12_OUTPUT@)EOF"); - case KnownSchema::JSONSCHEMA_2019_09: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2019_09@)EOF"); - case KnownSchema::HYPERSCHEMA_2019_09: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_HYPERSCHEMA_2019_09@)EOF"); - case KnownSchema::JSONSCHEMA_2019_09_APPLICATOR: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2019_09_APPLICATOR@)EOF"); - case KnownSchema::JSONSCHEMA_2019_09_CONTENT: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2019_09_CONTENT@)EOF"); - case KnownSchema::JSONSCHEMA_2019_09_CORE: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2019_09_CORE@)EOF"); - case KnownSchema::JSONSCHEMA_2019_09_FORMAT: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2019_09_FORMAT@)EOF"); - case KnownSchema::JSONSCHEMA_2019_09_HYPER_SCHEMA: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2019_09_HYPER_SCHEMA@)EOF"); - case KnownSchema::JSONSCHEMA_2019_09_META_DATA: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2019_09_META_DATA@)EOF"); - case KnownSchema::JSONSCHEMA_2019_09_VALIDATION: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2019_09_VALIDATION@)EOF"); - case KnownSchema::LINKS_2019_09: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_LINKS_2019_09@)EOF"); - case KnownSchema::JSONSCHEMA_2019_09_OUTPUT: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_2019_09_OUTPUT@)EOF"); - case KnownSchema::HYPERSCHEMA_2019_09_OUTPUT: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_HYPERSCHEMA_2019_09_OUTPUT@)EOF"); - case KnownSchema::JSONSCHEMA_DRAFT7: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_DRAFT7@)EOF"); - case KnownSchema::HYPERSCHEMA_DRAFT7: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_HYPERSCHEMA_DRAFT7@)EOF"); - case KnownSchema::LINKS_DRAFT7: - return sourcemeta::core::parse_json(R"EOF(@METASCHEMA_LINKS_DRAFT7@)EOF"); - case KnownSchema::HYPERSCHEMA_DRAFT7_OUTPUT: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_HYPERSCHEMA_DRAFT7_OUTPUT@)EOF"); - case KnownSchema::JSONSCHEMA_DRAFT6: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_DRAFT6@)EOF"); - case KnownSchema::HYPERSCHEMA_DRAFT6: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_HYPERSCHEMA_DRAFT6@)EOF"); - case KnownSchema::LINKS_DRAFT6: - return sourcemeta::core::parse_json(R"EOF(@METASCHEMA_LINKS_DRAFT6@)EOF"); - case KnownSchema::JSONSCHEMA_DRAFT4: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_DRAFT4@)EOF"); - case KnownSchema::HYPERSCHEMA_DRAFT4: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_HYPERSCHEMA_DRAFT4@)EOF"); - case KnownSchema::LINKS_DRAFT4: - return sourcemeta::core::parse_json(R"EOF(@METASCHEMA_LINKS_DRAFT4@)EOF"); - case KnownSchema::JSONSCHEMA_DRAFT3: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_DRAFT3@)EOF"); - case KnownSchema::HYPERSCHEMA_DRAFT3: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_HYPERSCHEMA_DRAFT3@)EOF"); - case KnownSchema::LINKS_DRAFT3: - return sourcemeta::core::parse_json(R"EOF(@METASCHEMA_LINKS_DRAFT3@)EOF"); - case KnownSchema::JSON_REF_DRAFT3: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSON_REF_DRAFT3@)EOF"); - case KnownSchema::JSONSCHEMA_DRAFT2: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_DRAFT2@)EOF"); - case KnownSchema::HYPERSCHEMA_DRAFT2: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_HYPERSCHEMA_DRAFT2@)EOF"); - case KnownSchema::LINKS_DRAFT2: - return sourcemeta::core::parse_json(R"EOF(@METASCHEMA_LINKS_DRAFT2@)EOF"); - case KnownSchema::JSON_REF_DRAFT2: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSON_REF_DRAFT2@)EOF"); - case KnownSchema::JSONSCHEMA_DRAFT1: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_DRAFT1@)EOF"); - case KnownSchema::HYPERSCHEMA_DRAFT1: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_HYPERSCHEMA_DRAFT1@)EOF"); - case KnownSchema::LINKS_DRAFT1: - return sourcemeta::core::parse_json(R"EOF(@METASCHEMA_LINKS_DRAFT1@)EOF"); - case KnownSchema::JSON_REF_DRAFT1: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSON_REF_DRAFT1@)EOF"); - case KnownSchema::JSONSCHEMA_DRAFT0: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSONSCHEMA_DRAFT0@)EOF"); - case KnownSchema::HYPERSCHEMA_DRAFT0: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_HYPERSCHEMA_DRAFT0@)EOF"); - case KnownSchema::LINKS_DRAFT0: - return sourcemeta::core::parse_json(R"EOF(@METASCHEMA_LINKS_DRAFT0@)EOF"); - case KnownSchema::JSON_REF_DRAFT0: - return sourcemeta::core::parse_json( - R"EOF(@METASCHEMA_JSON_REF_DRAFT0@)EOF"); - case KnownSchema::OAS_3_2_DIALECT_2025_09_17: - return sourcemeta::core::parse_json( - R"EOF(@OPENAPI_OAS_3_2_DIALECT_2025_09_17@)EOF"); - case KnownSchema::OAS_3_2_META_2025_09_17: - return sourcemeta::core::parse_json( - R"EOF(@OPENAPI_OAS_3_2_META_2025_09_17@)EOF"); - case KnownSchema::OAS_3_1_DIALECT_BASE: - return sourcemeta::core::parse_json( - R"EOF(@OPENAPI_OAS_3_1_DIALECT_BASE@)EOF"); - case KnownSchema::OAS_3_1_META_BASE: - return sourcemeta::core::parse_json( - R"EOF(@OPENAPI_OAS_3_1_META_BASE@)EOF"); - case KnownSchema::UNKNOWN: - return std::nullopt; - } - - return std::nullopt; -} - -auto sourcemeta::core::is_known_schema( - const std::string_view identifier) noexcept -> bool { - return parse_identifier(identifier) != KnownSchema::UNKNOWN; -} - -auto sourcemeta::core::is_official_schema( - const std::string_view identifier) noexcept -> bool { - switch (parse_identifier(identifier)) { - case KnownSchema::JSONSCHEMA_2020_12: - case KnownSchema::HYPERSCHEMA_2020_12: - case KnownSchema::JSONSCHEMA_2020_12_APPLICATOR: - case KnownSchema::JSONSCHEMA_2020_12_CONTENT: - case KnownSchema::JSONSCHEMA_2020_12_CORE: - case KnownSchema::JSONSCHEMA_2020_12_FORMAT_ANNOTATION: - case KnownSchema::JSONSCHEMA_2020_12_FORMAT_ASSERTION: - case KnownSchema::JSONSCHEMA_2020_12_HYPER_SCHEMA: - case KnownSchema::JSONSCHEMA_2020_12_META_DATA: - case KnownSchema::JSONSCHEMA_2020_12_UNEVALUATED: - case KnownSchema::JSONSCHEMA_2020_12_VALIDATION: - case KnownSchema::LINKS_2020_12: - case KnownSchema::JSONSCHEMA_2020_12_OUTPUT: - case KnownSchema::JSONSCHEMA_2019_09: - case KnownSchema::HYPERSCHEMA_2019_09: - case KnownSchema::JSONSCHEMA_2019_09_APPLICATOR: - case KnownSchema::JSONSCHEMA_2019_09_CONTENT: - case KnownSchema::JSONSCHEMA_2019_09_CORE: - case KnownSchema::JSONSCHEMA_2019_09_FORMAT: - case KnownSchema::JSONSCHEMA_2019_09_HYPER_SCHEMA: - case KnownSchema::JSONSCHEMA_2019_09_META_DATA: - case KnownSchema::JSONSCHEMA_2019_09_VALIDATION: - case KnownSchema::LINKS_2019_09: - case KnownSchema::JSONSCHEMA_2019_09_OUTPUT: - case KnownSchema::HYPERSCHEMA_2019_09_OUTPUT: - case KnownSchema::JSONSCHEMA_DRAFT7: - case KnownSchema::HYPERSCHEMA_DRAFT7: - case KnownSchema::LINKS_DRAFT7: - case KnownSchema::HYPERSCHEMA_DRAFT7_OUTPUT: - case KnownSchema::JSONSCHEMA_DRAFT6: - case KnownSchema::HYPERSCHEMA_DRAFT6: - case KnownSchema::LINKS_DRAFT6: - case KnownSchema::JSONSCHEMA_DRAFT4: - case KnownSchema::HYPERSCHEMA_DRAFT4: - case KnownSchema::LINKS_DRAFT4: - case KnownSchema::JSONSCHEMA_DRAFT3: - case KnownSchema::HYPERSCHEMA_DRAFT3: - case KnownSchema::LINKS_DRAFT3: - case KnownSchema::JSON_REF_DRAFT3: - case KnownSchema::JSONSCHEMA_DRAFT2: - case KnownSchema::HYPERSCHEMA_DRAFT2: - case KnownSchema::LINKS_DRAFT2: - case KnownSchema::JSON_REF_DRAFT2: - case KnownSchema::JSONSCHEMA_DRAFT1: - case KnownSchema::HYPERSCHEMA_DRAFT1: - case KnownSchema::LINKS_DRAFT1: - case KnownSchema::JSON_REF_DRAFT1: - case KnownSchema::JSONSCHEMA_DRAFT0: - case KnownSchema::HYPERSCHEMA_DRAFT0: - case KnownSchema::LINKS_DRAFT0: - case KnownSchema::JSON_REF_DRAFT0: - return true; - case KnownSchema::OAS_3_2_DIALECT_2025_09_17: - case KnownSchema::OAS_3_2_META_2025_09_17: - case KnownSchema::OAS_3_1_DIALECT_BASE: - case KnownSchema::OAS_3_1_META_BASE: - case KnownSchema::UNKNOWN: - return false; - } - - return false; -} diff --git a/src/core/jsonschema/known_walker.cc b/src/core/jsonschema/known_walker.cc deleted file mode 100644 index f439eb5d4..000000000 --- a/src/core/jsonschema/known_walker.cc +++ /dev/null @@ -1,2335 +0,0 @@ -#include - -#include // std::unordered_map - -namespace sourcemeta::core { - -namespace { - -using Known = Vocabularies::Known; -using KeywordHandler = - const SchemaWalkerResult &(*)(const Vocabularies &vocabularies); - -static const SchemaWalkerResult UNKNOWN_RESULT{ - SchemaKeywordType::Unknown, std::nullopt, {}, {}, {}}; - -static const SchemaWalkerResult UNKNOWN_WITH_REF_RESULT{ - SchemaKeywordType::Unknown, std::nullopt, {"$ref"}, {}, {}}; - -auto has_draft3_to_7(const Vocabularies &vocabularies) -> bool { - return vocabularies.contains(Known::JSON_Schema_Draft_7) || - vocabularies.contains(Known::JSON_Schema_Draft_7_Hyper) || - vocabularies.contains(Known::JSON_Schema_Draft_6) || - vocabularies.contains(Known::JSON_Schema_Draft_6_Hyper) || - vocabularies.contains(Known::JSON_Schema_Draft_4) || - vocabularies.contains(Known::JSON_Schema_Draft_4_Hyper) || - vocabularies.contains(Known::JSON_Schema_Draft_3) || - vocabularies.contains(Known::JSON_Schema_Draft_3_Hyper); -} - -#define RETURN_WITH_DEPENDENCIES(_vocabulary, _types, _strategy, ...) \ - { \ - static const SchemaWalkerResult result{ \ - SchemaKeywordType::_strategy, _vocabulary, {__VA_ARGS__}, {}, _types}; \ - return result; \ - } - -#define RETURN_WITH_ORDER_DEPENDENCIES(_vocabulary, _types, _strategy, ...) \ - { \ - static const SchemaWalkerResult result{ \ - SchemaKeywordType::_strategy, _vocabulary, {}, {__VA_ARGS__}, _types}; \ - return result; \ - } - -#define RETURN(_vocabulary, _types, _strategy) \ - { \ - static const SchemaWalkerResult result{ \ - SchemaKeywordType::_strategy, _vocabulary, {}, {}, _types}; \ - return result; \ - } - -#define CHECK_VOCABULARY_WITH_DEPENDENCIES(_vocabulary, _types, _strategy, \ - ...) \ - if (vocabularies.contains(_vocabulary)) { \ - RETURN_WITH_DEPENDENCIES(_vocabulary, _types, _strategy, __VA_ARGS__) \ - } - -#define CHECK_VOCABULARY_WITH_ORDER_DEPENDENCIES(_vocabulary, _types, \ - _strategy, ...) \ - if (vocabularies.contains(_vocabulary)) { \ - RETURN_WITH_ORDER_DEPENDENCIES(_vocabulary, _types, _strategy, \ - __VA_ARGS__) \ - } - -#define CHECK_VOCABULARY(_vocabulary, _types, _strategy) \ - if (vocabularies.contains(_vocabulary)) { \ - RETURN(_vocabulary, _types, _strategy) \ - } - -auto handle_dollar_id(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Core, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Core, {}, Other) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, Other, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, Other, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Other, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_dollar_schema(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Core, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Core, {}, Other) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, Other, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, Other, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, {}, Other, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, {}, Other, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Other) - return UNKNOWN_RESULT; -} - -auto handle_dollar_ref(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Core, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Core, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_6, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_6_Hyper, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_4, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_4_Hyper, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_3, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_3_Hyper, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, {}, Reference) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Reference) - return UNKNOWN_RESULT; -} - -auto handle_dollar_defs(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Core, {}, LocationMembers) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Core, {}, LocationMembers) - return UNKNOWN_RESULT; -} - -auto handle_definitions(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Core, {}, LocationMembers) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Core, {}, LocationMembers) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, - LocationMembers, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - LocationMembers, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, - LocationMembers, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - LocationMembers, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, {}, - LocationMembers, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - LocationMembers, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, {}, - LocationMembers, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - LocationMembers, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_dollar_comment(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Core, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Core, {}, Comment) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Comment, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_dollar_anchor(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Core, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Core, {}, Other) - return UNKNOWN_RESULT; -} - -auto handle_dollar_vocabulary(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Core, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Core, {}, Other) - return UNKNOWN_RESULT; -} - -auto handle_dollar_dynamicRef(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Core, {}, Reference) - return UNKNOWN_RESULT; -} - -auto handle_dollar_dynamicAnchor(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Core, {}, Other) - return UNKNOWN_RESULT; -} - -auto handle_dollar_recursiveRef(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Core, {}, Reference) - return UNKNOWN_RESULT; -} - -auto handle_dollar_recursiveAnchor(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Core, {}, Other) - return UNKNOWN_RESULT; -} - -auto handle_id(const Vocabularies &vocabularies) -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, {}, Other, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, {}, Other, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Other) - return UNKNOWN_RESULT; -} - -auto handle_oneOf(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Applicator, {}, - ApplicatorElementsInPlaceSome) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Applicator, {}, - ApplicatorElementsInPlaceSome) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, - ApplicatorElementsInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - ApplicatorElementsInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, - ApplicatorElementsInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - ApplicatorElementsInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, {}, - ApplicatorElementsInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - ApplicatorElementsInPlaceSome, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_anyOf(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Applicator, {}, - ApplicatorElementsInPlaceSome) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Applicator, {}, - ApplicatorElementsInPlaceSome) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, - ApplicatorElementsInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - ApplicatorElementsInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, - ApplicatorElementsInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - ApplicatorElementsInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, {}, - ApplicatorElementsInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - ApplicatorElementsInPlaceSome, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_allOf(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Applicator, {}, - ApplicatorElementsInPlace) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Applicator, {}, - ApplicatorElementsInPlace) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, - ApplicatorElementsInPlace, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - ApplicatorElementsInPlace, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, - ApplicatorElementsInPlace, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - ApplicatorElementsInPlace, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, {}, - ApplicatorElementsInPlace, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - ApplicatorElementsInPlace, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_if(const Vocabularies &vocabularies) -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Applicator, {}, - ApplicatorValueInPlaceMaybe) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Applicator, {}, - ApplicatorValueInPlaceMaybe) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, - ApplicatorValueInPlaceMaybe, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - ApplicatorValueInPlaceMaybe, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_then(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_2020_12_Applicator, {}, - ApplicatorValueInPlaceMaybe, "if") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_2019_09_Applicator, {}, - ApplicatorValueInPlaceMaybe, "if") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, - ApplicatorValueInPlaceMaybe, "if") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - ApplicatorValueInPlaceMaybe, "if") - return UNKNOWN_RESULT; -} - -auto handle_else(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_2020_12_Applicator, {}, - ApplicatorValueInPlaceMaybe, "if") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_2019_09_Applicator, {}, - ApplicatorValueInPlaceMaybe, "if") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, - ApplicatorValueInPlaceMaybe, "if") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - ApplicatorValueInPlaceMaybe, "if") - return UNKNOWN_RESULT; -} - -auto handle_not(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Applicator, {}, - ApplicatorValueInPlaceNegate) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Applicator, {}, - ApplicatorValueInPlaceNegate) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, - ApplicatorValueInPlaceNegate, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - ApplicatorValueInPlaceNegate, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, - ApplicatorValueInPlaceNegate, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - ApplicatorValueInPlaceNegate, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, {}, - ApplicatorValueInPlaceNegate, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - ApplicatorValueInPlaceNegate, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_properties(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - if (vocabularies.contains(Known::JSON_Schema_2020_12_Applicator)) { - if (vocabularies.contains(Known::JSON_Schema_2020_12_Validation)) { - RETURN_WITH_ORDER_DEPENDENCIES( - Known::JSON_Schema_2020_12_Applicator, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyStatic, "required") - } - RETURN(Known::JSON_Schema_2020_12_Applicator, - make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyStatic) - } - if (vocabularies.contains(Known::JSON_Schema_2019_09_Applicator)) { - if (vocabularies.contains(Known::JSON_Schema_2019_09_Validation)) { - RETURN_WITH_ORDER_DEPENDENCIES( - Known::JSON_Schema_2019_09_Applicator, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyStatic, "required") - } - RETURN(Known::JSON_Schema_2019_09_Applicator, - make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyStatic) - } - if (vocabularies.contains(Known::JSON_Schema_Draft_7)) { - static const SchemaWalkerResult result{ - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic, - Known::JSON_Schema_Draft_7, - {"$ref"}, - {"required"}, - make_set({JSON::Type::Object})}; - return result; - } - if (vocabularies.contains(Known::JSON_Schema_Draft_7_Hyper)) { - static const SchemaWalkerResult result{ - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic, - Known::JSON_Schema_Draft_7_Hyper, - {"$ref"}, - {"required"}, - make_set({JSON::Type::Object})}; - return result; - } - if (vocabularies.contains(Known::JSON_Schema_Draft_6)) { - static const SchemaWalkerResult result{ - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic, - Known::JSON_Schema_Draft_6, - {"$ref"}, - {"required"}, - make_set({JSON::Type::Object})}; - return result; - } - if (vocabularies.contains(Known::JSON_Schema_Draft_6_Hyper)) { - static const SchemaWalkerResult result{ - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic, - Known::JSON_Schema_Draft_6_Hyper, - {"$ref"}, - {"required"}, - make_set({JSON::Type::Object})}; - return result; - } - if (vocabularies.contains(Known::JSON_Schema_Draft_4)) { - static const SchemaWalkerResult result{ - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic, - Known::JSON_Schema_Draft_4, - {"$ref"}, - {"required"}, - make_set({JSON::Type::Object})}; - return result; - } - if (vocabularies.contains(Known::JSON_Schema_Draft_4_Hyper)) { - static const SchemaWalkerResult result{ - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic, - Known::JSON_Schema_Draft_4_Hyper, - {"$ref"}, - {"required"}, - make_set({JSON::Type::Object})}; - return result; - } - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyStatic, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3_Hyper, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyStatic, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyStatic) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyStatic) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyStatic) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyStatic) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyStatic) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyStatic) - return UNKNOWN_RESULT; -} - -auto handle_additionalProperties(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_2020_12_Applicator, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties", "patternProperties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_2019_09_Applicator, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties", "patternProperties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties", "patternProperties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7_Hyper, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties", "patternProperties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties", "patternProperties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6_Hyper, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties", "patternProperties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties", "patternProperties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4_Hyper, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties", "patternProperties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties", "patternProperties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3_Hyper, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties", "patternProperties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_2, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_2_Hyper, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_1, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_1_Hyper, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_0, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_0_Hyper, make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties") - return UNKNOWN_RESULT; -} - -auto handle_patternProperties(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Applicator, - make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyRegex) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Applicator, - make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyRegex) - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyRegex, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7_Hyper, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyRegex, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyRegex, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6_Hyper, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyRegex, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyRegex, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4_Hyper, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyRegex, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyRegex, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3_Hyper, make_set({JSON::Type::Object}), - ApplicatorMembersTraversePropertyRegex, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_propertyNames(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Applicator, - make_set({JSON::Type::Object}), - ApplicatorValueTraverseAnyPropertyKey) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Applicator, - make_set({JSON::Type::Object}), - ApplicatorValueTraverseAnyPropertyKey) - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7, make_set({JSON::Type::Object}), - ApplicatorValueTraverseAnyPropertyKey, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7_Hyper, make_set({JSON::Type::Object}), - ApplicatorValueTraverseAnyPropertyKey, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6, make_set({JSON::Type::Object}), - ApplicatorValueTraverseAnyPropertyKey, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6_Hyper, make_set({JSON::Type::Object}), - ApplicatorValueTraverseAnyPropertyKey, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_dependentSchemas(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Applicator, - make_set({JSON::Type::Object}), ApplicatorMembersInPlaceSome) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Applicator, - make_set({JSON::Type::Object}), ApplicatorMembersInPlaceSome) - return UNKNOWN_RESULT; -} - -auto handle_dependencies(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Object}), - ApplicatorMembersInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Object}), - ApplicatorMembersInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Object}), - ApplicatorMembersInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Object}), - ApplicatorMembersInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, - make_set({JSON::Type::Object}), - ApplicatorMembersInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::Object}), - ApplicatorMembersInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, - make_set({JSON::Type::Object}), - ApplicatorMembersInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::Object}), - ApplicatorMembersInPlaceSome, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_contains(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - if (vocabularies.contains(Known::JSON_Schema_2020_12_Applicator)) { - if (vocabularies.contains(Known::JSON_Schema_2020_12_Validation)) { - RETURN_WITH_DEPENDENCIES( - Known::JSON_Schema_2020_12_Applicator, make_set({JSON::Type::Array}), - ApplicatorValueTraverseAnyItem, "minContains", "maxContains") - } - RETURN(Known::JSON_Schema_2020_12_Applicator, make_set({JSON::Type::Array}), - ApplicatorValueTraverseAnyItem) - } - if (vocabularies.contains(Known::JSON_Schema_2019_09_Applicator)) { - if (vocabularies.contains(Known::JSON_Schema_2019_09_Validation)) { - RETURN_WITH_DEPENDENCIES( - Known::JSON_Schema_2019_09_Applicator, make_set({JSON::Type::Array}), - ApplicatorValueTraverseAnyItem, "minContains", "maxContains") - } - RETURN(Known::JSON_Schema_2019_09_Applicator, make_set({JSON::Type::Array}), - ApplicatorValueTraverseAnyItem) - } - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Array}), - ApplicatorValueTraverseAnyItem, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Array}), - ApplicatorValueTraverseAnyItem, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Array}), - ApplicatorValueTraverseAnyItem, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Array}), - ApplicatorValueTraverseAnyItem, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_items(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_2020_12_Applicator, make_set({JSON::Type::Array}), - ApplicatorValueTraverseSomeItem, "prefixItems") - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Applicator, - make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem) - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7, make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7_Hyper, make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6, make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6_Hyper, make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4, make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4_Hyper, make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3, make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3_Hyper, make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::Array}), - ApplicatorValueOrElementsTraverseAnyItemOrItem) - return UNKNOWN_RESULT; -} - -auto handle_prefixItems(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Applicator, - make_set({JSON::Type::Array}), - ApplicatorElementsTraverseItem) - return UNKNOWN_RESULT; -} - -auto handle_additionalItems(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_2019_09_Applicator, - make_set({JSON::Type::Array}), - ApplicatorValueTraverseSomeItem, "items") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Array}), - ApplicatorValueTraverseSomeItem, "items") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Array}), - ApplicatorValueTraverseSomeItem, "items") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Array}), - ApplicatorValueTraverseSomeItem, "items") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Array}), - ApplicatorValueTraverseSomeItem, "items") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, - make_set({JSON::Type::Array}), - ApplicatorValueTraverseSomeItem, "items") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::Array}), - ApplicatorValueTraverseSomeItem, "items") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, - make_set({JSON::Type::Array}), - ApplicatorValueTraverseSomeItem, "items") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::Array}), - ApplicatorValueTraverseSomeItem, "items") - return UNKNOWN_RESULT; -} - -auto handle_unevaluatedProperties(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - if (vocabularies.contains(Known::JSON_Schema_2020_12_Unevaluated)) { - if (vocabularies.contains(Known::JSON_Schema_2020_12_Applicator)) { - RETURN_WITH_DEPENDENCIES( - Known::JSON_Schema_2020_12_Unevaluated, - make_set({JSON::Type::Object}), ApplicatorValueTraverseSomeProperty, - "properties", "patternProperties", "additionalProperties") - } - RETURN(Known::JSON_Schema_2020_12_Unevaluated, - make_set({JSON::Type::Object}), ApplicatorValueTraverseSomeProperty) - } - if (vocabularies.contains(Known::JSON_Schema_2019_09_Applicator)) { - RETURN_WITH_DEPENDENCIES(Known::JSON_Schema_2019_09_Applicator, - make_set({JSON::Type::Object}), - ApplicatorValueTraverseSomeProperty, "properties", - "patternProperties", "additionalProperties") - } - return UNKNOWN_RESULT; -} - -auto handle_unevaluatedItems(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - if (vocabularies.contains(Known::JSON_Schema_2020_12_Unevaluated)) { - if (vocabularies.contains(Known::JSON_Schema_2020_12_Applicator)) { - RETURN_WITH_DEPENDENCIES( - Known::JSON_Schema_2020_12_Unevaluated, make_set({JSON::Type::Array}), - ApplicatorValueTraverseSomeItem, "prefixItems", "items", "contains") - } - RETURN(Known::JSON_Schema_2020_12_Unevaluated, - make_set({JSON::Type::Array}), ApplicatorValueTraverseSomeItem) - } - if (vocabularies.contains(Known::JSON_Schema_2019_09_Applicator)) { - RETURN_WITH_DEPENDENCIES( - Known::JSON_Schema_2019_09_Applicator, make_set({JSON::Type::Array}), - ApplicatorValueTraverseSomeItem, "items", "additionalItems") - } - return UNKNOWN_RESULT; -} - -auto handle_type(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - if (vocabularies.contains(Known::JSON_Schema_2020_12_Validation)) { - if (vocabularies.contains(Known::JSON_Schema_2020_12_Applicator)) { - RETURN_WITH_ORDER_DEPENDENCIES(Known::JSON_Schema_2020_12_Validation, {}, - Assertion, "properties") - } - RETURN(Known::JSON_Schema_2020_12_Validation, {}, Assertion) - } - if (vocabularies.contains(Known::JSON_Schema_2019_09_Validation)) { - if (vocabularies.contains(Known::JSON_Schema_2019_09_Applicator)) { - RETURN_WITH_ORDER_DEPENDENCIES(Known::JSON_Schema_2019_09_Validation, {}, - Assertion, "properties") - } - RETURN(Known::JSON_Schema_2019_09_Validation, {}, Assertion) - } - CHECK_VOCABULARY_WITH_ORDER_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, - Assertion, "properties") - CHECK_VOCABULARY_WITH_ORDER_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - Assertion, "properties") - CHECK_VOCABULARY_WITH_ORDER_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, - Assertion, "properties") - CHECK_VOCABULARY_WITH_ORDER_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Assertion, "properties") - CHECK_VOCABULARY_WITH_ORDER_DEPENDENCIES(Known::JSON_Schema_Draft_4, {}, - Assertion, "properties") - CHECK_VOCABULARY_WITH_ORDER_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - Assertion, "properties") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, {}, - ApplicatorElementsInPlaceSome, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - ApplicatorElementsInPlaceSome, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, {}, - ApplicatorElementsInPlaceSome) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, - ApplicatorElementsInPlaceSome) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, {}, - ApplicatorElementsInPlaceSome) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, - ApplicatorElementsInPlaceSome) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, {}, - ApplicatorElementsInPlaceSome) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, - ApplicatorElementsInPlaceSome) - return UNKNOWN_RESULT; -} - -auto handle_enum(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, {}, Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, {}, Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, {}, Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, {}, Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - Assertion, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, {}, Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, {}, Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, {}, Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Assertion) - return UNKNOWN_RESULT; -} - -auto handle_const(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, {}, Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, {}, Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Assertion, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_multipleOf(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_maximum(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_ORDER_DEPENDENCIES( - Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "type") - CHECK_VOCABULARY_WITH_ORDER_DEPENDENCIES( - Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "type") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_minimum(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_ORDER_DEPENDENCIES( - Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "type") - CHECK_VOCABULARY_WITH_ORDER_DEPENDENCIES( - Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "type") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_exclusiveMaximum(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_exclusiveMinimum(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_maxLength(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::String}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::String}), Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::String}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::String}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::String}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::String}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, - make_set({JSON::Type::String}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::String}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, - make_set({JSON::Type::String}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::String}), Assertion, - "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, make_set({JSON::Type::String}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::String}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, make_set({JSON::Type::String}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::String}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, make_set({JSON::Type::String}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::String}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_minLength(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::String}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::String}), Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::String}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::String}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::String}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::String}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, - make_set({JSON::Type::String}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::String}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, - make_set({JSON::Type::String}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::String}), Assertion, - "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, make_set({JSON::Type::String}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::String}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, make_set({JSON::Type::String}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::String}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, make_set({JSON::Type::String}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::String}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_pattern(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::String}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::String}), Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::String}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::String}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::String}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::String}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, - make_set({JSON::Type::String}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::String}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, - make_set({JSON::Type::String}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::String}), Assertion, - "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, make_set({JSON::Type::String}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::String}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, make_set({JSON::Type::String}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::String}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, make_set({JSON::Type::String}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::String}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_maxItems(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Array}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Array}), Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Array}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Array}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Array}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Array}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, - make_set({JSON::Type::Array}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::Array}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, - make_set({JSON::Type::Array}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::Array}), Assertion, - "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, make_set({JSON::Type::Array}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::Array}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, make_set({JSON::Type::Array}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::Array}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, make_set({JSON::Type::Array}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::Array}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_minItems(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Array}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Array}), Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Array}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Array}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Array}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Array}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, - make_set({JSON::Type::Array}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::Array}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, - make_set({JSON::Type::Array}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::Array}), Assertion, - "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, make_set({JSON::Type::Array}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::Array}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, make_set({JSON::Type::Array}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::Array}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, make_set({JSON::Type::Array}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::Array}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_uniqueItems(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Array}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Array}), Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Array}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Array}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Array}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Array}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, - make_set({JSON::Type::Array}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::Array}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, - make_set({JSON::Type::Array}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::Array}), Assertion, - "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, make_set({JSON::Type::Array}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::Array}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_maxProperties(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Object}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Object}), Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Object}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Object}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Object}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Object}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, - make_set({JSON::Type::Object}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::Object}), Assertion, - "$ref") - return UNKNOWN_RESULT; -} - -auto handle_minProperties(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Object}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Object}), Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Object}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Object}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Object}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Object}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, - make_set({JSON::Type::Object}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::Object}), Assertion, - "$ref") - return UNKNOWN_RESULT; -} - -auto handle_required(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Object}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Object}), Assertion) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::Object}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::Object}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::Object}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::Object}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, - make_set({JSON::Type::Object}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::Object}), Assertion, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, - make_set({JSON::Type::Object}), Assertion, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::Object}), Assertion, - "$ref") - return UNKNOWN_RESULT; -} - -auto handle_dependentRequired(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Object}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Object}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_minContains(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Array}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Array}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_maxContains(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Validation, - make_set({JSON::Type::Array}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Validation, - make_set({JSON::Type::Array}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_title(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Meta_Data, {}, Annotation) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Meta_Data, {}, Annotation) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Comment) - return UNKNOWN_RESULT; -} - -auto handle_description(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Meta_Data, {}, Annotation) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Meta_Data, {}, Annotation) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Comment) - return UNKNOWN_RESULT; -} - -auto handle_default(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Meta_Data, {}, Annotation) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Meta_Data, {}, Annotation) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, {}, Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Comment) - return UNKNOWN_RESULT; -} - -auto handle_deprecated(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Meta_Data, {}, Annotation) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Meta_Data, {}, Annotation) - return UNKNOWN_RESULT; -} - -auto handle_readOnly(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Meta_Data, {}, Annotation) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Meta_Data, {}, Annotation) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Comment, "$ref") - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_writeOnly(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Meta_Data, {}, Annotation) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Meta_Data, {}, Annotation) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Comment, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_examples(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Meta_Data, {}, Annotation) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Meta_Data, {}, Annotation) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - Comment, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, {}, Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Comment, "$ref") - return UNKNOWN_RESULT; -} - -auto handle_format(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Format_Assertion, - make_set({JSON::Type::String}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Format_Annotation, - make_set({JSON::Type::String}), Annotation) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Format, - make_set({JSON::Type::String}), Annotation) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::String}), Other, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::String}), Other, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::String}), Other, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::String}), Other, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4, - make_set({JSON::Type::String}), Other, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, - make_set({JSON::Type::String}), Other, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, - make_set({JSON::Type::String}), Other, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::String}), Other, - "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, make_set({JSON::Type::String}), - Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::String}), Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, make_set({JSON::Type::String}), - Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::String}), Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, make_set({JSON::Type::String}), - Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::String}), Other) - return UNKNOWN_RESULT; -} - -auto handle_contentSchema(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Content, - make_set({JSON::Type::String}), ApplicatorValueInPlaceOther) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Content, - make_set({JSON::Type::String}), ApplicatorValueInPlaceOther) - return UNKNOWN_RESULT; -} - -auto handle_contentMediaType(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Content, - make_set({JSON::Type::String}), Annotation) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Content, - make_set({JSON::Type::String}), Annotation) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::String}), Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::String}), Comment, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::String}), Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::String}), Comment, - "$ref") - return UNKNOWN_RESULT; -} - -auto handle_contentEncoding(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2020_12_Content, - make_set({JSON::Type::String}), Annotation) - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Content, - make_set({JSON::Type::String}), Annotation) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7, - make_set({JSON::Type::String}), Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, - make_set({JSON::Type::String}), Comment, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6, - make_set({JSON::Type::String}), Comment, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, - make_set({JSON::Type::String}), Comment, - "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - Other, "$ref") - if (vocabularies.contains(Known::JSON_Schema_Draft_3) || - vocabularies.contains(Known::JSON_Schema_Draft_4)) { - return UNKNOWN_WITH_REF_RESULT; - } - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, make_set({JSON::Type::String}), - Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::String}), Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, make_set({JSON::Type::String}), - Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::String}), Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, make_set({JSON::Type::String}), - Comment) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::String}), Comment) - return UNKNOWN_RESULT; -} - -auto handle_extends(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, {}, - ApplicatorValueOrElementsInPlace, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - ApplicatorValueOrElementsInPlace, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, {}, - ApplicatorValueOrElementsInPlace) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, - ApplicatorValueOrElementsInPlace) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, {}, - ApplicatorValueOrElementsInPlace) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, - ApplicatorValueOrElementsInPlace) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, {}, - ApplicatorValueOrElementsInPlace) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, - ApplicatorValueOrElementsInPlace) - return UNKNOWN_RESULT; -} - -auto handle_disallow(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3, {}, - ApplicatorElementsInPlaceSomeNegate, - ("$ref")) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - ApplicatorElementsInPlaceSomeNegate, - ("$ref")) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, {}, Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, {}, Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, {}, Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Assertion) - return UNKNOWN_RESULT; -} - -auto handle_divisibleBy(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES( - Known::JSON_Schema_Draft_3_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_maximumCanEqual(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_minimumCanEqual(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::Integer, JSON::Type::Real}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_requires(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, make_set({JSON::Type::Object}), - ApplicatorValueTraverseParent) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::Object}), - ApplicatorValueTraverseParent) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, make_set({JSON::Type::Object}), - ApplicatorValueTraverseParent) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::Object}), - ApplicatorValueTraverseParent) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, make_set({JSON::Type::Object}), - ApplicatorValueTraverseParent) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::Object}), - ApplicatorValueTraverseParent) - return UNKNOWN_RESULT; -} - -auto handle_optional(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2, make_set({JSON::Type::Object}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, - make_set({JSON::Type::Object}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, make_set({JSON::Type::Object}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::Object}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, make_set({JSON::Type::Object}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::Object}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_maxDecimal(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1, make_set({JSON::Type::Real}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, - make_set({JSON::Type::Real}), Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0, make_set({JSON::Type::Real}), - Assertion) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, - make_set({JSON::Type::Real}), Assertion) - return UNKNOWN_RESULT; -} - -auto handle_links(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, - ApplicatorElementsInPlace) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - ApplicatorElementsInPlace, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - ApplicatorElementsInPlace, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - ApplicatorElementsInPlace, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - ApplicatorElementsInPlace, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, - ApplicatorElementsInPlace) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, - ApplicatorElementsInPlace) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, - ApplicatorElementsInPlace) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_base(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, Other) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_7_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Other, "$ref") - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_anchor(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_anchorPointer(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_rel(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_6_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_4_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_3_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_href(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_6_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_4_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_3_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_templatePointers(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_templateRequired(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_targetMediaType(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_targetHints(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_submissionMediaType(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_hrefSchema(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, - ApplicatorValueInPlaceOther) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, - ApplicatorValueInPlaceOther) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_6_Hyper, {}, - ApplicatorValueInPlaceOther) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_targetSchema(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, - ApplicatorValueInPlaceOther) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, - ApplicatorValueInPlaceOther) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_6_Hyper, {}, - ApplicatorValueInPlaceOther) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_4_Hyper, {}, - ApplicatorValueInPlaceOther) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_3_Hyper, {}, - ApplicatorValueInPlaceOther) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, - ApplicatorValueInPlaceOther) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_headerSchema(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, - ApplicatorValueInPlaceOther) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, - ApplicatorValueInPlaceOther) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_submissionSchema(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_2019_09_Hyper_Schema, {}, - ApplicatorValueInPlaceOther) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_7_Hyper, {}, - ApplicatorValueInPlaceOther) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_6_Hyper, {}, - ApplicatorValueInPlaceOther) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_media(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_6_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - Other, "$ref") - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_fragmentResolution(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_root(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_readonly(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_pathStart(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_4_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_mediaType(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_Draft_6_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_4_Hyper, {}, Other) - CHECK_VOCABULARY_WITH_DEPENDENCIES(Known::JSON_Schema_Draft_3_Hyper, {}, - Other, "$ref") - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_alternate(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, - ApplicatorElementsInPlace) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, - ApplicatorElementsInPlace) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, - ApplicatorElementsInPlace) - return UNKNOWN_RESULT; -} - -auto handle_method(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_Draft_4_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_3_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_enctype(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_Draft_3_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_2_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_1_Hyper, {}, Other) - CHECK_VOCABULARY(Known::JSON_Schema_Draft_0_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_encType(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_Draft_4_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_submissionEncType(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_Draft_6_Hyper, {}, Other) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -auto handle_schema_hyper(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::JSON_Schema_Draft_4_Hyper, {}, - ApplicatorValueInPlaceOther) - if (has_draft3_to_7(vocabularies)) { - return UNKNOWN_WITH_REF_RESULT; - } - return UNKNOWN_RESULT; -} - -// OpenAPI 3.1/3.2 Base Vocabulary -// https://spec.openapis.org/oas/v3.1.0.html#fixed-fields-19 -// https://spec.openapis.org/oas/v3.2.0.html#fixed-fields-20 - -auto handle_discriminator(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::OpenAPI_3_2_Base, {}, Other) - CHECK_VOCABULARY(Known::OpenAPI_3_1_Base, {}, Other) - return UNKNOWN_RESULT; -} - -auto handle_xml(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::OpenAPI_3_2_Base, {}, Other) - CHECK_VOCABULARY(Known::OpenAPI_3_1_Base, {}, Other) - return UNKNOWN_RESULT; -} - -auto handle_externalDocs(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::OpenAPI_3_2_Base, {}, Other) - CHECK_VOCABULARY(Known::OpenAPI_3_1_Base, {}, Other) - return UNKNOWN_RESULT; -} - -auto handle_example(const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - CHECK_VOCABULARY(Known::OpenAPI_3_2_Base, {}, Other) - CHECK_VOCABULARY(Known::OpenAPI_3_1_Base, {}, Other) - return UNKNOWN_RESULT; -} - -#undef RETURN_WITH_DEPENDENCIES -#undef RETURN -#undef CHECK_VOCABULARY_WITH_DEPENDENCIES -#undef CHECK_VOCABULARY - -} // anonymous namespace - -auto schema_walker(const std::string_view keyword, - const Vocabularies &vocabularies) - -> const SchemaWalkerResult & { - // TODO: Make use of JSON key's perfect hashes, as we mostly run the walker by - // checking JSON property names - static const std::unordered_map handlers{ - {"$id", handle_dollar_id}, - {"$schema", handle_dollar_schema}, - {"$ref", handle_dollar_ref}, - {"$defs", handle_dollar_defs}, - {"definitions", handle_definitions}, - {"$comment", handle_dollar_comment}, - {"$anchor", handle_dollar_anchor}, - {"$vocabulary", handle_dollar_vocabulary}, - {"$dynamicRef", handle_dollar_dynamicRef}, - {"$dynamicAnchor", handle_dollar_dynamicAnchor}, - {"$recursiveRef", handle_dollar_recursiveRef}, - {"$recursiveAnchor", handle_dollar_recursiveAnchor}, - {"id", handle_id}, - {"oneOf", handle_oneOf}, - {"anyOf", handle_anyOf}, - {"allOf", handle_allOf}, - {"if", handle_if}, - {"then", handle_then}, - {"else", handle_else}, - {"not", handle_not}, - {"properties", handle_properties}, - {"additionalProperties", handle_additionalProperties}, - {"patternProperties", handle_patternProperties}, - {"propertyNames", handle_propertyNames}, - {"dependentSchemas", handle_dependentSchemas}, - {"dependencies", handle_dependencies}, - {"contains", handle_contains}, - {"items", handle_items}, - {"prefixItems", handle_prefixItems}, - {"additionalItems", handle_additionalItems}, - {"unevaluatedProperties", handle_unevaluatedProperties}, - {"unevaluatedItems", handle_unevaluatedItems}, - {"type", handle_type}, - {"enum", handle_enum}, - {"const", handle_const}, - {"multipleOf", handle_multipleOf}, - {"maximum", handle_maximum}, - {"minimum", handle_minimum}, - {"exclusiveMaximum", handle_exclusiveMaximum}, - {"exclusiveMinimum", handle_exclusiveMinimum}, - {"maxLength", handle_maxLength}, - {"minLength", handle_minLength}, - {"pattern", handle_pattern}, - {"maxItems", handle_maxItems}, - {"minItems", handle_minItems}, - {"uniqueItems", handle_uniqueItems}, - {"maxProperties", handle_maxProperties}, - {"minProperties", handle_minProperties}, - {"required", handle_required}, - {"dependentRequired", handle_dependentRequired}, - {"minContains", handle_minContains}, - {"maxContains", handle_maxContains}, - {"title", handle_title}, - {"description", handle_description}, - {"default", handle_default}, - {"deprecated", handle_deprecated}, - {"readOnly", handle_readOnly}, - {"writeOnly", handle_writeOnly}, - {"examples", handle_examples}, - {"format", handle_format}, - {"contentSchema", handle_contentSchema}, - {"contentMediaType", handle_contentMediaType}, - {"contentEncoding", handle_contentEncoding}, - {"extends", handle_extends}, - {"disallow", handle_disallow}, - {"divisibleBy", handle_divisibleBy}, - {"maximumCanEqual", handle_maximumCanEqual}, - {"minimumCanEqual", handle_minimumCanEqual}, - {"requires", handle_requires}, - {"optional", handle_optional}, - {"maxDecimal", handle_maxDecimal}, - {"links", handle_links}, - {"base", handle_base}, - {"anchor", handle_anchor}, - {"anchorPointer", handle_anchorPointer}, - {"rel", handle_rel}, - {"href", handle_href}, - {"templatePointers", handle_templatePointers}, - {"templateRequired", handle_templateRequired}, - {"targetMediaType", handle_targetMediaType}, - {"targetHints", handle_targetHints}, - {"submissionMediaType", handle_submissionMediaType}, - {"hrefSchema", handle_hrefSchema}, - {"targetSchema", handle_targetSchema}, - {"headerSchema", handle_headerSchema}, - {"submissionSchema", handle_submissionSchema}, - {"media", handle_media}, - {"fragmentResolution", handle_fragmentResolution}, - {"root", handle_root}, - {"readonly", handle_readonly}, - {"pathStart", handle_pathStart}, - {"mediaType", handle_mediaType}, - {"alternate", handle_alternate}, - {"method", handle_method}, - {"enctype", handle_enctype}, - {"encType", handle_encType}, - {"submissionEncType", handle_submissionEncType}, - {"schema", handle_schema_hyper}, - // OpenAPI - {"discriminator", handle_discriminator}, - {"xml", handle_xml}, - {"externalDocs", handle_externalDocs}, - {"example", handle_example}, - }; - - const auto iterator = handlers.find(keyword); - if (iterator != handlers.end()) { - return iterator->second(vocabularies); - } - - if (vocabularies.contains(Known::JSON_Schema_Draft_7) || - vocabularies.contains(Known::JSON_Schema_Draft_7_Hyper) || - vocabularies.contains(Known::JSON_Schema_Draft_6) || - vocabularies.contains(Known::JSON_Schema_Draft_6_Hyper) || - vocabularies.contains(Known::JSON_Schema_Draft_4) || - vocabularies.contains(Known::JSON_Schema_Draft_4_Hyper) || - vocabularies.contains(Known::JSON_Schema_Draft_3) || - vocabularies.contains(Known::JSON_Schema_Draft_3_Hyper)) { - return UNKNOWN_WITH_REF_RESULT; - } - - return UNKNOWN_RESULT; -} - -} // namespace sourcemeta::core diff --git a/src/core/jsonschema/vocabularies.cc b/src/core/jsonschema/vocabularies.cc deleted file mode 100644 index bd3ba45cc..000000000 --- a/src/core/jsonschema/vocabularies.cc +++ /dev/null @@ -1,325 +0,0 @@ -#include - -#include - -#include // assert -#include // std::optional -#include // std::ostringstream -#include // std::string -#include // std::pair, std::to_underlying -#include // std::vector - -// X-macro defining all known vocabulary mappings (enum, URI) -// Ordered from most recent/common to oldest for faster short-circuiting -#define SOURCEMETA_VOCABULARIES_X(X) \ - /* 2020-12 vocabularies (most recent/common) */ \ - X(JSON_Schema_2020_12_Core, \ - "https://json-schema.org/draft/2020-12/vocab/core") \ - X(JSON_Schema_2020_12_Applicator, \ - "https://json-schema.org/draft/2020-12/vocab/applicator") \ - X(JSON_Schema_2020_12_Unevaluated, \ - "https://json-schema.org/draft/2020-12/vocab/unevaluated") \ - X(JSON_Schema_2020_12_Validation, \ - "https://json-schema.org/draft/2020-12/vocab/validation") \ - X(JSON_Schema_2020_12_Meta_Data, \ - "https://json-schema.org/draft/2020-12/vocab/meta-data") \ - X(JSON_Schema_2020_12_Format_Annotation, \ - "https://json-schema.org/draft/2020-12/vocab/format-annotation") \ - X(JSON_Schema_2020_12_Format_Assertion, \ - "https://json-schema.org/draft/2020-12/vocab/format-assertion") \ - X(JSON_Schema_2020_12_Content, \ - "https://json-schema.org/draft/2020-12/vocab/content") \ - /* 2019-09 vocabularies */ \ - X(JSON_Schema_2019_09_Core, \ - "https://json-schema.org/draft/2019-09/vocab/core") \ - X(JSON_Schema_2019_09_Applicator, \ - "https://json-schema.org/draft/2019-09/vocab/applicator") \ - X(JSON_Schema_2019_09_Validation, \ - "https://json-schema.org/draft/2019-09/vocab/validation") \ - X(JSON_Schema_2019_09_Meta_Data, \ - "https://json-schema.org/draft/2019-09/vocab/meta-data") \ - X(JSON_Schema_2019_09_Format, \ - "https://json-schema.org/draft/2019-09/vocab/format") \ - X(JSON_Schema_2019_09_Content, \ - "https://json-schema.org/draft/2019-09/vocab/content") \ - X(JSON_Schema_2019_09_Hyper_Schema, \ - "https://json-schema.org/draft/2019-09/vocab/hyper-schema") \ - /* Pre-vocabulary dialects (least common, checked last) */ \ - X(JSON_Schema_Draft_7, "http://json-schema.org/draft-07/schema#") \ - X(JSON_Schema_Draft_7_Hyper, \ - "http://json-schema.org/draft-07/hyper-schema#") \ - X(JSON_Schema_Draft_6, "http://json-schema.org/draft-06/schema#") \ - X(JSON_Schema_Draft_6_Hyper, \ - "http://json-schema.org/draft-06/hyper-schema#") \ - X(JSON_Schema_Draft_4, "http://json-schema.org/draft-04/schema#") \ - X(JSON_Schema_Draft_4_Hyper, \ - "http://json-schema.org/draft-04/hyper-schema#") \ - X(JSON_Schema_Draft_3, "http://json-schema.org/draft-03/schema#") \ - X(JSON_Schema_Draft_3_Hyper, \ - "http://json-schema.org/draft-03/hyper-schema#") \ - X(JSON_Schema_Draft_2, "http://json-schema.org/draft-02/schema#") \ - X(JSON_Schema_Draft_2_Hyper, \ - "http://json-schema.org/draft-02/hyper-schema#") \ - X(JSON_Schema_Draft_1, "http://json-schema.org/draft-01/schema#") \ - X(JSON_Schema_Draft_1_Hyper, \ - "http://json-schema.org/draft-01/hyper-schema#") \ - X(JSON_Schema_Draft_0, "http://json-schema.org/draft-00/schema#") \ - X(JSON_Schema_Draft_0_Hyper, \ - "http://json-schema.org/draft-00/hyper-schema#") \ - /* OpenAPI vocabularies */ \ - X(OpenAPI_3_1_Base, "https://spec.openapis.org/oas/3.1/vocab/base") \ - X(OpenAPI_3_2_Base, "https://spec.openapis.org/oas/3.2/vocab/base") - -namespace { -auto uri_to_known_vocabulary(const std::string_view uri) - -> std::optional { - using sourcemeta::core::Vocabularies; - -// NOLINTNEXTLINE(bugprone-macro-parentheses) -#define X_URI_TO_ENUM(enumerator, uri_string) \ - if (uri == (uri_string)) { \ - return Vocabularies::Known::enumerator; \ - } - - SOURCEMETA_VOCABULARIES_X(X_URI_TO_ENUM) - -#undef X_URI_TO_ENUM - - return std::nullopt; -} -} // anonymous namespace - -sourcemeta::core::Vocabularies::Vocabularies( - std::initializer_list> init) { - for (const auto &entry : init) { - this->insert(entry.first, entry.second); - } -} - -sourcemeta::core::Vocabularies::Vocabularies( - std::initializer_list> init) { - for (const auto &entry : init) { - this->insert(entry.first, entry.second); - } -} - -auto sourcemeta::core::Vocabularies::contains( - const JSON::String &uri) const noexcept -> bool { - if (this->unknown.has_value()) { - if (this->unknown->contains(uri)) { - return true; - } - } - - const auto maybe_known{uri_to_known_vocabulary(uri)}; - // As a debug build check: Going through this branch is slow. If it is a - // known vocabulary, the consumer should be making use of the enum overload - // of this method - assert(!maybe_known.has_value()); - if (maybe_known.has_value()) { - return this->contains(maybe_known.value()); - } - - return false; -} - -auto sourcemeta::core::Vocabularies::contains(Known vocabulary) const noexcept - -> bool { - const auto index = std::to_underlying(vocabulary); - // Use [] operator instead of test() to avoid exceptions in noexcept function - return this->required_known[index] || this->optional_known[index]; -} - -auto sourcemeta::core::Vocabularies::contains_any( - std::initializer_list vocabularies) const noexcept -> bool { - for (const auto &vocabulary : vocabularies) { - if (this->contains(vocabulary)) { - return true; - } - } - - return false; -} - -auto sourcemeta::core::Vocabularies::insert(const JSON::String &uri, - bool required) noexcept -> void { - // We NEED to allow official vocabulary string URIs here, as that's how - // we construct the optimised version! - const auto maybe_known = uri_to_known_vocabulary(uri); - if (maybe_known.has_value()) { - this->insert(maybe_known.value(), required); - } else { - if (!this->unknown.has_value()) { - this->unknown.emplace(); - } - this->unknown->insert({uri, required}); - } -} - -auto sourcemeta::core::Vocabularies::insert(Known vocabulary, - bool required) noexcept -> void { - const auto index = std::to_underlying(vocabulary); - if (required) { - this->required_known[index] = true; - this->optional_known[index] = false; - } else { - this->optional_known[index] = true; - this->required_known[index] = false; - } - // Verify invariant: vocabulary cannot be both required and optional - assert((this->required_known & this->optional_known).none()); -} - -auto sourcemeta::core::Vocabularies::get(const JSON::String &uri) const noexcept - -> std::optional { - if (this->unknown.has_value()) { - const auto iterator{this->unknown->find(uri)}; - if (iterator != this->unknown->end()) { - return iterator->second; - } - } - - const auto maybe_known{uri_to_known_vocabulary(uri)}; - // As a debug build check: Going through this branch is slow. If it is a - // known vocabulary, the consumer should be making use of the enum overload - // of this method - assert(!maybe_known.has_value()); - if (maybe_known.has_value()) { - return this->get(maybe_known.value()); - } - - return std::nullopt; -} - -auto sourcemeta::core::Vocabularies::get(Known vocabulary) const noexcept - -> std::optional { - const auto index = std::to_underlying(vocabulary); - // Use [] operator instead of test() to avoid exceptions in noexcept function - assert(!this->required_known[index] || !this->optional_known[index]); - if (this->required_known[index]) { - return true; - } - if (this->optional_known[index]) { - return false; - } - return std::nullopt; -} - -auto sourcemeta::core::Vocabularies::size() const noexcept -> std::size_t { - return (this->required_known | this->optional_known).count() + - (this->unknown.has_value() ? this->unknown->size() : 0); -} - -auto sourcemeta::core::Vocabularies::empty() const noexcept -> bool { - return this->required_known.none() && this->optional_known.none() && - !this->has_unknown(); -} - -auto sourcemeta::core::Vocabularies::has_unknown() const noexcept -> bool { - return this->unknown.has_value() && !this->unknown.value().empty(); -} - -auto sourcemeta::core::operator<<(std::ostream &stream, - Vocabularies::Known vocabulary) - -> std::ostream & { - switch (vocabulary) { -// NOLINTNEXTLINE(bugprone-macro-parentheses) -#define X_ENUM_TO_URI(enumerator, uri_string) \ - case Vocabularies::Known::enumerator: \ - return stream << (uri_string); - - SOURCEMETA_VOCABULARIES_X(X_ENUM_TO_URI) - -#undef X_ENUM_TO_URI - } - - assert(false); - return stream; -} - -auto sourcemeta::core::to_string(Vocabularies::Known vocabulary) - -> std::string_view { - switch (vocabulary) { -// NOLINTNEXTLINE(bugprone-macro-parentheses) -#define X_ENUM_TO_URI(enumerator, uri_string) \ - case Vocabularies::Known::enumerator: \ - return (uri_string); - - SOURCEMETA_VOCABULARIES_X(X_ENUM_TO_URI) - -#undef X_ENUM_TO_URI - } - - assert(false); - return {}; -} - -auto sourcemeta::core::to_string(const Vocabularies::URI &vocabulary) - -> std::string_view { - const auto *known{std::get_if(&vocabulary)}; - if (known) { - return to_string(*known); - } else { - return *std::get_if(&vocabulary); - } -} - -auto sourcemeta::core::operator<<(std::ostream &stream, - const Vocabularies::URI &vocabulary) - -> std::ostream & { - return stream << to_string(vocabulary); -} - -auto sourcemeta::core::Vocabularies::throw_if_any_unsupported( - const std::unordered_set &supported, const char *message) const - -> void { - for (std::size_t index = 0; index < KNOWN_VOCABULARY_COUNT; ++index) { - if (!this->required_known[index]) { - continue; - } - - const auto vocabulary{static_cast(index)}; - if (supported.contains(vocabulary)) { - continue; - } - - // Slow fallback: convert to string URI and check if it was passed as string - std::ostringstream stream; - stream << vocabulary; - const auto &uri{stream.str()}; - - if (supported.contains(uri)) { - // As a debug build check: Going through this branch is slow. If it is a - // known vocabulary, the consumer should be passing it as an enum class - assert(false); - continue; - } - - throw SchemaVocabularyError(uri, message); - } - - if (this->unknown.has_value()) { - for (const auto &[uri, required] : *this->unknown) { - if (!required || supported.contains(uri)) { - continue; - } - - // This case should never be possible, as an invariant of this class. - // i.e. we should never have an official vocabulary in the unknown map - assert(!uri_to_known_vocabulary(uri).has_value()); - - throw SchemaVocabularyError(uri, message); - } - } -} - -auto sourcemeta::core::Vocabularies::throw_if_any_unknown_required( - const char *message) const -> void { - if (this->unknown.has_value()) { - for (const auto &[uri, required] : this->unknown.value()) { - if (required) { - throw SchemaVocabularyError(uri, message); - } - } - } -} diff --git a/src/core/jsonschema/walker.cc b/src/core/jsonschema/walker.cc deleted file mode 100644 index 173f0ffcb..000000000 --- a/src/core/jsonschema/walker.cc +++ /dev/null @@ -1,519 +0,0 @@ -#include - -#include "helpers.h" - -#include // std::max, std::sort -#include // assert - -namespace { -enum class SchemaWalkerType_t : std::uint8_t { Deep, Flat }; - -struct DialectInfo { - std::string_view dialect; - sourcemeta::core::SchemaBaseDialect base_dialect; - bool override_active; -}; - -auto resolve_dialect_at( - const sourcemeta::core::JSON &subschema, - const std::string_view inherited_dialect, - const sourcemeta::core::SchemaBaseDialect inherited_base, - const sourcemeta::core::SchemaResolver &resolver, const std::size_t level, - const bool allow_dialect_override) -> DialectInfo { - auto local{sourcemeta::core::dialect(subschema, inherited_dialect, - allow_dialect_override)}; - const auto override_active{ - local != sourcemeta::core::dialect(subschema, inherited_dialect, false)}; - auto id{sourcemeta::core::identify(subschema, resolver, local, "", - allow_dialect_override)}; - if (id.empty() && local != inherited_dialect && !override_active) { - id = sourcemeta::core::identify(subschema, inherited_base); - if (!id.empty()) { - local = inherited_dialect; - } - } - if (!override_active && level > 0 && id.empty()) { - return {.dialect = inherited_dialect, - .base_dialect = inherited_base, - .override_active = false}; - } - const auto resolved_base{ - local != inherited_dialect - ? sourcemeta::core::base_dialect(subschema, resolver, local, - allow_dialect_override) - .value_or(inherited_base) - : inherited_base}; - return {.dialect = local, - .base_dialect = resolved_base, - .override_active = override_active}; -} - -auto walk(const std::optional &parent, - const sourcemeta::core::WeakPointer &pointer, - std::vector &subschemas, - const sourcemeta::core::JSON &subschema, - const sourcemeta::core::SchemaWalker &walker, - const sourcemeta::core::SchemaResolver &resolver, - const std::string_view dialect, - const sourcemeta::core::SchemaBaseDialect base_dialect, - const SchemaWalkerType_t type, const std::size_t level, - const bool orphan, const bool property_name) -> void { - if (!is_schema(subschema)) { - return; - } - - // Recalculate the dialect and its vocabularies at every step. - // This is needed for correctly traversing through schemas that - // contains pointers that use different dialect/vocabularies. - // This is often the case for bundled schemas. - - // However, we need to be careful with not considering `$schema` on subschemas - // that do not represent schema resources, as this is not allowed in JSON - // Schema. See - // https://json-schema.org/draft/2019-09/draft-handrews-json-schema-02#rfc.section.8.1.1 - // To play it safe, in those cases, we will continue with the current dialect - // / base dialect and ignore the invalid standalone `$schema`. The caller has - // enough information to detect those cases and throw an error if they desire - // to be more strict. - - const auto enclosing_ref_overrides{ - subschema.is_object() && subschema.defines("$ref") && - sourcemeta::core::ref_overrides_adjacent_keywords(base_dialect)}; - - const auto entry{resolve_dialect_at(subschema, dialect, base_dialect, - resolver, level, - !enclosing_ref_overrides)}; - const auto current_dialect{entry.dialect}; - const auto current_base_dialect{entry.base_dialect}; - - const auto vocabularies{sourcemeta::core::vocabularies( - resolver, current_base_dialect, current_dialect)}; - - if (type == SchemaWalkerType_t::Deep || level > 0) { - sourcemeta::core::SchemaIteratorEntry iterator_entry{ - .parent = parent, - .pointer = pointer, - .dialect = current_dialect, - .vocabularies = vocabularies, - .base_dialect = current_base_dialect, - .subschema = subschema, - .orphan = orphan, - .property_name = property_name}; - subschemas.push_back(std::move(iterator_entry)); - } - - // We can't recurse any further - if (!subschema.is_object() || - (type == SchemaWalkerType_t::Flat && level > 0)) { - return; - } - - const auto child{entry.override_active - ? resolve_dialect_at(subschema, dialect, base_dialect, - resolver, level, false) - : entry}; - const auto child_dialect{child.dialect}; - const auto child_base_dialect{child.base_dialect}; - - const auto has_overriding_ref{ - subschema.defines("$ref") && - sourcemeta::core::ref_overrides_adjacent_keywords(current_base_dialect)}; - for (auto &pair : subschema.as_object()) { - const auto &keyword_info{walker(pair.first, vocabularies)}; - - // Ignore the current keyword sibling to `$ref in Draft 7 and older in EVERY - // case. Note that we purposely DO NOT try to add workarounds for the - // top-level, `$schema`, or anything else to be purely compliant and avoid - // lots of gray areas here - if (has_overriding_ref && - keyword_info.type != sourcemeta::core::SchemaKeywordType::Reference) { - continue; - } - - switch (keyword_info.type) { - case sourcemeta::core::SchemaKeywordType:: - ApplicatorValueTraverseSomeProperty: { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - walk(pointer, new_pointer, subschemas, pair.second, walker, resolver, - child_dialect, child_base_dialect, type, level + 1, orphan, false); - } break; - - case sourcemeta::core::SchemaKeywordType:: - ApplicatorValueTraverseAnyPropertyKey: { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - walk(pointer, new_pointer, subschemas, pair.second, walker, resolver, - child_dialect, child_base_dialect, type, level + 1, orphan, true); - } break; - - case sourcemeta::core::SchemaKeywordType:: - ApplicatorValueTraverseAnyItem: { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - walk(pointer, new_pointer, subschemas, pair.second, walker, resolver, - child_dialect, child_base_dialect, type, level + 1, orphan, false); - } break; - - case sourcemeta::core::SchemaKeywordType:: - ApplicatorValueTraverseSomeItem: { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - walk(pointer, new_pointer, subschemas, pair.second, walker, resolver, - child_dialect, child_base_dialect, type, level + 1, orphan, false); - } break; - - case sourcemeta::core::SchemaKeywordType::ApplicatorValueTraverseParent: { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - walk(pointer, new_pointer, subschemas, pair.second, walker, resolver, - child_dialect, child_base_dialect, type, level + 1, orphan, false); - } break; - - case sourcemeta::core::SchemaKeywordType::ApplicatorValueInPlaceOther: { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - walk(pointer, new_pointer, subschemas, pair.second, walker, resolver, - child_dialect, child_base_dialect, type, level + 1, orphan, - property_name); - } break; - - case sourcemeta::core::SchemaKeywordType::ApplicatorValueInPlaceNegate: { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - walk(pointer, new_pointer, subschemas, pair.second, walker, resolver, - child_dialect, child_base_dialect, type, level + 1, orphan, - property_name); - } break; - - case sourcemeta::core::SchemaKeywordType::ApplicatorValueInPlaceMaybe: { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - walk(pointer, new_pointer, subschemas, pair.second, walker, resolver, - child_dialect, child_base_dialect, type, level + 1, orphan, - property_name); - } break; - - case sourcemeta::core::SchemaKeywordType::ApplicatorElementsTraverseItem: - if (pair.second.is_array()) { - for (std::size_t index = 0; index < pair.second.size(); index++) { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - new_pointer.emplace_back(index); - walk(pointer, new_pointer, subschemas, pair.second.at(index), - walker, resolver, child_dialect, child_base_dialect, type, - level + 1, orphan, false); - } - } - - break; - - case sourcemeta::core::SchemaKeywordType::ApplicatorElementsInPlace: - if (pair.second.is_array()) { - for (std::size_t index = 0; index < pair.second.size(); index++) { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - new_pointer.emplace_back(index); - walk(pointer, new_pointer, subschemas, pair.second.at(index), - walker, resolver, child_dialect, child_base_dialect, type, - level + 1, orphan, property_name); - } - } - - break; - - case sourcemeta::core::SchemaKeywordType::ApplicatorElementsInPlaceSome: - if (pair.second.is_array()) { - for (std::size_t index = 0; index < pair.second.size(); index++) { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - new_pointer.emplace_back(index); - walk(pointer, new_pointer, subschemas, pair.second.at(index), - walker, resolver, child_dialect, child_base_dialect, type, - level + 1, orphan, property_name); - } - } - - break; - - case sourcemeta::core::SchemaKeywordType:: - ApplicatorElementsInPlaceSomeNegate: - if (pair.second.is_array()) { - for (std::size_t index = 0; index < pair.second.size(); index++) { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - new_pointer.emplace_back(index); - walk(pointer, new_pointer, subschemas, pair.second.at(index), - walker, resolver, child_dialect, child_base_dialect, type, - level + 1, orphan, property_name); - } - } - - break; - - case sourcemeta::core::SchemaKeywordType:: - ApplicatorMembersTraversePropertyStatic: - if (pair.second.is_object()) { - for (auto &subpair : pair.second.as_object()) { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - new_pointer.push_back(std::cref(subpair.first)); - walk(pointer, new_pointer, subschemas, subpair.second, walker, - resolver, child_dialect, child_base_dialect, type, level + 1, - orphan, false); - } - } - - break; - - case sourcemeta::core::SchemaKeywordType:: - ApplicatorMembersTraversePropertyRegex: - if (pair.second.is_object()) { - for (auto &subpair : pair.second.as_object()) { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - new_pointer.push_back(std::cref(subpair.first)); - walk(pointer, new_pointer, subschemas, subpair.second, walker, - resolver, child_dialect, child_base_dialect, type, level + 1, - orphan, false); - } - } - - break; - - case sourcemeta::core::SchemaKeywordType::ApplicatorMembersInPlaceSome: - if (pair.second.is_object()) { - for (auto &subpair : pair.second.as_object()) { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - new_pointer.push_back(std::cref(subpair.first)); - walk(pointer, new_pointer, subschemas, subpair.second, walker, - resolver, child_dialect, child_base_dialect, type, level + 1, - orphan, property_name); - } - } - - break; - - case sourcemeta::core::SchemaKeywordType::LocationMembers: - if (pair.second.is_object()) { - for (auto &subpair : pair.second.as_object()) { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - new_pointer.push_back(std::cref(subpair.first)); - walk(pointer, new_pointer, subschemas, subpair.second, walker, - resolver, child_dialect, child_base_dialect, type, level + 1, - true, false); - } - } - - break; - - case sourcemeta::core::SchemaKeywordType:: - ApplicatorValueOrElementsTraverseAnyItemOrItem: - if (pair.second.is_array()) { - for (std::size_t index = 0; index < pair.second.size(); index++) { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - new_pointer.emplace_back(index); - walk(pointer, new_pointer, subschemas, pair.second.at(index), - walker, resolver, child_dialect, child_base_dialect, type, - level + 1, orphan, false); - } - } else { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - walk(pointer, new_pointer, subschemas, pair.second, walker, resolver, - child_dialect, child_base_dialect, type, level + 1, orphan, - false); - } - - break; - - case sourcemeta::core::SchemaKeywordType:: - ApplicatorValueOrElementsInPlace: - if (pair.second.is_array()) { - for (std::size_t index = 0; index < pair.second.size(); index++) { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - new_pointer.emplace_back(index); - walk(pointer, new_pointer, subschemas, pair.second.at(index), - walker, resolver, child_dialect, child_base_dialect, type, - level + 1, orphan, property_name); - } - } else { - sourcemeta::core::WeakPointer new_pointer{pointer}; - new_pointer.push_back(std::cref(pair.first)); - walk(pointer, new_pointer, subschemas, pair.second, walker, resolver, - child_dialect, child_base_dialect, type, level + 1, orphan, - property_name); - } - - break; - case sourcemeta::core::SchemaKeywordType::Assertion: - case sourcemeta::core::SchemaKeywordType::Annotation: - case sourcemeta::core::SchemaKeywordType::Reference: - case sourcemeta::core::SchemaKeywordType::Other: - case sourcemeta::core::SchemaKeywordType::Comment: - case sourcemeta::core::SchemaKeywordType::Unknown: - break; - } - } -} -} // namespace - -// TODO: These iterators are not very efficient. They traverse once on -// construction and then the client traverses again. - -sourcemeta::core::SchemaIterator::SchemaIterator( - const sourcemeta::core::JSON &schema, - const sourcemeta::core::SchemaWalker &walker, - const sourcemeta::core::SchemaResolver &resolver, - std::string_view default_dialect) { - const std::string_view resolved_dialect{ - sourcemeta::core::dialect(schema, default_dialect)}; - - sourcemeta::core::WeakPointer pointer; - // If the given schema declares no dialect and the user didn't - // not pass a default, then there is nothing we can do. We know - // the current schema is a subschema, but cannot walk any further. - if (resolved_dialect.empty()) { - sourcemeta::core::SchemaIteratorEntry entry{.parent = std::nullopt, - .pointer = pointer, - .dialect = "", - .vocabularies = {}, - .base_dialect = std::nullopt, - .subschema = schema, - .orphan = false, - .property_name = false}; - this->subschemas.push_back(std::move(entry)); - } else { - const auto resolved_base_dialect{ - sourcemeta::core::base_dialect(schema, resolver, resolved_dialect)}; - assert(resolved_base_dialect.has_value()); - walk(std::nullopt, pointer, this->subschemas, schema, walker, resolver, - resolved_dialect, resolved_base_dialect.value(), - SchemaWalkerType_t::Deep, 0, false, false); - } -} - -sourcemeta::core::SchemaIteratorFlat::SchemaIteratorFlat( - const sourcemeta::core::JSON &schema, - const sourcemeta::core::SchemaWalker &walker, - const sourcemeta::core::SchemaResolver &resolver, - const std::string_view default_dialect) { - const std::string_view resolved_dialect{ - sourcemeta::core::dialect(schema, default_dialect)}; - if (!resolved_dialect.empty()) { - sourcemeta::core::WeakPointer pointer; - const auto resolved_base_dialect{ - sourcemeta::core::base_dialect(schema, resolver, resolved_dialect)}; - assert(resolved_base_dialect.has_value()); - walk(std::nullopt, pointer, this->subschemas, schema, walker, resolver, - resolved_dialect, resolved_base_dialect.value(), - SchemaWalkerType_t::Flat, 0, false, false); - } -} - -sourcemeta::core::SchemaKeywordIterator::SchemaKeywordIterator( - const sourcemeta::core::JSON &schema, - const sourcemeta::core::SchemaWalker &walker, - const sourcemeta::core::SchemaResolver &resolver, - const std::string_view default_dialect) { - assert(is_schema(schema)); - if (schema.is_boolean()) { - return; - } - - const std::string_view resolved_dialect{ - sourcemeta::core::dialect(schema, default_dialect)}; - const auto maybe_base_dialect{ - sourcemeta::core::base_dialect(schema, resolver, resolved_dialect)}; - - Vocabularies vocabularies{ - maybe_base_dialect.has_value() && !resolved_dialect.empty() - ? sourcemeta::core::vocabularies(resolver, maybe_base_dialect.value(), - resolved_dialect) - : Vocabularies{}}; - - // TODO: Use std::ranges::to() once libc++ supports it - // (__cpp_lib_ranges_to_container) - for (const auto &entry : schema.as_object()) { - sourcemeta::core::WeakPointer entry_pointer; - entry_pointer.push_back(std::cref(entry.first)); - sourcemeta::core::SchemaIteratorEntry subschema_entry{ - .parent = std::nullopt, - .pointer = std::move(entry_pointer), - .dialect = resolved_dialect, - .vocabularies = vocabularies, - .base_dialect = maybe_base_dialect, - .subschema = entry.second, - .orphan = false, - .property_name = false}; - this->entries.push_back(std::move(subschema_entry)); - } - - // Sort keywords based on priority for correct evaluation - std::ranges::sort( - this->entries, - [&vocabularies, &walker](const auto &left, const auto &right) -> bool { - // These cannot be empty or indexes, as we created - // the entries array from a JSON object - assert(!left.pointer.empty() && left.pointer.back().is_property()); - assert(!right.pointer.empty() && right.pointer.back().is_property()); - - const auto left_priority = schema_keyword_priority( - left.pointer.back().to_property(), vocabularies, walker); - const auto right_priority = schema_keyword_priority( - right.pointer.back().to_property(), vocabularies, walker); - - // Sort first on priority, second on actual keywords. The latter is to - // make sure different compilers with different STL implementations end - // up at the exact same result. Not really mandatory, but useful for - // writing tests on the iterator output. - if (left_priority != right_priority) { - return left_priority < right_priority; - } else { - return left.pointer < right.pointer; - } - }); -} - -auto sourcemeta::core::SchemaIterator::begin() const -> const_iterator { - return this->subschemas.begin(); -} -auto sourcemeta::core::SchemaIterator::end() const -> const_iterator { - return this->subschemas.end(); -} -auto sourcemeta::core::SchemaIterator::cbegin() const -> const_iterator { - return this->subschemas.cbegin(); -} -auto sourcemeta::core::SchemaIterator::cend() const -> const_iterator { - return this->subschemas.cend(); -} - -auto sourcemeta::core::SchemaIteratorFlat::begin() const -> const_iterator { - return this->subschemas.begin(); -} -auto sourcemeta::core::SchemaIteratorFlat::end() const -> const_iterator { - return this->subschemas.end(); -} -auto sourcemeta::core::SchemaIteratorFlat::cbegin() const -> const_iterator { - return this->subschemas.cbegin(); -} -auto sourcemeta::core::SchemaIteratorFlat::cend() const -> const_iterator { - return this->subschemas.cend(); -} - -auto sourcemeta::core::SchemaKeywordIterator::begin() const -> const_iterator { - return this->entries.begin(); -} -auto sourcemeta::core::SchemaKeywordIterator::end() const -> const_iterator { - return this->entries.end(); -} -auto sourcemeta::core::SchemaKeywordIterator::cbegin() const -> const_iterator { - return this->entries.cbegin(); -} -auto sourcemeta::core::SchemaKeywordIterator::cend() const -> const_iterator { - return this->entries.cend(); -} diff --git a/test/jsonschema/CMakeLists.txt b/test/jsonschema/CMakeLists.txt deleted file mode 100644 index b8c255861..000000000 --- a/test/jsonschema/CMakeLists.txt +++ /dev/null @@ -1,109 +0,0 @@ -sourcemeta_googletest(NAMESPACE sourcemeta PROJECT core NAME jsonschema - SOURCES - jsonschema_test_utils.h - jsonschema_identify_2020_12_test.cc - jsonschema_identify_2019_09_test.cc - jsonschema_identify_draft7_test.cc - jsonschema_identify_draft6_test.cc - jsonschema_identify_draft4_test.cc - jsonschema_identify_draft3_test.cc - jsonschema_identify_draft2_test.cc - jsonschema_identify_draft1_test.cc - jsonschema_identify_draft0_test.cc - jsonschema_identify_test.cc - jsonschema_is_schema_test.cc - jsonschema_is_empty_schema_test.cc - jsonschema_frame_2020_12_test.cc - jsonschema_frame_2019_09_test.cc - jsonschema_frame_draft7_test.cc - jsonschema_frame_draft6_test.cc - jsonschema_frame_draft4_test.cc - jsonschema_frame_draft3_test.cc - jsonschema_frame_draft2_test.cc - jsonschema_frame_draft1_test.cc - jsonschema_frame_draft0_test.cc - jsonschema_frame_test.cc - jsonschema_bundle_2020_12_test.cc - jsonschema_bundle_2019_09_test.cc - jsonschema_bundle_draft7_test.cc - jsonschema_bundle_draft6_test.cc - jsonschema_bundle_draft4_test.cc - jsonschema_bundle_draft3_test.cc - jsonschema_bundle_draft2_test.cc - jsonschema_bundle_draft1_test.cc - jsonschema_bundle_draft0_test.cc - jsonschema_bundle_test.cc - jsonschema_dependencies_test.cc - jsonschema_metaschema_test.cc - jsonschema_dialect_test.cc - jsonschema_dialect_2020_12_test.cc - jsonschema_dialect_2019_09_test.cc - jsonschema_dialect_draft7_test.cc - jsonschema_dialect_draft6_test.cc - jsonschema_dialect_draft4_test.cc - jsonschema_dialect_draft3_test.cc - jsonschema_dialect_draft2_test.cc - jsonschema_dialect_draft1_test.cc - jsonschema_dialect_draft0_test.cc - jsonschema_base_dialect_test.cc - jsonschema_base_dialect_2020_12_test.cc - jsonschema_base_dialect_2019_09_test.cc - jsonschema_base_dialect_draft7_test.cc - jsonschema_base_dialect_draft6_test.cc - jsonschema_base_dialect_draft4_test.cc - jsonschema_base_dialect_draft3_test.cc - jsonschema_base_dialect_draft2_test.cc - jsonschema_base_dialect_draft1_test.cc - jsonschema_base_dialect_draft0_test.cc - jsonschema_vocabulary_2020_12_test.cc - jsonschema_vocabulary_2019_09_test.cc - jsonschema_vocabulary_draft7_test.cc - jsonschema_vocabulary_draft6_test.cc - jsonschema_vocabulary_draft4_test.cc - jsonschema_vocabulary_draft3_test.cc - jsonschema_vocabulary_draft2_test.cc - jsonschema_vocabulary_draft1_test.cc - jsonschema_vocabulary_draft0_test.cc - jsonschema_vocabulary_test.cc - jsonschema_walker_2020_12_test.cc - jsonschema_walker_2019_09_test.cc - jsonschema_walker_draft7_test.cc - jsonschema_walker_draft6_test.cc - jsonschema_walker_draft4_test.cc - jsonschema_walker_draft3_test.cc - jsonschema_walker_draft2_test.cc - jsonschema_walker_draft1_test.cc - jsonschema_walker_draft0_test.cc - jsonschema_walker_openapi_test.cc - jsonschema_walker_test.cc - jsonschema_error_test.cc - jsonschema_keyword_iterator_test.cc - jsonschema_resolver_test.cc - jsonschema_parse_type_test.cc - jsonschema_format_test.cc - jsonschema_wrap_test.cc - jsonschema_json_auto_test.cc) - -target_link_libraries(sourcemeta_core_jsonschema_unit - PRIVATE sourcemeta::core::json) -target_link_libraries(sourcemeta_core_jsonschema_unit - PRIVATE sourcemeta::core::jsonpointer) -target_link_libraries(sourcemeta_core_jsonschema_unit - PRIVATE sourcemeta::core::jsonschema) -target_link_libraries(sourcemeta_core_jsonschema_unit - PRIVATE sourcemeta::core::uri) - -if(MSVC) - target_compile_options(sourcemeta_core_jsonschema_unit PRIVATE /bigobj) -endif() - -# JSON Schema Referencing Suite -# See https://github.com/python-jsonschema/referencing-suite -sourcemeta_googletest(NAMESPACE sourcemeta PROJECT core NAME jsonschema_referencing_suite - SOURCES referencingsuite.cc) -target_compile_definitions(sourcemeta_core_jsonschema_referencing_suite_unit - PRIVATE REFERENCING_SUITE_PATH="${PROJECT_SOURCE_DIR}/vendor/referencing-suite/tests") -target_link_libraries(sourcemeta_core_jsonschema_referencing_suite_unit PRIVATE sourcemeta::core::uri) -target_link_libraries(sourcemeta_core_jsonschema_referencing_suite_unit PRIVATE sourcemeta::core::json) -target_link_libraries(sourcemeta_core_jsonschema_referencing_suite_unit PRIVATE sourcemeta::core::jsonschema) -target_link_libraries(sourcemeta_core_jsonschema_referencing_suite_unit PRIVATE sourcemeta::core::jsonpointer) diff --git a/test/jsonschema/jsonschema_base_dialect_2019_09_test.cc b/test/jsonschema/jsonschema_base_dialect_2019_09_test.cc deleted file mode 100644 index 1eb1b5355..000000000 --- a/test/jsonschema/jsonschema_base_dialect_2019_09_test.cc +++ /dev/null @@ -1,138 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_base_dialect_2019_09, jsonschema_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); -} - -TEST(JSONSchema_base_dialect_2019_09, jsonschema_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/hyper-schema", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09_Hyper); -} - -TEST(JSONSchema_base_dialect_2019_09, jsonschema_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/links" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); -} - -TEST(JSONSchema_base_dialect_2019_09, jsonschema_output) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/output/schema" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); -} - -TEST(JSONSchema_base_dialect_2019_09, jsonschema_output_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/output/hyper-schema" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); -} - -TEST(JSONSchema_base_dialect_2019_09, jsonschema_meta_applicator) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/applicator" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); -} - -TEST(JSONSchema_base_dialect_2019_09, jsonschema_meta_content) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/content" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); -} - -TEST(JSONSchema_base_dialect_2019_09, jsonschema_meta_core) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/core" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); -} - -TEST(JSONSchema_base_dialect_2019_09, jsonschema_meta_format) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/format" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); -} - -TEST(JSONSchema_base_dialect_2019_09, jsonschema_meta_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/hyper-schema" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09_Hyper); -} - -TEST(JSONSchema_base_dialect_2019_09, jsonschema_meta_meta_data) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/meta-data" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); -} - -TEST(JSONSchema_base_dialect_2019_09, jsonschema_meta_validation) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/validation" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); -} diff --git a/test/jsonschema/jsonschema_base_dialect_2020_12_test.cc b/test/jsonschema/jsonschema_base_dialect_2020_12_test.cc deleted file mode 100644 index d0b0356e2..000000000 --- a/test/jsonschema/jsonschema_base_dialect_2020_12_test.cc +++ /dev/null @@ -1,149 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_base_dialect_2020_12, jsonschema_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect_2020_12, jsonschema_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/hyper-schema", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12_Hyper); -} - -TEST(JSONSchema_base_dialect_2020_12, jsonschema_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/links" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect_2020_12, jsonschema_output) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/output/schema" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect_2020_12, jsonschema_meta_applicator) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/applicator" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect_2020_12, jsonschema_meta_content) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/content" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect_2020_12, jsonschema_meta_core) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/core" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect_2020_12, jsonschema_meta_format_annotation) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/format-annotation" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect_2020_12, jsonschema_meta_format_assertion) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/format-assertion" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect_2020_12, jsonschema_meta_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/hyper-schema" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12_Hyper); -} - -TEST(JSONSchema_base_dialect_2020_12, jsonschema_meta_meta_data) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/meta-data" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect_2020_12, jsonschema_meta_unevaluated) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/unevaluated" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect_2020_12, jsonschema_meta_validation) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/validation" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} diff --git a/test/jsonschema/jsonschema_base_dialect_draft0_test.cc b/test/jsonschema/jsonschema_base_dialect_draft0_test.cc deleted file mode 100644 index c8e3248ae..000000000 --- a/test/jsonschema/jsonschema_base_dialect_draft0_test.cc +++ /dev/null @@ -1,50 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_base_dialect_draft0, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/hyper-schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_0_Hyper); -} - -TEST(JSONSchema_base_dialect_draft0, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_0_Hyper); -} - -TEST(JSONSchema_base_dialect_draft0, jsonschema_draft_jsonref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/json-ref#" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_0_Hyper); -} - -TEST(JSONSchema_base_dialect_draft0, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/links#" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_0_Hyper); -} diff --git a/test/jsonschema/jsonschema_base_dialect_draft1_test.cc b/test/jsonschema/jsonschema_base_dialect_draft1_test.cc deleted file mode 100644 index 0edebbfd7..000000000 --- a/test/jsonschema/jsonschema_base_dialect_draft1_test.cc +++ /dev/null @@ -1,50 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_base_dialect_draft1, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/hyper-schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_1_Hyper); -} - -TEST(JSONSchema_base_dialect_draft1, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_1_Hyper); -} - -TEST(JSONSchema_base_dialect_draft1, jsonschema_draft_jsonref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/json-ref#" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_1_Hyper); -} - -TEST(JSONSchema_base_dialect_draft1, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/links#" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_1_Hyper); -} diff --git a/test/jsonschema/jsonschema_base_dialect_draft2_test.cc b/test/jsonschema/jsonschema_base_dialect_draft2_test.cc deleted file mode 100644 index 0fa5e1426..000000000 --- a/test/jsonschema/jsonschema_base_dialect_draft2_test.cc +++ /dev/null @@ -1,50 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_base_dialect_draft2, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/hyper-schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_2_Hyper); -} - -TEST(JSONSchema_base_dialect_draft2, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_2_Hyper); -} - -TEST(JSONSchema_base_dialect_draft2, jsonschema_draft_jsonref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/json-ref#" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_2_Hyper); -} - -TEST(JSONSchema_base_dialect_draft2, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/links#" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_2_Hyper); -} diff --git a/test/jsonschema/jsonschema_base_dialect_draft3_test.cc b/test/jsonschema/jsonschema_base_dialect_draft3_test.cc deleted file mode 100644 index 4b95c3eec..000000000 --- a/test/jsonschema/jsonschema_base_dialect_draft3_test.cc +++ /dev/null @@ -1,50 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_base_dialect_draft3, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/hyper-schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_3_Hyper); -} - -TEST(JSONSchema_base_dialect_draft3, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_3); -} - -TEST(JSONSchema_base_dialect_draft3, jsonschema_draft_jsonref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/json-ref#" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_3_Hyper); -} - -TEST(JSONSchema_base_dialect_draft3, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/links#" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_3_Hyper); -} diff --git a/test/jsonschema/jsonschema_base_dialect_draft4_test.cc b/test/jsonschema/jsonschema_base_dialect_draft4_test.cc deleted file mode 100644 index a4021842b..000000000 --- a/test/jsonschema/jsonschema_base_dialect_draft4_test.cc +++ /dev/null @@ -1,78 +0,0 @@ -#include - -#include -#include - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/metaschema_1") { - return sourcemeta::core::parse_json(R"JSON({ - "id": "https://sourcemeta.com/metaschema_1", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - } else if (identifier == "https://sourcemeta.com/metaschema_2") { - return sourcemeta::core::parse_json(R"JSON({ - "id": "https://sourcemeta.com/metaschema_2", - "$schema": "https://sourcemeta.com/metaschema_1" - })JSON"); - } else { - return std::nullopt; - } -} - -TEST(JSONSchema_base_dialect_draft4, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/hyper-schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4_Hyper); -} - -TEST(JSONSchema_base_dialect_draft4, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4); -} - -TEST(JSONSchema_base_dialect_draft4, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/links#" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4_Hyper); -} - -TEST(JSONSchema_base_dialect_draft4, jsonschema_base_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/metaschema_1" - })JSON"); - const auto base_dialect{ - sourcemeta::core::base_dialect(document, test_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4); -} - -TEST(JSONSchema_base_dialect_draft4, jsonschema_base_two_hops) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/metaschema_2" - })JSON"); - const auto base_dialect{ - sourcemeta::core::base_dialect(document, test_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4); -} diff --git a/test/jsonschema/jsonschema_base_dialect_draft6_test.cc b/test/jsonschema/jsonschema_base_dialect_draft6_test.cc deleted file mode 100644 index 4a80759d1..000000000 --- a/test/jsonschema/jsonschema_base_dialect_draft6_test.cc +++ /dev/null @@ -1,39 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_base_dialect_draft6, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/hyper-schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_6_Hyper); -} - -TEST(JSONSchema_base_dialect_draft6, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_6); -} - -TEST(JSONSchema_base_dialect_draft6, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/links#" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_6_Hyper); -} diff --git a/test/jsonschema/jsonschema_base_dialect_draft7_test.cc b/test/jsonschema/jsonschema_base_dialect_draft7_test.cc deleted file mode 100644 index 85a4b229e..000000000 --- a/test/jsonschema/jsonschema_base_dialect_draft7_test.cc +++ /dev/null @@ -1,50 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_base_dialect_draft7, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/hyper-schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7_Hyper); -} - -TEST(JSONSchema_base_dialect_draft7, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7); -} - -TEST(JSONSchema_base_dialect_draft7, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/links#" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7_Hyper); -} - -TEST(JSONSchema_base_dialect_draft7, jsonschema_draft_hyperschema_output) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/hyper-schema-output" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7); -} diff --git a/test/jsonschema/jsonschema_base_dialect_test.cc b/test/jsonschema/jsonschema_base_dialect_test.cc deleted file mode 100644 index ebf0aa5df..000000000 --- a/test/jsonschema/jsonschema_base_dialect_test.cc +++ /dev/null @@ -1,647 +0,0 @@ -#include - -#include -#include - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/metaschema_1") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/metaschema_1", - "$schema": "https://sourcemeta.com/metaschema_1" - })JSON"); - } else if (identifier == "https://sourcemeta.com/metaschema_2") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/metaschema_2", - "$schema": "https://sourcemeta.com/metaschema_1" - })JSON"); - } else if (identifier == "https://sourcemeta.com/no-schema") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/no-schema" - })JSON"); - } else if (identifier == "https://sourcemeta.com/metaschema_3") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/metaschema_3", - "$schema": "https://sourcemeta.com/no-schema" - })JSON"); - } else if (identifier == "https://sourcemeta.com/metaschema_4") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/metaschema_4", - "$schema": "https://sourcemeta.com/metaschema_4" - })JSON"); - } else { - return std::nullopt; - } -} - -TEST(JSONSchema_base_dialect, boolean_schema_true) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("true"); - const auto base_dialect{ - sourcemeta::core::base_dialect(document, test_resolver)}; - EXPECT_FALSE(base_dialect.has_value()); -} - -TEST(JSONSchema_base_dialect, boolean_schema_false) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("false"); - const auto base_dialect{ - sourcemeta::core::base_dialect(document, test_resolver)}; - EXPECT_FALSE(base_dialect.has_value()); -} - -TEST(JSONSchema_base_dialect, boolean_schema_default_dialect_official) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("true"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect, boolean_schema_default_dialect_custom_throws) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("true"); - EXPECT_THROW( - sourcemeta::core::base_dialect(document, test_resolver, - "https://sourcemeta.com/metaschema_1"), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_base_dialect, self_descriptive_schema_throws) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://example.com/my-schema" - })JSON"); - EXPECT_THROW(sourcemeta::core::base_dialect(document, test_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_base_dialect, non_resolvable_schema_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://example.com/does-not-exist" - })JSON"); - EXPECT_THROW(sourcemeta::core::base_dialect(document, test_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_base_dialect, relative_schema_uri_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "../foo.json" - })JSON"); - EXPECT_THROW(sourcemeta::core::base_dialect(document, test_resolver), - sourcemeta::core::SchemaRelativeMetaschemaResolutionError); -} - -TEST(JSONSchema_base_dialect, relative_schema_uri) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "../foo.json" - })JSON"); - EXPECT_THROW(sourcemeta::core::base_dialect(document, test_resolver), - sourcemeta::core::SchemaRelativeMetaschemaResolutionError); -} - -TEST(JSONSchema_base_dialect, non_resolvable_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/does-not-exist" - })JSON"); - EXPECT_THROW(sourcemeta::core::base_dialect(document, test_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_base_dialect, non_resolvable_default_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - EXPECT_THROW( - sourcemeta::core::base_dialect(document, test_resolver, - "https://example.com/does-not-exist"), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_base_dialect, id_with_custom_metaschema_throws) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema_1" - })JSON"); - EXPECT_THROW(sourcemeta::core::base_dialect(document, test_resolver), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_base_dialect, no_id_with_custom_metaschema_throws) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/metaschema_1" - })JSON"); - EXPECT_THROW(sourcemeta::core::base_dialect(document, test_resolver), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_base_dialect, self_descriptive_custom_metaschema_throws) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/no-schema", - "$schema": "https://sourcemeta.com/no-schema" - })JSON"); - EXPECT_THROW(sourcemeta::core::base_dialect(document, test_resolver), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_base_dialect, metaschema_without_schema_one_hop_throws) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/metaschema_3" - })JSON"); - EXPECT_THROW(sourcemeta::core::base_dialect(document, test_resolver), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_base_dialect, id_self_descriptive_default_dialect_throws) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/foo-bar" - })JSON"); - EXPECT_THROW(sourcemeta::core::base_dialect(document, test_resolver, - "https://sourcemeta.com/foo-bar"), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_base_dialect, id_default_dialect_custom_throws) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/foo-bar" - })JSON"); - EXPECT_THROW( - sourcemeta::core::base_dialect(document, test_resolver, - "https://sourcemeta.com/metaschema_1"), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_base_dialect, default_dialect_custom_throws) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - EXPECT_THROW( - sourcemeta::core::base_dialect(document, test_resolver, - "https://sourcemeta.com/metaschema_1"), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_base_dialect, default_dialect_precedence_custom_throws) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/metaschema_4" - })JSON"); - EXPECT_THROW( - sourcemeta::core::base_dialect(document, test_resolver, - "https://sourcemeta.com/metaschema_1"), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_base_dialect, default_dialect_official_takes_precedence) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, test_resolver, "https://sourcemeta.com/metaschema_1")}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect, override_takes_precedence_over_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "x-sourcemeta-dialect-override-subschema": - "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto base_dialect{ - sourcemeta::core::base_dialect(document, test_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect, override_takes_precedence_over_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "x-sourcemeta-dialect-override-subschema": - "http://json-schema.org/draft-04/schema#" - })JSON"); - const auto base_dialect{sourcemeta::core::base_dialect( - document, test_resolver, "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4); -} - -TEST(JSONSchema_base_dialect, override_unresolvable_throws) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "x-sourcemeta-dialect-override-subschema": - "https://example.com/does-not-exist" - })JSON"); - - try { - sourcemeta::core::base_dialect(document, test_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaResolutionError &error) { - EXPECT_EQ(error.identifier(), "https://example.com/does-not-exist"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_base_dialect, to_string_2020_12) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12), - "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_base_dialect, to_string_2020_12_hyper) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12_Hyper), - "https://json-schema.org/draft/2020-12/hyper-schema"); -} - -TEST(JSONSchema_base_dialect, to_string_2019_09) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09), - "https://json-schema.org/draft/2019-09/schema"); -} - -TEST(JSONSchema_base_dialect, to_string_2019_09_hyper) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09_Hyper), - "https://json-schema.org/draft/2019-09/hyper-schema"); -} - -TEST(JSONSchema_base_dialect, to_string_draft7) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7), - "http://json-schema.org/draft-07/schema#"); -} - -TEST(JSONSchema_base_dialect, to_string_draft7_hyper) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7_Hyper), - "http://json-schema.org/draft-07/hyper-schema#"); -} - -TEST(JSONSchema_base_dialect, to_string_draft6) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_6), - "http://json-schema.org/draft-06/schema#"); -} - -TEST(JSONSchema_base_dialect, to_string_draft6_hyper) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_6_Hyper), - "http://json-schema.org/draft-06/hyper-schema#"); -} - -TEST(JSONSchema_base_dialect, to_string_draft4) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4), - "http://json-schema.org/draft-04/schema#"); -} - -TEST(JSONSchema_base_dialect, to_string_draft4_hyper) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4_Hyper), - "http://json-schema.org/draft-04/hyper-schema#"); -} - -TEST(JSONSchema_base_dialect, to_string_draft3) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_3), - "http://json-schema.org/draft-03/schema#"); -} - -TEST(JSONSchema_base_dialect, to_string_draft3_hyper) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_3_Hyper), - "http://json-schema.org/draft-03/hyper-schema#"); -} - -TEST(JSONSchema_base_dialect, to_string_draft2_hyper) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_2_Hyper), - "http://json-schema.org/draft-02/hyper-schema#"); -} - -TEST(JSONSchema_base_dialect, to_string_draft1_hyper) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_1_Hyper), - "http://json-schema.org/draft-01/hyper-schema#"); -} - -TEST(JSONSchema_base_dialect, to_string_draft0_hyper) { - EXPECT_EQ(sourcemeta::core::to_string( - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_0_Hyper), - "http://json-schema.org/draft-00/hyper-schema#"); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_2020_12) { - const auto result{sourcemeta::core::to_base_dialect( - "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_2020_12_hyper) { - const auto result{sourcemeta::core::to_base_dialect( - "https://json-schema.org/draft/2020-12/hyper-schema")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_2019_09) { - const auto result{sourcemeta::core::to_base_dialect( - "https://json-schema.org/draft/2019-09/schema")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_2019_09_hyper) { - const auto result{sourcemeta::core::to_base_dialect( - "https://json-schema.org/draft/2019-09/hyper-schema")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft7) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft-07/schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft7_hyper) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft-07/hyper-schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft6) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft-06/schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_6); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft6_hyper) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft-06/hyper-schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_6_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft4) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft-04/schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft4_hyper) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft-04/hyper-schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft3) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft-03/schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_3); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft3_hyper) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft-03/hyper-schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_3_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft2_hyper) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft-02/hyper-schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_2_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft1_hyper) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft-01/hyper-schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_1_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft0_hyper) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft-00/hyper-schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_0_Hyper); -} - -TEST(JSONSchema_base_dialect, self_referencing_metaschema) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/self", - "$id": "https://example.com/self" - })JSON")}; - - const sourcemeta::core::SchemaResolver resolver{ - [&schema](std::string_view identifier) - -> std::optional { - if (identifier == "https://example.com/self") { - return schema; - } - return sourcemeta::core::schema_resolver(identifier); - }}; - - EXPECT_THROW(sourcemeta::core::base_dialect(schema, resolver), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_base_dialect, indirect_metaschema_cycle) { - const auto schema_a{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/b", - "$id": "https://example.com/a" - })JSON")}; - - const auto schema_b{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/a", - "$id": "https://example.com/b" - })JSON")}; - - const sourcemeta::core::SchemaResolver resolver{ - [&](std::string_view identifier) - -> std::optional { - if (identifier == "https://example.com/a") { - return schema_a; - } else if (identifier == "https://example.com/b") { - return schema_b; - } else { - return sourcemeta::core::schema_resolver(identifier); - } - }}; - - EXPECT_THROW(sourcemeta::core::base_dialect(schema_a, resolver), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_2020_12_http) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft/2020-12/schema")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_2020_12_hyper_http) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft/2020-12/hyper-schema")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_2019_09_http) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft/2019-09/schema")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_2019_09_hyper_http) { - const auto result{sourcemeta::core::to_base_dialect( - "http://json-schema.org/draft/2019-09/hyper-schema")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft7_https) { - const auto result{sourcemeta::core::to_base_dialect( - "https://json-schema.org/draft-07/schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft7_hyper_https) { - const auto result{sourcemeta::core::to_base_dialect( - "https://json-schema.org/draft-07/hyper-schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft6_https) { - const auto result{sourcemeta::core::to_base_dialect( - "https://json-schema.org/draft-06/schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_6); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft4_https) { - const auto result{sourcemeta::core::to_base_dialect( - "https://json-schema.org/draft-04/schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft3_https) { - const auto result{sourcemeta::core::to_base_dialect( - "https://json-schema.org/draft-03/schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_3); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft2_hyper_https) { - const auto result{sourcemeta::core::to_base_dialect( - "https://json-schema.org/draft-02/hyper-schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_2_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft1_hyper_https) { - const auto result{sourcemeta::core::to_base_dialect( - "https://json-schema.org/draft-01/hyper-schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_1_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_draft0_hyper_https) { - const auto result{sourcemeta::core::to_base_dialect( - "https://json-schema.org/draft-00/hyper-schema#")}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_0_Hyper); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_unknown) { - const auto result{ - sourcemeta::core::to_base_dialect("https://example.com/unknown-dialect")}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_base_dialect, to_base_dialect_empty) { - const auto result{sourcemeta::core::to_base_dialect("")}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_base_dialect, override_disallowed_returns_schema_base) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "x-sourcemeta-dialect-override-subschema": - "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - const auto base_dialect{ - sourcemeta::core::base_dialect(document, test_resolver, "", false)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4); -} - -TEST(JSONSchema_base_dialect, override_disallowed_with_unresolvable_uri) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "x-sourcemeta-dialect-override-subschema": - "https://example.com/does-not-exist" - })JSON"); - - const auto base_dialect{ - sourcemeta::core::base_dialect(document, test_resolver, "", false)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_base_dialect, override_disallowed_with_default_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "x-sourcemeta-dialect-override-subschema": - "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, test_resolver, "http://json-schema.org/draft-07/schema#", - false)}; - EXPECT_TRUE(base_dialect.has_value()); - EXPECT_EQ(base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7); -} diff --git a/test/jsonschema/jsonschema_bundle_2019_09_test.cc b/test/jsonschema/jsonschema_bundle_2019_09_test.cc deleted file mode 100644 index 0862e09d6..000000000 --- a/test/jsonschema/jsonschema_bundle_2019_09_test.cc +++ /dev/null @@ -1,566 +0,0 @@ -#include - -#include -#include - -#include // std::string -#include // std::string_view - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://example.com/foo/bar") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com/foo/bar", - "$anchor": "baz" - })JSON"); - } else if (identifier == "https://example.com/baz-anchor") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com/baz-anchor", - "$defs": { - "baz": { - "$anchor": "baz", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-1") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-2") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-3") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-3", - "$ref": "test-1" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-4") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/recursive") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - })JSON"); - } else if (identifier == - "https://www.sourcemeta.com/recursive-empty-fragment") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/recursive-empty-fragment#", - "properties": { - "foo": { "$ref": "#" } - } - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/anonymous") { - return sourcemeta::core::parse_json(R"JSON({ - "type": "integer" - })JSON"); - } else if (identifier == "https://example.com/meta/1.json") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/2.json", - "$id": "https://example.com/meta/1.json", - "$vocabulary": { "https://json-schema.org/draft/2019-09/vocab/core": true } - })JSON"); - } else if (identifier == "https://example.com/meta/2.json") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com/meta/2.json", - "$vocabulary": { "https://json-schema.org/draft/2019-09/vocab/core": true } - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_bundle_2019_09, no_references_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2019_09, const_no_references_no_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_bundle_2019_09, simple_with_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { "$id": "https://www.sourcemeta.com", "$ref": "test-2" }, - "baz": { "$ref": "https://example.com/foo/bar#baz" }, - "qux": { "$ref": "https://example.com/foo/bar" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { "$id": "https://www.sourcemeta.com", "$ref": "test-2" }, - "baz": { "$ref": "https://example.com/foo/bar#baz" }, - "qux": { "$ref": "https://example.com/foo/bar" } - }, - "$defs": { - "https://www.sourcemeta.com/test-1": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-3", - "$ref": "test-1" - }, - "https://example.com/foo/bar": { - "$id": "https://example.com/foo/bar", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$anchor": "baz" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2019_09, simple_without_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { "$id": "https://www.sourcemeta.com", "$ref": "test-2" }, - "baz": { "$ref": "https://example.com/foo/bar#baz" }, - "qux": { "$ref": "https://example.com/foo/bar" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { "$id": "https://www.sourcemeta.com", "$ref": "test-2" }, - "baz": { "$ref": "https://example.com/foo/bar#baz" }, - "qux": { "$ref": "https://example.com/foo/bar" } - }, - "$defs": { - "https://www.sourcemeta.com/test-1": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-3", - "$ref": "test-1" - }, - "https://example.com/foo/bar": { - "$id": "https://example.com/foo/bar", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$anchor": "baz" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2019_09, schema_not_found) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/xxx" } - } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_bundle_2019_09, idempotency) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "$defs": { - "https://www.sourcemeta.com/test-1": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-3", - "$ref": "test-1" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2019_09, pre_embedded) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "$defs": { - "already-embedded": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "$defs": { - "already-embedded": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-3", - "$ref": "test-1" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2019_09, taken_definitions_entry) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" }, - "extra": { "$ref": "https://www.sourcemeta.com/test-4" } - }, - "$defs": { - "https://www.sourcemeta.com/test-1": { "foo": 1 }, - "https://www.sourcemeta.com/test-4": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x": { "foo": 1 } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" }, - "extra": { "$ref": "https://www.sourcemeta.com/test-4" } - }, - "$defs": { - "https://www.sourcemeta.com/test-1": { "foo": 1 }, - "https://www.sourcemeta.com/test-1/x": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-4": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x/x": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2019_09, recursive) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "https://www.sourcemeta.com/recursive" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "https://www.sourcemeta.com/recursive", - "$defs": { - "https://www.sourcemeta.com/recursive": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2019_09, recursive_empty_fragment) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#", - "$defs": { - "https://www.sourcemeta.com/recursive-empty-fragment#": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/recursive-empty-fragment#", - "properties": { - "foo": { "$ref": "#" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2019_09, anonymous_no_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$ref": "https://www.sourcemeta.com/anonymous" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, - "https://json-schema.org/draft/2019-09/schema"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$ref": "https://www.sourcemeta.com/anonymous", - "$defs": { - "https://www.sourcemeta.com/anonymous": { - "$id": "https://www.sourcemeta.com/anonymous", - "type": "integer" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2019_09, metaschema) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/1.json", - "type": "string" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/1.json", - "type": "string", - "$defs": { - "https://example.com/meta/1.json": { - "$schema": "https://example.com/meta/2.json", - "$id": "https://example.com/meta/1.json", - "$vocabulary": { "https://json-schema.org/draft/2019-09/vocab/core": true } - }, - "https://example.com/meta/2.json": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com/meta/2.json", - "$vocabulary": { "https://json-schema.org/draft/2019-09/vocab/core": true } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2019_09, relative_base_uri_with_ref) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "common", - "allOf": [ { "$ref": "#reference" } ], - "definitions": { - "reference": { - "$anchor": "reference" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "common", - "allOf": [ { "$ref": "#reference" } ], - "definitions": { - "reference": { - "$anchor": "reference" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2019_09, hyperschema_smoke) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "https://json-schema.org/draft/2019-09/hyper-schema" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.is_object()); -} - -TEST(JSONSchema_bundle_2019_09, hyperschema_1) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "allOf": [ - { "$ref": "https://json-schema.org/draft/2019-09/schema" }, - { "$ref": "https://json-schema.org/draft/2019-09/meta/hyper-schema" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.defines("$defs")); - EXPECT_TRUE(document.at("$defs").is_object()); - EXPECT_EQ(document.at("$defs").size(), 10); - - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2019-09/schema")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2019-09/meta/core")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2019-09/meta/applicator")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2019-09/meta/validation")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2019-09/meta/meta-data")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2019-09/meta/format")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2019-09/meta/content")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2019-09/meta/hyper-schema")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2019-09/links")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2019-09/hyper-schema")); -} - -TEST(JSONSchema_bundle_2019_09, hyperschema_2) { - sourcemeta::core::JSON document = - sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2019-09/hyper-schema") - .value(); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.defines("$defs")); - EXPECT_TRUE(document.at("$defs").is_object()); - EXPECT_EQ(document.at("$defs").size(), 9); -} diff --git a/test/jsonschema/jsonschema_bundle_2020_12_test.cc b/test/jsonschema/jsonschema_bundle_2020_12_test.cc deleted file mode 100644 index 3ceb7ec87..000000000 --- a/test/jsonschema/jsonschema_bundle_2020_12_test.cc +++ /dev/null @@ -1,1326 +0,0 @@ -#include - -#include -#include - -#include // std::string -#include // std::string_view - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://example.com/foo/bar") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/foo/bar", - "$anchor": "baz" - })JSON"); - } else if (identifier == "https://example.com/baz-anchor") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/baz-anchor", - "$defs": { - "baz": { - "$anchor": "baz", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-1") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-2") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-3") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-3", - "$ref": "test-1" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-4") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/recursive") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - })JSON"); - } else if (identifier == - "https://www.sourcemeta.com/recursive-empty-fragment") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/recursive-empty-fragment#", - "properties": { - "foo": { "$ref": "#" } - } - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/anonymous") { - return sourcemeta::core::parse_json(R"JSON({ - "type": "integer" - })JSON"); - } else if (identifier == "https://example.com/nested/ref-string.json") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "string.json" - })JSON"); - } else if (identifier == "https://example.com/nested/string.json") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - })JSON"); - } else if (identifier == "https://example.com/meta/1.json") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/2.json", - "$id": "https://example.com/meta/1.json", - "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/core": true } - })JSON"); - } else if (identifier == "https://example.com/meta/2.json") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/meta/2.json", - "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/core": true } - })JSON"); - } else if (identifier == "https://cdn.example.com/schemas/foo") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/foo", - "$defs": { - "bar": { - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://example.com/dedup-a") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-a", - "$ref": "dedup-common", - "$defs": { - "https://example.com/dedup-common": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-common", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://example.com/dedup-b") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-b", - "$ref": "dedup-common", - "$defs": { - "https://example.com/dedup-common": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-common", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://www.example.com/schemas/bundled") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/schemas/parent", - "$ref": "./child", - "$defs": { - "https://example.com/schemas/child": { - "$id": "https://example.com/schemas/child", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://example.com/dedup-conflict-a") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-conflict-a", - "$ref": "dedup-conflict-common", - "$defs": { - "https://example.com/dedup-conflict-common": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-conflict-common", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://example.com/dedup-conflict-b") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-conflict-b", - "$ref": "dedup-conflict-common", - "$defs": { - "https://example.com/dedup-conflict-common": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-conflict-common", - "type": "integer" - } - } - })JSON"); - } else if (identifier == "https://example.com/elevate-single") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/elevate-single", - "$ref": "elevate-single-nested", - "$defs": { - "https://example.com/elevate-single-nested": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/elevate-single-nested", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://example.com/shared-direct") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/shared-direct", - "type": "string" - })JSON"); - } else if (identifier == "https://example.com/cross-dialect-host") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/cross-dialect-host", - "$ref": "cross-dialect-nested", - "$defs": { - "https://example.com/cross-dialect-nested": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/cross-dialect-nested", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://example.com/host-with-relative-nested") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/host-with-relative-nested", - "$ref": "relative-nested", - "$defs": { - "relative-nested": { - "$id": "relative-nested", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://example.com/collision-a") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/collision-a", - "$ref": "collision-common", - "$defs": { - "https://example.com/collision-common": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/collision-common", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://example.com/collision-b") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/collision-b", - "$ref": "collision-common", - "$defs": { - "https://example.com/collision-common": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/collision-common", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://example.com/prebundled-with-shared") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/prebundled-with-shared", - "$ref": "shared-direct", - "$defs": { - "https://example.com/shared-direct": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/shared-direct", - "type": "string" - } - } - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_bundle_2020_12, no_references_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, const_no_references_no_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_bundle_2020_12, simple_with_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { "$id": "https://www.sourcemeta.com", "$ref": "test-2" }, - "baz": { "$ref": "https://example.com/foo/bar#baz" }, - "qux": { "$ref": "https://example.com/foo/bar" }, - "dyn": { "$dynamicRef": "https://www.sourcemeta.com/test-4" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { "$id": "https://www.sourcemeta.com", "$ref": "test-2" }, - "baz": { "$ref": "https://example.com/foo/bar#baz" }, - "qux": { "$ref": "https://example.com/foo/bar" }, - "dyn": { "$dynamicRef": "https://www.sourcemeta.com/test-4" } - }, - "$defs": { - "https://www.sourcemeta.com/test-1": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-3", - "$ref": "test-1" - }, - "https://www.sourcemeta.com/test-4": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - }, - "https://example.com/foo/bar": { - "$id": "https://example.com/foo/bar", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": "baz" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, simple_without_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { "$id": "https://www.sourcemeta.com", "$ref": "test-2" }, - "baz": { "$ref": "https://example.com/foo/bar#baz" }, - "qux": { "$ref": "https://example.com/foo/bar" }, - "dyn": { "$dynamicRef": "https://www.sourcemeta.com/test-4" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { "$id": "https://www.sourcemeta.com", "$ref": "test-2" }, - "baz": { "$ref": "https://example.com/foo/bar#baz" }, - "qux": { "$ref": "https://example.com/foo/bar" }, - "dyn": { "$dynamicRef": "https://www.sourcemeta.com/test-4" } - }, - "$defs": { - "https://www.sourcemeta.com/test-1": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-3", - "$ref": "test-1" - }, - "https://www.sourcemeta.com/test-4": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - }, - "https://example.com/foo/bar": { - "$id": "https://example.com/foo/bar", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": "baz" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, schema_not_found) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/xxx" } - } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_bundle_2020_12, anchor_not_found) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://example.com/foo/bar#xxxxxxxx" } - } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaReferenceError); -} - -TEST(JSONSchema_bundle_2020_12, idempotency) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "$defs": { - "https://www.sourcemeta.com/test-1": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-3", - "$ref": "test-1" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, pre_embedded) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "$defs": { - "already-embedded": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "$defs": { - "already-embedded": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-3", - "$ref": "test-1" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, taken_definitions_entry) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" }, - "extra": { "$ref": "https://www.sourcemeta.com/test-4" } - }, - "$defs": { - "https://www.sourcemeta.com/test-1": { "foo": 1 }, - "https://www.sourcemeta.com/test-4": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x": { "foo": 1 } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" }, - "extra": { "$ref": "https://www.sourcemeta.com/test-4" } - }, - "$defs": { - "https://www.sourcemeta.com/test-1": { "foo": 1 }, - "https://www.sourcemeta.com/test-1/x": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-4": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x/x": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, recursive) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.sourcemeta.com/recursive" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.sourcemeta.com/recursive", - "$defs": { - "https://www.sourcemeta.com/recursive": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, recursive_empty_fragment) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#", - "$defs": { - "https://www.sourcemeta.com/recursive-empty-fragment#": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/recursive-empty-fragment#", - "properties": { - "foo": { "$ref": "#" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, anonymous_no_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$ref": "https://www.sourcemeta.com/anonymous" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, - "https://json-schema.org/draft/2020-12/schema"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$ref": "https://www.sourcemeta.com/anonymous", - "$defs": { - "https://www.sourcemeta.com/anonymous": { - "$id": "https://www.sourcemeta.com/anonymous", - "type": "integer" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, relative_in_target_without_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/test", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "nested/ref-string.json" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/test", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "nested/ref-string.json", - "$defs": { - "https://example.com/nested/ref-string.json": { - "$id": "https://example.com/nested/ref-string.json", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "string.json" - }, - "https://example.com/nested/string.json": { - "$id": "https://example.com/nested/string.json", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, relative_base_uri_with_ref) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "common", - "allOf": [ { "$ref": "#reference" } ], - "definitions": { - "reference": { - "$anchor": "reference" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "common", - "allOf": [ { "$ref": "#reference" } ], - "definitions": { - "reference": { - "$anchor": "reference" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, metaschema) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/1.json", - "type": "string" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/1.json", - "type": "string", - "$defs": { - "https://example.com/meta/1.json": { - "$schema": "https://example.com/meta/2.json", - "$id": "https://example.com/meta/1.json", - "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/core": true } - }, - "https://example.com/meta/2.json": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/meta/2.json", - "$vocabulary": { "https://json-schema.org/draft/2020-12/vocab/core": true } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, openapi_3_1_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://spec.openapis.org/oas/3.1/dialect/base", - "type": "object" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_EQ(document.at("$schema").to_string(), - "https://spec.openapis.org/oas/3.1/dialect/base"); - EXPECT_TRUE(document.defines("$defs")); - EXPECT_TRUE(document.at("$defs").is_object()); - EXPECT_EQ(document.at("$defs").size(), 10); - - EXPECT_EQ( - document.at("$defs").at("https://spec.openapis.org/oas/3.1/dialect/base"), - sourcemeta::core::schema_resolver( - "https://spec.openapis.org/oas/3.1/dialect/base") - .value()); - EXPECT_EQ( - document.at("$defs").at("https://spec.openapis.org/oas/3.1/meta/base"), - sourcemeta::core::schema_resolver( - "https://spec.openapis.org/oas/3.1/meta/base") - .value()); - EXPECT_EQ( - document.at("$defs").at("https://json-schema.org/draft/2020-12/schema"), - sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/schema") - .value()); - EXPECT_EQ(document.at("$defs").at( - "https://json-schema.org/draft/2020-12/meta/core"), - sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/meta/core") - .value()); - EXPECT_EQ(document.at("$defs").at( - "https://json-schema.org/draft/2020-12/meta/applicator"), - sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/meta/applicator") - .value()); - EXPECT_EQ(document.at("$defs").at( - "https://json-schema.org/draft/2020-12/meta/unevaluated"), - sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/meta/unevaluated") - .value()); - EXPECT_EQ(document.at("$defs").at( - "https://json-schema.org/draft/2020-12/meta/validation"), - sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/meta/validation") - .value()); - EXPECT_EQ(document.at("$defs").at( - "https://json-schema.org/draft/2020-12/meta/meta-data"), - sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/meta/meta-data") - .value()); - EXPECT_EQ(document.at("$defs").at( - "https://json-schema.org/draft/2020-12/meta/format-annotation"), - sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/meta/format-annotation") - .value()); - EXPECT_EQ(document.at("$defs").at( - "https://json-schema.org/draft/2020-12/meta/content"), - sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/meta/content") - .value()); -} - -TEST(JSONSchema_bundle_2020_12, hyperschema_smoke) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://json-schema.org/draft/2020-12/hyper-schema" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.is_object()); -} - -TEST(JSONSchema_bundle_2020_12, hyperschema_1) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "allOf": [ - { "$ref": "https://json-schema.org/draft/2020-12/schema" }, - { "$ref": "https://json-schema.org/draft/2020-12/meta/hyper-schema" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.defines("$defs")); - EXPECT_TRUE(document.at("$defs").is_object()); - EXPECT_EQ(document.at("$defs").size(), 11); - - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2020-12/schema")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2020-12/meta/core")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2020-12/meta/applicator")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2020-12/meta/unevaluated")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2020-12/meta/validation")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2020-12/meta/meta-data")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2020-12/meta/format-annotation")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2020-12/meta/content")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2020-12/meta/hyper-schema")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2020-12/links")); - EXPECT_TRUE(document.at("$defs").defines( - "https://json-schema.org/draft/2020-12/hyper-schema")); -} - -TEST(JSONSchema_bundle_2020_12, bundle_to_definitions) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.sourcemeta.com/recursive" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, "", "", - sourcemeta::core::Pointer{"definitions"}); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.sourcemeta.com/recursive", - "definitions": { - "https://www.sourcemeta.com/recursive": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, custom_nested_object_path_non_existent) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.sourcemeta.com/recursive" - })JSON"); - - sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver, "", "", - sourcemeta::core::Pointer{"x-definitions", "foo", "bar"}); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.sourcemeta.com/recursive", - "x-definitions": { - "foo": { - "bar": { - "https://www.sourcemeta.com/recursive": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, custom_nested_object_path_half_existent) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.sourcemeta.com/recursive", - "x-definitions": { "foo": {} } - })JSON"); - - sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver, "", "", - sourcemeta::core::Pointer{"x-definitions", "foo", "bar"}); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.sourcemeta.com/recursive", - "x-definitions": { - "foo": { - "bar": { - "https://www.sourcemeta.com/recursive": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, - custom_nested_object_path_half_existent_with_array) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.sourcemeta.com/recursive", - "x-definitions": [ { "foo": {} } ] - })JSON"); - - sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver, "", "", - sourcemeta::core::Pointer{"x-definitions", 0, "foo", "bar"}); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.sourcemeta.com/recursive", - "x-definitions": [ - { - "foo": { - "bar": { - "https://www.sourcemeta.com/recursive": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - } - } - } - } - ] - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, custom_nested_object_path_not_object) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.sourcemeta.com/recursive", - "x-definitions": { "foo": { "bar": [] } } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver, "", - "", - sourcemeta::core::Pointer{"x-definitions", "foo", "bar"}), - sourcemeta::core::SchemaError); -} - -TEST(JSONSchema_bundle_2020_12, default_id_with_different_ref_target_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "Entry", - "$ref": "schemas/bundled" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, "", "https://www.example.com/entry"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.example.com/entry", - "title": "Entry", - "$ref": "https://example.com/schemas/parent", - "$defs": { - "https://example.com/schemas/child": { - "$id": "https://example.com/schemas/child", - "type": "string" - }, - "https://example.com/schemas/parent": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/schemas/parent", - "$ref": "./child" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, - default_id_with_different_ref_target_id_duplicate_refs) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "first": { "$ref": "https://cdn.example.com/schemas/foo" }, - "second": { "$ref": "https://cdn.example.com/schemas/foo" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, "", "https://www.example.com/entry"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.example.com/entry", - "properties": { - "first": { "$ref": "https://example.com/foo" }, - "second": { "$ref": "https://example.com/foo" } - }, - "$defs": { - "https://example.com/foo": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/foo", - "$defs": { - "bar": { - "type": "string" - } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, - default_id_with_different_ref_target_id_with_fragment) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://cdn.example.com/schemas/foo#/$defs/bar" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, "", "https://www.example.com/entry"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.example.com/entry", - "properties": { - "foo": { "$ref": "https://example.com/foo#/$defs/bar" } - }, - "$defs": { - "https://example.com/foo": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/foo", - "$defs": { - "bar": { - "type": "string" - } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, deduplicate_embedded_from_prebundled) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-entry", - "allOf": [ - { "$ref": "dedup-a" }, - { "$ref": "dedup-b" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-entry", - "allOf": [ - { "$ref": "dedup-a" }, - { "$ref": "dedup-b" } - ], - "$defs": { - "https://example.com/dedup-a": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-a", - "$ref": "dedup-common" - }, - "https://example.com/dedup-b": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-b", - "$ref": "dedup-common" - }, - "https://example.com/dedup-common": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-common", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, conflicting_embedded_from_prebundled) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/dedup-conflict-entry", - "allOf": [ - { "$ref": "dedup-conflict-a" }, - { "$ref": "dedup-conflict-b" } - ] - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaError); -} - -TEST(JSONSchema_bundle_2020_12, elevate_embedded_from_single_prebundled) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/elevate-entry", - "$ref": "elevate-single" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/elevate-entry", - "$ref": "elevate-single", - "$defs": { - "https://example.com/elevate-single": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/elevate-single", - "$ref": "elevate-single-nested" - }, - "https://example.com/elevate-single-nested": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/elevate-single-nested", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, direct_and_embedded_reference_no_duplicate) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/direct-and-embedded-entry", - "allOf": [ - { "$ref": "prebundled-with-shared" }, - { "$ref": "shared-direct" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/direct-and-embedded-entry", - "allOf": [ - { "$ref": "prebundled-with-shared" }, - { "$ref": "shared-direct" } - ], - "$defs": { - "https://example.com/prebundled-with-shared": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/prebundled-with-shared", - "$ref": "shared-direct" - }, - "https://example.com/shared-direct": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/shared-direct", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, elevate_embedded_cross_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/cross-dialect-entry", - "$ref": "cross-dialect-host" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/cross-dialect-entry", - "$ref": "cross-dialect-host", - "$defs": { - "https://example.com/cross-dialect-host": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/cross-dialect-host", - "$ref": "cross-dialect-nested" - }, - "https://example.com/cross-dialect-nested": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/cross-dialect-nested", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, no_elevate_relative_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/relative-entry", - "$ref": "host-with-relative-nested" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/relative-entry", - "$ref": "host-with-relative-nested", - "$defs": { - "https://example.com/host-with-relative-nested": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/host-with-relative-nested", - "$ref": "relative-nested", - "$defs": { - "relative-nested": { - "$id": "relative-nested", - "type": "string" - } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_2020_12, - deduplicate_embedded_with_preexisting_key_collision) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/collision-entry", - "$defs": { - "https://example.com/collision-common": { - "type": "boolean" - } - }, - "allOf": [ - { "$ref": "collision-a" }, - { "$ref": "collision-b" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/collision-entry", - "allOf": [ - { "$ref": "collision-a" }, - { "$ref": "collision-b" } - ], - "$defs": { - "https://example.com/collision-common": { - "type": "boolean" - }, - "https://example.com/collision-a": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/collision-a", - "$ref": "collision-common" - }, - "https://example.com/collision-b": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/collision-b", - "$ref": "collision-common" - }, - "https://example.com/collision-common/x": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/collision-common", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} diff --git a/test/jsonschema/jsonschema_bundle_draft0_test.cc b/test/jsonschema/jsonschema_bundle_draft0_test.cc deleted file mode 100644 index b1c023220..000000000 --- a/test/jsonschema/jsonschema_bundle_draft0_test.cc +++ /dev/null @@ -1,64 +0,0 @@ -#include - -#include -#include - -#include // std::string -#include // std::string_view - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://www.sourcemeta.com/test-1") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_bundle_draft0, no_references_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft0, const_no_references_no_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_bundle_draft0, simple_bundling) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-00/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" } - } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaError); -} diff --git a/test/jsonschema/jsonschema_bundle_draft1_test.cc b/test/jsonschema/jsonschema_bundle_draft1_test.cc deleted file mode 100644 index 6d3f60233..000000000 --- a/test/jsonschema/jsonschema_bundle_draft1_test.cc +++ /dev/null @@ -1,64 +0,0 @@ -#include - -#include -#include - -#include // std::string -#include // std::string_view - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://www.sourcemeta.com/test-1") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_bundle_draft1, no_references_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft1, const_no_references_no_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_bundle_draft1, simple_bundling) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-01/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" } - } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaError); -} diff --git a/test/jsonschema/jsonschema_bundle_draft2_test.cc b/test/jsonschema/jsonschema_bundle_draft2_test.cc deleted file mode 100644 index 8cf819b6d..000000000 --- a/test/jsonschema/jsonschema_bundle_draft2_test.cc +++ /dev/null @@ -1,64 +0,0 @@ -#include - -#include -#include - -#include // std::string -#include // std::string_view - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://www.sourcemeta.com/test-1") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_bundle_draft2, no_references_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft2, const_no_references_no_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_bundle_draft2, simple_bundling) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-02/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" } - } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaError); -} diff --git a/test/jsonschema/jsonschema_bundle_draft3_test.cc b/test/jsonschema/jsonschema_bundle_draft3_test.cc deleted file mode 100644 index d4bfacaef..000000000 --- a/test/jsonschema/jsonschema_bundle_draft3_test.cc +++ /dev/null @@ -1,355 +0,0 @@ -#include - -#include -#include - -#include // std::string -#include // std::string_view - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://www.sourcemeta.com/test-1") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-2") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-2", - "extends": { "$ref": "test-3" } - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-3") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-3", - "extends": { "$ref": "test-1" } - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-4") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/recursive") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_bundle_draft3, no_references_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft3, const_no_references_no_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_bundle_draft3, simple_bundling) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft3, simple_with_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "id": "https://www.sourcemeta.com", - "extends": { "$ref": "test-2" } - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "id": "https://www.sourcemeta.com", - "extends": { "$ref": "test-2" } - } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-2", - "extends": { "$ref": "test-3" } - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-3", - "extends": { "$ref": "test-1" } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft3, schema_not_found) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/xxx" } - } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_bundle_draft3, idempotency) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-2", - "extends": { "$ref": "test-3" } - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-3", - "extends": { "$ref": "test-1" } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft3, pre_embedded) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "definitions": { - "already-embedded": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "definitions": { - "already-embedded": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-2", - "extends": { "$ref": "test-3" } - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-3", - "extends": { "$ref": "test-1" } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft3, taken_definitions_entry) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" }, - "extra": { "$ref": "https://www.sourcemeta.com/test-4" } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { "type": "object" }, - "https://www.sourcemeta.com/test-4": { "type": "object" }, - "https://www.sourcemeta.com/test-4/x": { "type": "object" }, - "https://www.sourcemeta.com/test-4/x/x": { "type": "object" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" }, - "extra": { "$ref": "https://www.sourcemeta.com/test-4" } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { "type": "object" }, - "https://www.sourcemeta.com/test-1/x": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-4": { "type": "object" }, - "https://www.sourcemeta.com/test-4/x": { "type": "object" }, - "https://www.sourcemeta.com/test-4/x/x": { "type": "object" }, - "https://www.sourcemeta.com/test-4/x/x/x": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft3, recursive) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "extends": { "$ref": "https://www.sourcemeta.com/recursive" } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "extends": { "$ref": "https://www.sourcemeta.com/recursive" }, - "definitions": { - "https://www.sourcemeta.com/recursive": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft3, standalone_ref_with_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$ref": "https://www.sourcemeta.com/test-1" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, - "http://json-schema.org/draft-03/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "extends": [ { "$ref": "https://www.sourcemeta.com/test-1" } ], - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} diff --git a/test/jsonschema/jsonschema_bundle_draft4_test.cc b/test/jsonschema/jsonschema_bundle_draft4_test.cc deleted file mode 100644 index 6a3721957..000000000 --- a/test/jsonschema/jsonschema_bundle_draft4_test.cc +++ /dev/null @@ -1,661 +0,0 @@ -#include - -#include -#include - -#include // std::string -#include // std::string_view - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://www.sourcemeta.com/test-1") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-2") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-3") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-4") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/recursive") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - })JSON"); - } else if (identifier == - "https://www.sourcemeta.com/recursive-empty-fragment") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/recursive-empty-fragment#", - "properties": { - "foo": { "$ref": "#" } - } - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/anonymous") { - return sourcemeta::core::parse_json(R"JSON({ - "type": "integer" - })JSON"); - } else if (identifier == "https://example.com/meta/1.json") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/2.json", - "id": "https://example.com/meta/1.json" - })JSON"); - } else if (identifier == "https://example.com/meta/2.json") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/meta/2.json" - })JSON"); - } else if (identifier == "https://example.com/draft4-dedup-a") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/draft4-dedup-a", - "allOf": [ { "$ref": "draft4-dedup-common" } ], - "definitions": { - "https://example.com/draft4-dedup-common": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/draft4-dedup-common", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://example.com/draft4-dedup-b") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/draft4-dedup-b", - "allOf": [ { "$ref": "draft4-dedup-common" } ], - "definitions": { - "https://example.com/draft4-dedup-common": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/draft4-dedup-common", - "type": "string" - } - } - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_bundle_draft4, no_references_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, const_no_references_no_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_bundle_draft4, simple_with_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "id": "https://www.sourcemeta.com", - "allOf": [ { "$ref": "test-2" } ] - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "id": "https://www.sourcemeta.com", - "allOf": [ { "$ref": "test-2" } ] - } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, simple_without_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "id": "https://www.sourcemeta.com", - "allOf": [ { "$ref": "test-2" } ] - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "id": "https://www.sourcemeta.com", - "allOf": [ { "$ref": "test-2" } ] - } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, schema_not_found) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/xxx" } - } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_bundle_draft4, idempotency) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, pre_embedded) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "definitions": { - "already-embedded": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "definitions": { - "already-embedded": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, taken_definitions_entry) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" }, - "extra": { "$ref": "https://www.sourcemeta.com/test-4" } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { "foo": 1 }, - "https://www.sourcemeta.com/test-4": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x": { "foo": 1 } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" }, - "extra": { "$ref": "https://www.sourcemeta.com/test-4" } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { "foo": 1 }, - "https://www.sourcemeta.com/test-1/x": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-4": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x/x": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, allof_ref_definitions_type_no_id_no_external) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "allOf": [ { "$ref": "#/definitions/string" } ], - "definitions": { - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "allOf": [ { "$ref": "#/definitions/string" } ], - "definitions": { - "string": { "type": "string" } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, recursive) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "allOf": [ { "$ref": "https://www.sourcemeta.com/recursive" } ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "allOf": [ { "$ref": "https://www.sourcemeta.com/recursive" } ], - "definitions": { - "https://www.sourcemeta.com/recursive": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, recursive_empty_fragment) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "allOf": [ { "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#" } ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "allOf": [ { "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#" } ], - "definitions": { - "https://www.sourcemeta.com/recursive-empty-fragment#": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/recursive-empty-fragment#", - "properties": { - "foo": { "$ref": "#" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, anonymous_no_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "allOf": [ { "$ref": "https://www.sourcemeta.com/anonymous" } ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, - "http://json-schema.org/draft-04/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "allOf": [ { "$ref": "https://www.sourcemeta.com/anonymous" } ], - "definitions": { - "https://www.sourcemeta.com/anonymous": { - "id": "https://www.sourcemeta.com/anonymous", - "type": "integer" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, metaschema) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/1.json", - "type": "string" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/1.json", - "type": "string", - "definitions": { - "https://example.com/meta/1.json": { - "$schema": "https://example.com/meta/2.json", - "id": "https://example.com/meta/1.json" - }, - "https://example.com/meta/2.json": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/meta/2.json" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, relative_base_uri_without_ref) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "foo" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "foo" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, relative_base_uri_with_ref) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "common", - "allOf": [ { "$ref": "#reference" } ], - "definitions": { - "reference": { - "id": "#reference" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "common", - "allOf": [ { "$ref": "#reference" } ], - "definitions": { - "reference": { - "id": "#reference" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, hyperschema_smoke) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/hyper-schema#", - "allOf": [ - { "$ref": "http://json-schema.org/draft-04/hyper-schema#" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.is_object()); -} - -TEST(JSONSchema_bundle_draft4, hyperschema_1) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "allOf": [ - { "$ref": "http://json-schema.org/draft-04/schema#" }, - { "$ref": "http://json-schema.org/draft-04/hyper-schema#" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.defines("definitions")); - EXPECT_TRUE(document.at("definitions").is_object()); - EXPECT_EQ(document.at("definitions").size(), 2); - - EXPECT_TRUE(document.at("definitions") - .defines("http://json-schema.org/draft-04/schema#")); - EXPECT_TRUE(document.at("definitions") - .defines("http://json-schema.org/draft-04/hyper-schema#")); -} - -TEST(JSONSchema_bundle_draft4, hyperschema_ref_metaschema) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/hyper-schema#", - "allOf": [ - { "$ref": "http://json-schema.org/draft-04/schema#" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.defines("definitions")); - EXPECT_TRUE(document.at("definitions").is_object()); - EXPECT_EQ(document.at("definitions").size(), 1); - - EXPECT_TRUE(document.at("definitions") - .defines("http://json-schema.org/draft-04/schema#")); -} - -TEST(JSONSchema_bundle_draft4, standalone_ref_with_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$ref": "https://www.sourcemeta.com/test-1" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, - "http://json-schema.org/draft-04/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "allOf": [ { "$ref": "https://www.sourcemeta.com/test-1" } ], - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-1", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft4, deduplicate_embedded_from_prebundled) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/draft4-dedup-entry", - "allOf": [ - { "$ref": "draft4-dedup-a" }, - { "$ref": "draft4-dedup-b" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/draft4-dedup-entry", - "allOf": [ - { "$ref": "draft4-dedup-a" }, - { "$ref": "draft4-dedup-b" } - ], - "definitions": { - "https://example.com/draft4-dedup-a": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/draft4-dedup-a", - "allOf": [ { "$ref": "draft4-dedup-common" } ] - }, - "https://example.com/draft4-dedup-b": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/draft4-dedup-b", - "allOf": [ { "$ref": "draft4-dedup-common" } ] - }, - "https://example.com/draft4-dedup-common": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/draft4-dedup-common", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} diff --git a/test/jsonschema/jsonschema_bundle_draft6_test.cc b/test/jsonschema/jsonschema_bundle_draft6_test.cc deleted file mode 100644 index cecfed5f7..000000000 --- a/test/jsonschema/jsonschema_bundle_draft6_test.cc +++ /dev/null @@ -1,597 +0,0 @@ -#include - -#include -#include - -#include // std::string -#include // std::string_view - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://www.sourcemeta.com/test-1") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-2") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-3") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-4") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/recursive") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - })JSON"); - } else if (identifier == - "https://www.sourcemeta.com/recursive-empty-fragment") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/recursive-empty-fragment#", - "properties": { - "foo": { "$ref": "#" } - } - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/anonymous") { - return sourcemeta::core::parse_json(R"JSON({ - "type": "integer" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/trailing-hash") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/trailing-hash#", - "definitions": { - "string": { "type": "string" } - } - })JSON"); - } else if (identifier == "https://example.com/meta/1.json") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/2.json", - "$id": "https://example.com/meta/1.json" - })JSON"); - } else if (identifier == "https://example.com/meta/2.json") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://example.com/meta/2.json" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_bundle_draft6, no_references_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft6, const_no_references_no_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_bundle_draft6, simple_with_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "$id": "https://www.sourcemeta.com", - "allOf": [ { "$ref": "test-2" } ] - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "$id": "https://www.sourcemeta.com", - "allOf": [ { "$ref": "test-2" } ] - } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft6, simple_without_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "$id": "https://www.sourcemeta.com", - "allOf": [ { "$ref": "test-2" } ] - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "$id": "https://www.sourcemeta.com", - "allOf": [ { "$ref": "test-2" } ] - } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft6, schema_not_found) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/xxx" } - } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_bundle_draft6, idempotency) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft6, pre_embedded) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "definitions": { - "already-embedded": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "definitions": { - "already-embedded": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft6, taken_definitions_entry) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" }, - "extra": { "$ref": "https://www.sourcemeta.com/test-4" } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { "foo": 1 }, - "https://www.sourcemeta.com/test-4": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x": { "foo": 1 } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" }, - "extra": { "$ref": "https://www.sourcemeta.com/test-4" } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { "foo": 1 }, - "https://www.sourcemeta.com/test-1/x": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-4": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x/x": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft6, recursive) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "allOf": [ { "$ref": "https://www.sourcemeta.com/recursive" } ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "allOf": [ { "$ref": "https://www.sourcemeta.com/recursive" } ], - "definitions": { - "https://www.sourcemeta.com/recursive": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft6, recursive_empty_fragment) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "allOf": [ { "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#" } ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "allOf": [ { "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#" } ], - "definitions": { - "https://www.sourcemeta.com/recursive-empty-fragment#": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/recursive-empty-fragment#", - "properties": { - "foo": { "$ref": "#" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft6, anonymous_no_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "allOf": [ { "$ref": "https://www.sourcemeta.com/anonymous" } ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, - "http://json-schema.org/draft-06/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "allOf": [ { "$ref": "https://www.sourcemeta.com/anonymous" } ], - "definitions": { - "https://www.sourcemeta.com/anonymous": { - "$id": "https://www.sourcemeta.com/anonymous", - "type": "integer" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft6, metaschema) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/1.json", - "type": "string" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/1.json", - "type": "string", - "definitions": { - "https://example.com/meta/1.json": { - "$schema": "https://example.com/meta/2.json", - "$id": "https://example.com/meta/1.json" - }, - "https://example.com/meta/2.json": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://example.com/meta/2.json" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft6, relative_base_uri_with_ref) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "common", - "allOf": [ { "$ref": "#reference" } ], - "definitions": { - "reference": { - "$id": "#reference" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "common", - "allOf": [ { "$ref": "#reference" } ], - "definitions": { - "reference": { - "$id": "#reference" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft6, hyperschema_smoke) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/hyper-schema#", - "allOf": [ - { "$ref": "http://json-schema.org/draft-06/hyper-schema#" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.is_object()); -} - -TEST(JSONSchema_bundle_draft6, hyperschema_1) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "allOf": [ - { "$ref": "http://json-schema.org/draft-06/schema#" }, - { "$ref": "http://json-schema.org/draft-06/hyper-schema#" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.defines("definitions")); - EXPECT_TRUE(document.at("definitions").is_object()); - EXPECT_EQ(document.at("definitions").size(), 2); - - EXPECT_TRUE(document.at("definitions") - .defines("http://json-schema.org/draft-06/schema#")); - EXPECT_TRUE(document.at("definitions") - .defines("http://json-schema.org/draft-06/hyper-schema#")); -} - -TEST(JSONSchema_bundle_draft6, hyperschema_ref_metaschema) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/hyper-schema#", - "allOf": [ - { "$ref": "http://json-schema.org/draft-06/schema#" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.defines("definitions")); - EXPECT_TRUE(document.at("definitions").is_object()); - EXPECT_EQ(document.at("definitions").size(), 1); - - EXPECT_TRUE(document.at("definitions") - .defines("http://json-schema.org/draft-06/schema#")); -} - -TEST(JSONSchema_bundle_draft6, standalone_ref_with_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$ref": "https://www.sourcemeta.com/test-1" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, - "http://json-schema.org/draft-06/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "allOf": [ { "$ref": "https://www.sourcemeta.com/test-1" } ], - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft6, ref_with_fragment_to_id_with_trailing_hash) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "foo": { - "$ref": "https://www.sourcemeta.com/trailing-hash#/definitions/string" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "foo": { - "$ref": "https://www.sourcemeta.com/trailing-hash#/definitions/string" - } - }, - "definitions": { - "https://www.sourcemeta.com/trailing-hash#": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/trailing-hash#", - "definitions": { - "string": { "type": "string" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} diff --git a/test/jsonschema/jsonschema_bundle_draft7_test.cc b/test/jsonschema/jsonschema_bundle_draft7_test.cc deleted file mode 100644 index e989ead09..000000000 --- a/test/jsonschema/jsonschema_bundle_draft7_test.cc +++ /dev/null @@ -1,738 +0,0 @@ -#include - -#include -#include - -#include // std::string -#include // std::string_view - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://www.sourcemeta.com/test-1") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-2") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-3") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-4") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/recursive") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - })JSON"); - } else if (identifier == - "https://www.sourcemeta.com/recursive-empty-fragment") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/recursive-empty-fragment#", - "properties": { - "foo": { "$ref": "#" } - } - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/anonymous") { - return sourcemeta::core::parse_json(R"JSON({ - "type": "integer" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/trailing-hash") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/trailing-hash#", - "definitions": { - "string": { "type": "string" } - } - })JSON"); - } else if (identifier == "https://example.com/meta/1.json") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/2.json", - "$id": "https://example.com/meta/1.json" - })JSON"); - } else if (identifier == "https://example.com/meta/2.json") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/meta/2.json" - })JSON"); - } else if (identifier == "https://example.com/draft7-dedup-a") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-dedup-a", - "allOf": [ { "$ref": "draft7-dedup-common" } ], - "definitions": { - "https://example.com/draft7-dedup-common": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-dedup-common", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://example.com/draft7-dedup-b") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-dedup-b", - "allOf": [ { "$ref": "draft7-dedup-common" } ], - "definitions": { - "https://example.com/draft7-dedup-common": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-dedup-common", - "type": "string" - } - } - })JSON"); - } else if (identifier == "https://example.com/draft7-elevate-single") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-elevate-single", - "allOf": [ { "$ref": "draft7-elevate-nested" } ], - "definitions": { - "https://example.com/draft7-elevate-nested": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-elevate-nested", - "type": "string" - } - } - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_bundle_draft7, no_references_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, const_no_references_no_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_bundle_draft7, simple_with_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "$id": "https://www.sourcemeta.com", - "allOf": [ { "$ref": "test-2" } ] - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "$id": "https://www.sourcemeta.com", - "allOf": [ { "$ref": "test-2" } ] - } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, simple_without_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "$id": "https://www.sourcemeta.com", - "allOf": [ { "$ref": "test-2" } ] - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" }, - "bar": { - "$id": "https://www.sourcemeta.com", - "allOf": [ { "$ref": "test-2" } ] - } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, schema_not_found) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/xxx" } - } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_bundle_draft7, idempotency) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, pre_embedded) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "definitions": { - "already-embedded": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-2" } - }, - "definitions": { - "already-embedded": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-2": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-2", - "allOf": [ { "$ref": "test-3" } ] - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-1" } ] - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, taken_definitions_entry) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" }, - "extra": { "$ref": "https://www.sourcemeta.com/test-4" } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { "foo": 1 }, - "https://www.sourcemeta.com/test-4": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x": { "foo": 1 } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" }, - "extra": { "$ref": "https://www.sourcemeta.com/test-4" } - }, - "definitions": { - "https://www.sourcemeta.com/test-1": { "foo": 1 }, - "https://www.sourcemeta.com/test-1/x": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - }, - "https://www.sourcemeta.com/test-4": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x": { "foo": 1 }, - "https://www.sourcemeta.com/test-4/x/x/x": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-4", - "type": "boolean" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, recursive) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ { "$ref": "https://www.sourcemeta.com/recursive" } ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ { "$ref": "https://www.sourcemeta.com/recursive" } ], - "definitions": { - "https://www.sourcemeta.com/recursive": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, recursive_empty_fragment) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ { "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#" } ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ { "$ref": "https://www.sourcemeta.com/recursive-empty-fragment#" } ], - "definitions": { - "https://www.sourcemeta.com/recursive-empty-fragment#": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/recursive-empty-fragment#", - "properties": { - "foo": { "$ref": "#" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, anonymous_no_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "allOf": [ { "$ref": "https://www.sourcemeta.com/anonymous" } ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, - "http://json-schema.org/draft-07/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "allOf": [ { "$ref": "https://www.sourcemeta.com/anonymous" } ], - "definitions": { - "https://www.sourcemeta.com/anonymous": { - "$id": "https://www.sourcemeta.com/anonymous", - "type": "integer" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, metaschema) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/1.json", - "type": "string" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com/meta/1.json", - "type": "string", - "definitions": { - "https://example.com/meta/1.json": { - "$schema": "https://example.com/meta/2.json", - "$id": "https://example.com/meta/1.json" - }, - "https://example.com/meta/2.json": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/meta/2.json" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, relative_base_uri_with_ref) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "common", - "allOf": [ { "$ref": "#reference" } ], - "definitions": { - "reference": { - "$id": "#reference" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "common", - "allOf": [ { "$ref": "#reference" } ], - "definitions": { - "reference": { - "$id": "#reference" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, hyperschema_smoke) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/hyper-schema#", - "allOf": [ - { "$ref": "http://json-schema.org/draft-07/hyper-schema#" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.is_object()); -} - -TEST(JSONSchema_bundle_draft7, hyperschema_1) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ - { "$ref": "http://json-schema.org/draft-07/schema#" }, - { "$ref": "http://json-schema.org/draft-07/hyper-schema#" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.defines("definitions")); - EXPECT_TRUE(document.at("definitions").is_object()); - EXPECT_EQ(document.at("definitions").size(), 3); - - EXPECT_TRUE(document.at("definitions") - .defines("http://json-schema.org/draft-07/schema#")); - EXPECT_TRUE(document.at("definitions") - .defines("http://json-schema.org/draft-07/links#")); - EXPECT_TRUE(document.at("definitions") - .defines("http://json-schema.org/draft-07/hyper-schema#")); -} - -TEST(JSONSchema_bundle_draft7, hyperschema_ref_metaschema) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/hyper-schema#", - "allOf": [ - { "$ref": "http://json-schema.org/draft-07/schema#" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - EXPECT_TRUE(document.defines("definitions")); - EXPECT_TRUE(document.at("definitions").is_object()); - EXPECT_EQ(document.at("definitions").size(), 1); - - EXPECT_TRUE(document.at("definitions") - .defines("http://json-schema.org/draft-07/schema#")); -} - -TEST(JSONSchema_bundle_draft7, bundle_to_defs) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "https://www.sourcemeta.com/recursive" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, "", "", - sourcemeta::core::Pointer{"$defs"}); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "https://www.sourcemeta.com/recursive", - "$defs": { - "https://www.sourcemeta.com/recursive": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/recursive", - "properties": { - "foo": { "$ref": "#" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, standalone_ref_with_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$ref": "https://www.sourcemeta.com/test-1" - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, - "http://json-schema.org/draft-07/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "allOf": [ { "$ref": "https://www.sourcemeta.com/test-1" } ], - "definitions": { - "https://www.sourcemeta.com/test-1": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, ref_with_fragment_to_id_with_trailing_hash) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "foo": { - "$ref": "https://www.sourcemeta.com/trailing-hash#/definitions/string" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "foo": { - "$ref": "https://www.sourcemeta.com/trailing-hash#/definitions/string" - } - }, - "definitions": { - "https://www.sourcemeta.com/trailing-hash#": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://www.sourcemeta.com/trailing-hash#", - "definitions": { - "string": { "type": "string" } - } - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, deduplicate_embedded_from_prebundled) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-dedup-entry", - "allOf": [ - { "$ref": "draft7-dedup-a" }, - { "$ref": "draft7-dedup-b" } - ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-dedup-entry", - "allOf": [ - { "$ref": "draft7-dedup-a" }, - { "$ref": "draft7-dedup-b" } - ], - "definitions": { - "https://example.com/draft7-dedup-a": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-dedup-a", - "allOf": [ { "$ref": "draft7-dedup-common" } ] - }, - "https://example.com/draft7-dedup-b": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-dedup-b", - "allOf": [ { "$ref": "draft7-dedup-common" } ] - }, - "https://example.com/draft7-dedup-common": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-dedup-common", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle_draft7, elevate_embedded_from_single_prebundled) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-elevate-entry", - "allOf": [ { "$ref": "draft7-elevate-single" } ] - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-elevate-entry", - "allOf": [ { "$ref": "draft7-elevate-single" } ], - "definitions": { - "https://example.com/draft7-elevate-single": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-elevate-single", - "allOf": [ { "$ref": "draft7-elevate-nested" } ] - }, - "https://example.com/draft7-elevate-nested": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/draft7-elevate-nested", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} diff --git a/test/jsonschema/jsonschema_bundle_test.cc b/test/jsonschema/jsonschema_bundle_test.cc deleted file mode 100644 index d125befc0..000000000 --- a/test/jsonschema/jsonschema_bundle_test.cc +++ /dev/null @@ -1,433 +0,0 @@ -#include - -#include -#include - -#include // std::string -#include // std::string_view - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://www.sourcemeta.com/test-1") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-2") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-3") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-4" } ] - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-3-top-level-ref") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3-top-level-ref", - "$ref": "test-4" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-4") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-4", - "type": "string" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/no-dialect") { - return sourcemeta::core::parse_json(R"JSON({ - "foo": 1 - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/array") { - return sourcemeta::core::parse_json(R"JSON([ - "foo", "bar", "baz" - ])JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_bundle, multiple_refs) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$ref": "https://www.sourcemeta.com/test-3" - }, - "bar": { - "$ref": "https://www.sourcemeta.com/test-1" - } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$ref": "https://www.sourcemeta.com/test-3" - }, - "bar": { - "$ref": "https://www.sourcemeta.com/test-1" - } - }, - "$defs": { - "https://www.sourcemeta.com/test-4": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-4", - "type": "string" - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-4" } ] - }, - "https://www.sourcemeta.com/test-1": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle, across_dialects) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "$ref": "https://www.sourcemeta.com/test-2" } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "$ref": "https://www.sourcemeta.com/test-2" }, - "$defs": { - "https://www.sourcemeta.com/test-2": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-4" } ] - }, - "https://www.sourcemeta.com/test-4": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-4", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle, across_dialects_top_level_ref_draft) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "$ref": "https://www.sourcemeta.com/test-3-top-level-ref" } - })JSON"); - - try { - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaReferenceObjectResourceError &error) { - EXPECT_EQ(error.identifier(), - "https://www.sourcemeta.com/test-3-top-level-ref"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_bundle, across_dialects_from_top_level_ref_draft_absolute) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "https://www.sourcemeta.com/test-2" - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaError); -} - -TEST(JSONSchema_bundle, across_dialects_from_top_level_ref_draft_relative) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "test-2" - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaError); -} - -TEST(JSONSchema_bundle, across_dialects_const) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "$ref": "https://www.sourcemeta.com/test-2" } - })JSON"); - - const auto result = sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "$ref": "https://www.sourcemeta.com/test-2" }, - "$defs": { - "https://www.sourcemeta.com/test-2": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-4" } ] - }, - "https://www.sourcemeta.com/test-4": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-4", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_bundle, with_default_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "$ref": "test-2" } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, "", - "https://www.sourcemeta.com/default"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/default", - "items": { "$ref": "test-2" }, - "$defs": { - "https://www.sourcemeta.com/test-2": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-4" } ] - }, - "https://www.sourcemeta.com/test-4": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-4", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle, with_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" } - } - })JSON"); - - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, - "https://json-schema.org/draft/2020-12/schema"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" } - }, - "$defs": { - "https://www.sourcemeta.com/test-1": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - } - } - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle, without_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" } - } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_bundle, target_no_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/no-dialect" } - } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaReferenceError); -} - -TEST(JSONSchema_bundle, target_array) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/array" } - } - })JSON"); - - EXPECT_THROW(sourcemeta::core::bundle( - document, sourcemeta::core::schema_walker, test_resolver), - sourcemeta::core::SchemaReferenceError); -} - -TEST(JSONSchema_bundle, custom_paths_no_external) { - auto document{sourcemeta::core::parse_json(R"JSON({ - "wrapper": { - "$ref": "#/common/test" - }, - "common": { - "test": { - "$ref": "#/common/with-id" - }, - "with-id": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - } - } - })JSON")}; - - const sourcemeta::core::Pointer path1{"wrapper"}; - const sourcemeta::core::Pointer path2{"common", "test"}; - const sourcemeta::core::Pointer path3{"common", "with-id"}; - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, - "https://json-schema.org/draft/2020-12/schema", "", - sourcemeta::core::Pointer{"components"}, - { - sourcemeta::core::to_weak_pointer(path1), - sourcemeta::core::to_weak_pointer(path2), - sourcemeta::core::to_weak_pointer(path3), - }); - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "wrapper": { - "$ref": "#/common/test" - }, - "common": { - "test": { - "$ref": "#/common/with-id" - }, - "with-id": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - } - } - })JSON")}; - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_bundle, custom_paths_with_externals) { - auto document{sourcemeta::core::parse_json(R"JSON({ - "wrapper": { - "$ref": "#/common/test" - }, - "common": { - "test": { - "$ref": "#/common/with-id" - }, - "with-id": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "test-2" - } - } - })JSON")}; - - const sourcemeta::core::Pointer path1{"wrapper"}; - const sourcemeta::core::Pointer path2{"common", "test"}; - const sourcemeta::core::Pointer path3{"common", "with-id"}; - sourcemeta::core::bundle(document, sourcemeta::core::schema_walker, - test_resolver, - "https://json-schema.org/draft/2020-12/schema", "", - sourcemeta::core::Pointer{"components"}, - { - sourcemeta::core::to_weak_pointer(path1), - sourcemeta::core::to_weak_pointer(path2), - sourcemeta::core::to_weak_pointer(path3), - }); - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "wrapper": { - "$ref": "#/common/test" - }, - "common": { - "test": { - "$ref": "#/common/with-id" - }, - "with-id": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "test-2" - } - }, - "components": { - "https://www.sourcemeta.com/test-2": { - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - }, - "https://www.sourcemeta.com/test-3": { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-4" } ] - }, - "https://www.sourcemeta.com/test-4": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-4", - "type": "string" - } - } - })JSON")}; - - EXPECT_EQ(document, expected); -} diff --git a/test/jsonschema/jsonschema_dependencies_test.cc b/test/jsonschema/jsonschema_dependencies_test.cc deleted file mode 100644 index 6dcfd5961..000000000 --- a/test/jsonschema/jsonschema_dependencies_test.cc +++ /dev/null @@ -1,537 +0,0 @@ -#include - -#include -#include - -#include // std::string -#include // std::string_view -#include // std::tuple -#include // std::vector - -#define EXPECT_DEPENDENCY(expected_traces, expected_index, expected_origin, \ - expected_pointer, expected_target) \ - EXPECT_EQ(std::get<0>((expected_traces).at(expected_index)), \ - (expected_origin)); \ - EXPECT_EQ(sourcemeta::core::to_string( \ - std::get<1>((expected_traces).at(expected_index))), \ - (expected_pointer)); \ - EXPECT_EQ(std::get<2>((expected_traces).at(expected_index)), \ - (expected_target)); - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://www.sourcemeta.com/test-1") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/test-1", - "type": "string" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-2") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://www.sourcemeta.com/test-2", - "$ref": "test-3" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-3") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3", - "allOf": [ { "$ref": "test-4" } ] - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-3-top-level-ref") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://www.sourcemeta.com/test-3-top-level-ref", - "$ref": "test-4" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/test-4") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://www.sourcemeta.com/test-4", - "type": "string" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/no-dialect") { - return sourcemeta::core::parse_json(R"JSON({ - "foo": 1 - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/array") { - return sourcemeta::core::parse_json(R"JSON([ - "foo", "bar", "baz" - ])JSON"); - } else if (identifier == "https://www.sourcemeta.com/sibling-a") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/sibling-a", - "$ref": "shared" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/sibling-b") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/sibling-b", - "$ref": "shared" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/shared") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/shared", - "$ref": "deep" - })JSON"); - } else if (identifier == "https://www.sourcemeta.com/deep") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://www.sourcemeta.com/deep", - "type": "string" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_dependencies, multiple_refs) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$ref": "https://www.sourcemeta.com/test-3" - }, - "bar": { - "$ref": "https://www.sourcemeta.com/test-1" - } - } - })JSON"); - - std::vector> - traces; - - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [&traces](const auto &origin, const auto &pointer, const auto &target, - const auto &) { - traces.emplace_back(origin, sourcemeta::core::to_pointer(pointer), - target); - }); - - EXPECT_EQ(traces.size(), 3); - - EXPECT_DEPENDENCY(traces, 0, "https://www.example.com", - "/properties/bar/$ref", - "https://www.sourcemeta.com/test-1"); - EXPECT_DEPENDENCY(traces, 1, "https://www.example.com", - "/properties/foo/$ref", - "https://www.sourcemeta.com/test-3"); - EXPECT_DEPENDENCY(traces, 2, "https://www.sourcemeta.com/test-3", - "/allOf/0/$ref", "https://www.sourcemeta.com/test-4"); -} - -TEST(JSONSchema_dependencies, across_dialects) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "$ref": "https://www.sourcemeta.com/test-2" } - })JSON"); - - std::vector> - traces; - - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [&traces](const auto &origin, const auto &pointer, const auto &target, - const auto &) { - traces.emplace_back(origin, sourcemeta::core::to_pointer(pointer), - target); - }); - - EXPECT_EQ(traces.size(), 3); - - EXPECT_DEPENDENCY(traces, 0, "https://www.example.com", "/items/$ref", - "https://www.sourcemeta.com/test-2"); - EXPECT_DEPENDENCY(traces, 1, "https://www.sourcemeta.com/test-2", "/$ref", - "https://www.sourcemeta.com/test-3"); - EXPECT_DEPENDENCY(traces, 2, "https://www.sourcemeta.com/test-3", - "/allOf/0/$ref", "https://www.sourcemeta.com/test-4"); -} - -TEST(JSONSchema_dependencies, across_dialects_top_level_ref_draft) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "$ref": "https://www.sourcemeta.com/test-3-top-level-ref" } - })JSON"); - - std::vector> - traces; - - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [&traces](const auto &origin, const auto &pointer, const auto &target, - const auto &) { - traces.emplace_back(origin, sourcemeta::core::to_pointer(pointer), - target); - }); - - EXPECT_EQ(traces.size(), 2); - - EXPECT_DEPENDENCY(traces, 0, "https://www.example.com", "/items/$ref", - "https://www.sourcemeta.com/test-3-top-level-ref"); - EXPECT_DEPENDENCY(traces, 1, - "https://www.sourcemeta.com/test-3-top-level-ref", "/$ref", - "https://www.sourcemeta.com/test-4"); -} - -TEST(JSONSchema_dependencies, - across_dialects_from_top_level_ref_draft_absolute) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "https://www.sourcemeta.com/test-4" - })JSON"); - - std::vector> - traces; - - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [&traces](const auto &origin, const auto &pointer, const auto &target, - const auto &) { - traces.emplace_back(origin, sourcemeta::core::to_pointer(pointer), - target); - }); - - EXPECT_EQ(traces.size(), 1); - - EXPECT_DEPENDENCY(traces, 0, "", "/$ref", - "https://www.sourcemeta.com/test-4"); -} - -TEST(JSONSchema_dependencies, - across_dialects_from_top_level_ref_draft_relative) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "test-4" - })JSON"); - - std::vector> - traces; - - EXPECT_THROW(sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [&traces](const auto &origin, const auto &pointer, - const auto &target, const auto &) { - traces.emplace_back( - origin, sourcemeta::core::to_pointer(pointer), target); - }), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_dependencies, - across_dialects_from_top_level_ref_draft_with_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$ref": "https://www.sourcemeta.com/test-4" - })JSON"); - - std::vector> - traces; - - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [&traces](const auto &origin, const auto &pointer, const auto &target, - const auto &) { - traces.emplace_back(origin, sourcemeta::core::to_pointer(pointer), - target); - }, - "http://json-schema.org/draft-07/schema#"); - - EXPECT_EQ(traces.size(), 1); - - EXPECT_DEPENDENCY(traces, 0, "", "/$ref", - "https://www.sourcemeta.com/test-4"); -} - -TEST(JSONSchema_dependencies, across_dialects_const) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "$ref": "https://www.sourcemeta.com/test-2" } - })JSON"); - - std::vector> - traces; - - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [&traces](const auto &origin, const auto &pointer, const auto &target, - const auto &) { - traces.emplace_back(origin, sourcemeta::core::to_pointer(pointer), - target); - }); - - EXPECT_EQ(traces.size(), 3); - - EXPECT_DEPENDENCY(traces, 0, "https://www.example.com", "/items/$ref", - "https://www.sourcemeta.com/test-2"); - EXPECT_DEPENDENCY(traces, 1, "https://www.sourcemeta.com/test-2", "/$ref", - "https://www.sourcemeta.com/test-3"); - EXPECT_DEPENDENCY(traces, 2, "https://www.sourcemeta.com/test-3", - "/allOf/0/$ref", "https://www.sourcemeta.com/test-4"); -} - -TEST(JSONSchema_dependencies, with_default_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "$ref": "test-2" } - })JSON"); - - std::vector> - traces; - - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [&traces](const auto &origin, const auto &pointer, const auto &target, - const auto &) { - traces.emplace_back(origin, sourcemeta::core::to_pointer(pointer), - target); - }, - "", "https://www.sourcemeta.com/default"); - - EXPECT_EQ(traces.size(), 3); - - EXPECT_DEPENDENCY(traces, 0, "https://www.sourcemeta.com/default", - "/items/$ref", "https://www.sourcemeta.com/test-2"); - EXPECT_DEPENDENCY(traces, 1, "https://www.sourcemeta.com/test-2", "/$ref", - "https://www.sourcemeta.com/test-3"); - EXPECT_DEPENDENCY(traces, 2, "https://www.sourcemeta.com/test-3", - "/allOf/0/$ref", "https://www.sourcemeta.com/test-4"); -} - -TEST(JSONSchema_dependencies, with_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" } - } - })JSON"); - - std::vector> - traces; - - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [&traces](const auto &origin, const auto &pointer, const auto &target, - const auto &) { - traces.emplace_back(origin, sourcemeta::core::to_pointer(pointer), - target); - }, - "https://json-schema.org/draft/2020-12/schema"); - - EXPECT_EQ(traces.size(), 1); - - EXPECT_DEPENDENCY(traces, 0, "", "/properties/foo/$ref", - "https://www.sourcemeta.com/test-1"); -} - -TEST(JSONSchema_dependencies, without_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" } - } - })JSON"); - - EXPECT_THROW( - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [](const auto &, const auto &, const auto &, const auto &) {}), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_dependencies, target_no_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/no-dialect" } - } - })JSON"); - - EXPECT_THROW( - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [](const auto &, const auto &, const auto &, const auto &) {}), - sourcemeta::core::SchemaReferenceError); -} - -TEST(JSONSchema_dependencies, target_array) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/array" } - } - })JSON"); - - EXPECT_THROW( - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [](const auto &, const auto &, const auto &, const auto &) {}), - sourcemeta::core::SchemaReferenceError); -} - -TEST(JSONSchema_dependencies, custom_paths_no_external) { - auto document{sourcemeta::core::parse_json(R"JSON({ - "wrapper": { - "$ref": "#/common/test" - }, - "common": { - "test": { - "$ref": "#/common/with-id" - }, - "with-id": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - } - } - })JSON")}; - - std::vector> - traces; - - const sourcemeta::core::Pointer path1{"wrapper"}; - const sourcemeta::core::Pointer path2{"common", "test"}; - const sourcemeta::core::Pointer path3{"common", "with-id"}; - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [&traces](const auto &origin, const auto &pointer, const auto &target, - const auto &) { - traces.emplace_back(origin, sourcemeta::core::to_pointer(pointer), - target); - }, - "https://json-schema.org/draft/2020-12/schema", "", - { - sourcemeta::core::to_weak_pointer(path1), - sourcemeta::core::to_weak_pointer(path2), - sourcemeta::core::to_weak_pointer(path3), - }); - - EXPECT_EQ(traces.size(), 0); -} - -TEST(JSONSchema_dependencies, custom_paths_with_externals) { - auto document{sourcemeta::core::parse_json(R"JSON({ - "wrapper": { - "$ref": "#/common/test" - }, - "common": { - "test": { - "$ref": "#/common/with-id" - }, - "with-id": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "test-2" - } - } - })JSON")}; - - std::vector> - traces; - - const sourcemeta::core::Pointer path1{"wrapper"}; - const sourcemeta::core::Pointer path2{"common", "test"}; - const sourcemeta::core::Pointer path3{"common", "with-id"}; - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [&traces](const auto &origin, const auto &pointer, const auto &target, - const auto &) { - traces.emplace_back(origin, sourcemeta::core::to_pointer(pointer), - target); - }, - "https://json-schema.org/draft/2020-12/schema", "", - { - sourcemeta::core::to_weak_pointer(path1), - sourcemeta::core::to_weak_pointer(path2), - sourcemeta::core::to_weak_pointer(path3), - }); - - EXPECT_EQ(traces.size(), 3); - - // TODO: We should be getting the nested identifier here - EXPECT_DEPENDENCY(traces, 0, "", "/common/with-id/$ref", - "https://www.sourcemeta.com/test-2"); - EXPECT_DEPENDENCY(traces, 1, "https://www.sourcemeta.com/test-2", "/$ref", - "https://www.sourcemeta.com/test-3"); - EXPECT_DEPENDENCY(traces, 2, "https://www.sourcemeta.com/test-3", - "/allOf/0/$ref", "https://www.sourcemeta.com/test-4"); -} - -TEST(JSONSchema_dependencies, multiple_refs_to_same_target_within_schema) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "anyOf": [ - { - "properties": { - "foo": { "$ref": "https://www.sourcemeta.com/test-1" } - } - }, - { - "properties": { - "bar": { "$ref": "https://www.sourcemeta.com/test-1" } - } - }, - { - "properties": { - "baz": { "$ref": "https://www.sourcemeta.com/test-1" } - } - } - ] - })JSON"); - - std::vector> - traces; - - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [&traces](const auto &origin, const auto &pointer, const auto &target, - const auto &) { - traces.emplace_back(origin, sourcemeta::core::to_pointer(pointer), - target); - }); - - EXPECT_EQ(traces.size(), 1); - - EXPECT_DEPENDENCY(traces, 0, "https://www.example.com", - "/anyOf/0/properties/foo/$ref", - "https://www.sourcemeta.com/test-1"); -} - -TEST(JSONSchema_dependencies, sibling_schemas_with_shared_dependency) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "a": { "$ref": "https://www.sourcemeta.com/sibling-a" }, - "b": { "$ref": "https://www.sourcemeta.com/sibling-b" } - } - })JSON"); - - std::vector> - traces; - - sourcemeta::core::dependencies( - document, sourcemeta::core::schema_walker, test_resolver, - [&traces](const auto &origin, const auto &pointer, const auto &target, - const auto &) { - traces.emplace_back(origin, sourcemeta::core::to_pointer(pointer), - target); - }); - - EXPECT_EQ(traces.size(), 4); - - EXPECT_DEPENDENCY(traces, 0, "https://www.example.com", "/properties/a/$ref", - "https://www.sourcemeta.com/sibling-a"); - EXPECT_DEPENDENCY(traces, 1, "https://www.example.com", "/properties/b/$ref", - "https://www.sourcemeta.com/sibling-b"); - EXPECT_DEPENDENCY(traces, 2, "https://www.sourcemeta.com/sibling-a", "/$ref", - "https://www.sourcemeta.com/shared"); - EXPECT_DEPENDENCY(traces, 3, "https://www.sourcemeta.com/shared", "/$ref", - "https://www.sourcemeta.com/deep"); -} diff --git a/test/jsonschema/jsonschema_dialect_2019_09_test.cc b/test/jsonschema/jsonschema_dialect_2019_09_test.cc deleted file mode 100644 index 6a63c550c..000000000 --- a/test/jsonschema/jsonschema_dialect_2019_09_test.cc +++ /dev/null @@ -1,103 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_dialect_2019_09, jsonschema_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2019-09/schema"); -} - -TEST(JSONSchema_dialect_2019_09, jsonschema_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/hyper-schema", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2019-09/hyper-schema"); -} - -TEST(JSONSchema_dialect_2019_09, jsonschema_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/links" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2019-09/links"); -} - -TEST(JSONSchema_dialect_2019_09, jsonschema_output) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/output/schema" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2019-09/output/schema"); -} - -TEST(JSONSchema_dialect_2019_09, jsonschema_output_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/output/hyper-schema" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, - "https://json-schema.org/draft/2019-09/output/hyper-schema"); -} - -TEST(JSONSchema_dialect_2019_09, jsonschema_meta_applicator) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/applicator" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2019-09/meta/applicator"); -} - -TEST(JSONSchema_dialect_2019_09, jsonschema_meta_content) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/content" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2019-09/meta/content"); -} - -TEST(JSONSchema_dialect_2019_09, jsonschema_meta_core) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/core" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2019-09/meta/core"); -} - -TEST(JSONSchema_dialect_2019_09, jsonschema_meta_format) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/format" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2019-09/meta/format"); -} - -TEST(JSONSchema_dialect_2019_09, jsonschema_meta_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/hyper-schema" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2019-09/meta/hyper-schema"); -} - -TEST(JSONSchema_dialect_2019_09, jsonschema_meta_meta_data) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/meta-data" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2019-09/meta/meta-data"); -} - -TEST(JSONSchema_dialect_2019_09, jsonschema_meta_validation) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/meta/validation" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2019-09/meta/validation"); -} diff --git a/test/jsonschema/jsonschema_dialect_2020_12_test.cc b/test/jsonschema/jsonschema_dialect_2020_12_test.cc deleted file mode 100644 index c74961350..000000000 --- a/test/jsonschema/jsonschema_dialect_2020_12_test.cc +++ /dev/null @@ -1,112 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_dialect_2020_12, jsonschema_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_dialect_2020_12, jsonschema_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/hyper-schema", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/hyper-schema"); -} - -TEST(JSONSchema_dialect_2020_12, jsonschema_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/links" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/links"); -} - -TEST(JSONSchema_dialect_2020_12, jsonschema_output) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/output/schema" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/output/schema"); -} - -TEST(JSONSchema_dialect_2020_12, jsonschema_meta_applicator) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/applicator" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/meta/applicator"); -} - -TEST(JSONSchema_dialect_2020_12, jsonschema_meta_content) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/content" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/meta/content"); -} - -TEST(JSONSchema_dialect_2020_12, jsonschema_meta_core) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/core" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/meta/core"); -} - -TEST(JSONSchema_dialect_2020_12, jsonschema_meta_format_annotation) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/format-annotation" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, - "https://json-schema.org/draft/2020-12/meta/format-annotation"); -} - -TEST(JSONSchema_dialect_2020_12, jsonschema_meta_format_assertion) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/format-assertion" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, - "https://json-schema.org/draft/2020-12/meta/format-assertion"); -} - -TEST(JSONSchema_dialect_2020_12, jsonschema_meta_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/hyper-schema" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/meta/hyper-schema"); -} - -TEST(JSONSchema_dialect_2020_12, jsonschema_meta_meta_data) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/meta-data" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/meta/meta-data"); -} - -TEST(JSONSchema_dialect_2020_12, jsonschema_meta_unevaluated) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/unevaluated" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/meta/unevaluated"); -} - -TEST(JSONSchema_dialect_2020_12, jsonschema_meta_validation) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/meta/validation" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/meta/validation"); -} diff --git a/test/jsonschema/jsonschema_dialect_draft0_test.cc b/test/jsonschema/jsonschema_dialect_draft0_test.cc deleted file mode 100644 index f90b2190c..000000000 --- a/test/jsonschema/jsonschema_dialect_draft0_test.cc +++ /dev/null @@ -1,38 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_dialect_draft0, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/hyper-schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-00/hyper-schema#"); -} - -TEST(JSONSchema_dialect_draft0, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-00/schema#"); -} - -TEST(JSONSchema_dialect_draft0, jsonschema_draft_jsonref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/json-ref#" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-00/json-ref#"); -} - -TEST(JSONSchema_dialect_draft0, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/links#" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-00/links#"); -} diff --git a/test/jsonschema/jsonschema_dialect_draft1_test.cc b/test/jsonschema/jsonschema_dialect_draft1_test.cc deleted file mode 100644 index 058e164c6..000000000 --- a/test/jsonschema/jsonschema_dialect_draft1_test.cc +++ /dev/null @@ -1,38 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_dialect_draft1, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/hyper-schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-01/hyper-schema#"); -} - -TEST(JSONSchema_dialect_draft1, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-01/schema#"); -} - -TEST(JSONSchema_dialect_draft1, jsonschema_draft_jsonref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/json-ref#" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-01/json-ref#"); -} - -TEST(JSONSchema_dialect_draft1, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/links#" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-01/links#"); -} diff --git a/test/jsonschema/jsonschema_dialect_draft2_test.cc b/test/jsonschema/jsonschema_dialect_draft2_test.cc deleted file mode 100644 index 0d337fd60..000000000 --- a/test/jsonschema/jsonschema_dialect_draft2_test.cc +++ /dev/null @@ -1,38 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_dialect_draft2, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/hyper-schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-02/hyper-schema#"); -} - -TEST(JSONSchema_dialect_draft2, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-02/schema#"); -} - -TEST(JSONSchema_dialect_draft2, jsonschema_draft_jsonref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/json-ref#" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-02/json-ref#"); -} - -TEST(JSONSchema_dialect_draft2, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/links#" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-02/links#"); -} diff --git a/test/jsonschema/jsonschema_dialect_draft3_test.cc b/test/jsonschema/jsonschema_dialect_draft3_test.cc deleted file mode 100644 index f8ba0ede2..000000000 --- a/test/jsonschema/jsonschema_dialect_draft3_test.cc +++ /dev/null @@ -1,38 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_dialect_draft3, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/hyper-schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-03/hyper-schema#"); -} - -TEST(JSONSchema_dialect_draft3, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-03/schema#"); -} - -TEST(JSONSchema_dialect_draft3, jsonschema_draft_jsonref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/json-ref#" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-03/json-ref#"); -} - -TEST(JSONSchema_dialect_draft3, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/links#" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-03/links#"); -} diff --git a/test/jsonschema/jsonschema_dialect_draft4_test.cc b/test/jsonschema/jsonschema_dialect_draft4_test.cc deleted file mode 100644 index 1f9e77141..000000000 --- a/test/jsonschema/jsonschema_dialect_draft4_test.cc +++ /dev/null @@ -1,30 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_dialect_draft4, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/hyper-schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-04/hyper-schema#"); -} - -TEST(JSONSchema_dialect_draft4, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-04/schema#"); -} - -TEST(JSONSchema_dialect_draft4, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/links#" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-04/links#"); -} diff --git a/test/jsonschema/jsonschema_dialect_draft6_test.cc b/test/jsonschema/jsonschema_dialect_draft6_test.cc deleted file mode 100644 index 1e25211f2..000000000 --- a/test/jsonschema/jsonschema_dialect_draft6_test.cc +++ /dev/null @@ -1,30 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_dialect_draft6, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/hyper-schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-06/hyper-schema#"); -} - -TEST(JSONSchema_dialect_draft6, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-06/schema#"); -} - -TEST(JSONSchema_dialect_draft6, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/links#" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-06/links#"); -} diff --git a/test/jsonschema/jsonschema_dialect_draft7_test.cc b/test/jsonschema/jsonschema_dialect_draft7_test.cc deleted file mode 100644 index e25fa5f14..000000000 --- a/test/jsonschema/jsonschema_dialect_draft7_test.cc +++ /dev/null @@ -1,38 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_dialect_draft7, jsonschema_draft_hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/hyper-schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-07/hyper-schema#"); -} - -TEST(JSONSchema_dialect_draft7, jsonschema_draft_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-07/schema#"); -} - -TEST(JSONSchema_dialect_draft7, jsonschema_draft_links) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/links#" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-07/links#"); -} - -TEST(JSONSchema_dialect_draft7, jsonschema_draft_hyperschema_output) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/hyper-schema-output" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-07/hyper-schema-output"); -} diff --git a/test/jsonschema/jsonschema_dialect_test.cc b/test/jsonschema/jsonschema_dialect_test.cc deleted file mode 100644 index e53ede911..000000000 --- a/test/jsonschema/jsonschema_dialect_test.cc +++ /dev/null @@ -1,105 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_dialect, dialect_true) { - const sourcemeta::core::JSON document{true}; - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_TRUE(dialect.empty()); -} - -TEST(JSONSchema_dialect, dialect_false) { - const sourcemeta::core::JSON document{false}; - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_TRUE(dialect.empty()); -} - -TEST(JSONSchema_dialect, dialect_empty_object) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_TRUE(dialect.empty()); -} - -TEST(JSONSchema_dialect, dialect_empty_object_with_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto dialect{sourcemeta::core::dialect( - document, "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_dialect, override_takes_precedence_over_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "x-sourcemeta-dialect-override-subschema": - "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_dialect, override_without_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "x-sourcemeta-dialect-override-subschema": - "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_dialect, override_takes_precedence_over_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "x-sourcemeta-dialect-override-subschema": - "http://json-schema.org/draft-04/schema#" - })JSON"); - const auto dialect{sourcemeta::core::dialect( - document, "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_EQ(dialect, "http://json-schema.org/draft-04/schema#"); -} - -TEST(JSONSchema_dialect, override_non_string_falls_back_to_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "x-sourcemeta-dialect-override-subschema": 42 - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_dialect, override_null_falls_back_to_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "x-sourcemeta-dialect-override-subschema": null - })JSON"); - const auto dialect{sourcemeta::core::dialect( - document, "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_dialect, override_object_falls_back_to_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "x-sourcemeta-dialect-override-subschema": { - "value": "http://json-schema.org/draft-04/schema#" - } - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_dialect, override_empty_string_falls_back_to_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "x-sourcemeta-dialect-override-subschema": "" - })JSON"); - const auto dialect{sourcemeta::core::dialect(document)}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_dialect, override_empty_string_falls_back_to_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "x-sourcemeta-dialect-override-subschema": "" - })JSON"); - const auto dialect{sourcemeta::core::dialect( - document, "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_EQ(dialect, "https://json-schema.org/draft/2020-12/schema"); -} diff --git a/test/jsonschema/jsonschema_error_test.cc b/test/jsonschema/jsonschema_error_test.cc deleted file mode 100644 index 5df4b9e41..000000000 --- a/test/jsonschema/jsonschema_error_test.cc +++ /dev/null @@ -1,27 +0,0 @@ -#include - -#include - -#include // std::exception -#include // std::string -#include // std::is_base_of_v - -TEST(JSONSchema, schema_error_throw) { - static_assert( - std::is_base_of_v, - "Must subclass std::exception"); - auto exception{sourcemeta::core::SchemaError("My error")}; - EXPECT_THROW(throw exception, sourcemeta::core::SchemaError); - EXPECT_EQ(std::string{exception.what()}, "My error"); -} - -TEST(JSONSchema, resolution_error_throw) { - static_assert(std::is_base_of_v, - "Must subclass std::exception"); - auto exception{sourcemeta::core::SchemaResolutionError( - "https://sourcemeta.com/test", "My error")}; - EXPECT_THROW(throw exception, sourcemeta::core::SchemaResolutionError); - EXPECT_EQ(std::string{exception.what()}, "My error"); - EXPECT_EQ(exception.identifier(), "https://sourcemeta.com/test"); -} diff --git a/test/jsonschema/jsonschema_format_test.cc b/test/jsonschema/jsonschema_format_test.cc deleted file mode 100644 index de5cbd1ef..000000000 --- a/test/jsonschema/jsonschema_format_test.cc +++ /dev/null @@ -1,471 +0,0 @@ -#include - -#include - -#include - -TEST(JSONSchema_format, example_1) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "title": "My example schema", - "type": "object", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "My example schema", - "type": "object" -})JSON"); -} - -TEST(JSONSchema_format, example_2) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "default": 1, - "$ref": "other", - "x-foo": [ "bar", "baz" ], - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "default": 1, - "x-foo": [ "bar", "baz" ], - "$ref": "other" -})JSON"); -} - -TEST(JSONSchema_format, nested_objects) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "type": "object", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "name": { - "type": "string", - "description": "The name", - "title": "Name" - } - } - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "name": { - "title": "Name", - "description": "The name", - "type": "string" - } - } -})JSON"); -} - -TEST(JSONSchema_format, no_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "type": "string", - "description": "test" - })JSON"); - - EXPECT_THROW(sourcemeta::core::format(document, - sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_format, no_dialect_with_default) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "type": "string", - "description": "test" - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema"); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "description": "test", - "type": "string" -})JSON"); -} - -TEST(JSONSchema_format, properties_container_not_reordered) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "minimum": { "description": "min", "type": "string" }, - "maximum": { "description": "max", "type": "number" }, - "pattern": { "description": "pat", "type": "boolean" } - } - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "minimum": { - "description": "min", - "type": "string" - }, - "maximum": { - "description": "max", - "type": "number" - }, - "pattern": { - "description": "pat", - "type": "boolean" - } - } -})JSON"); -} - -TEST(JSONSchema_format, enum_objects_not_reordered) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "enum": [ - { "type": 1, "title": 2, "$schema": 3 } - ] - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "enum": [ - { - "type": 1, - "title": 2, - "$schema": 3 - } - ] -})JSON"); -} - -TEST(JSONSchema_format, const_object_not_reordered) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "const": { "properties": 1, "description": 2, "$id": 3 } - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "const": { - "properties": 1, - "description": 2, - "$id": 3 - } -})JSON"); -} - -TEST(JSONSchema_format, default_object_not_reordered) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "default": { "enum": 1, "const": 2, "type": 3 } - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "default": { - "enum": 1, - "const": 2, - "type": 3 - }, - "type": "object" -})JSON"); -} - -TEST(JSONSchema_format, examples_objects_not_reordered) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "examples": [ - { "pattern": 1, "minimum": 2, "maximum": 3 } - ] - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "examples": [ - { - "pattern": 1, - "minimum": 2, - "maximum": 3 - } - ], - "type": "object" -})JSON"); -} - -TEST(JSONSchema_format, typo_keyword_not_reordered) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "additionalProperty": { - "type": "string", - "description": "This is a typo" - } - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "additionalProperty": { - "type": "string", - "description": "This is a typo" - } -})JSON"); -} - -TEST(JSONSchema_format, correct_keyword_is_reordered) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "additionalProperties": { - "type": "string", - "description": "This is correct" - } - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "additionalProperties": { - "description": "This is correct", - "type": "string" - } -})JSON"); -} - -TEST(JSONSchema_format, nested_properties_subschemas_reordered) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "zebra": { - "type": "object", - "description": "A zebra", - "properties": { - "stripes": { - "type": "number", - "description": "Number of stripes" - } - } - } - } - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "zebra": { - "description": "A zebra", - "type": "object", - "properties": { - "stripes": { - "description": "Number of stripes", - "type": "number" - } - } - } - } -})JSON"); -} - -TEST(JSONSchema_format, pattern_properties_container_not_reordered) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "patternProperties": { - "items": { "description": "i", "type": "string" }, - "enum": { "description": "e", "type": "number" }, - "const": { "description": "c", "type": "boolean" } - } - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "patternProperties": { - "items": { - "description": "i", - "type": "string" - }, - "enum": { - "description": "e", - "type": "number" - }, - "const": { - "description": "c", - "type": "boolean" - } - } -})JSON"); -} - -TEST(JSONSchema_format, definitions_container_not_reordered) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "allOf": { "type": "string", "description": "A" }, - "anyOf": { "type": "number", "description": "A" }, - "$id": { "type": "boolean", "description": "I" } - } - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "allOf": { - "description": "A", - "type": "string" - }, - "anyOf": { - "description": "A", - "type": "number" - }, - "$id": { - "description": "I", - "type": "boolean" - } - } -})JSON"); -} - -TEST(JSONSchema_format, embedded_resource_reordered) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/root", - "$defs": { - "myResource": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/embedded", - "properties": { "foo": { "type": "string" } }, - "type": "object", - "description": "An embedded schema resource", - "title": "Embedded Resource" - } - } - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/root", - "$defs": { - "myResource": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/embedded", - "title": "Embedded Resource", - "description": "An embedded schema resource", - "type": "object", - "properties": { - "foo": { - "type": "string" - } - } - } - } -})JSON"); -} - -TEST(JSONSchema_format, boolean_subschema_does_not_crash) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "additionalProperties": true, - "properties": { - "foo": { "type": "string", "description": "Foo property" } - } - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "foo": { - "description": "Foo property", - "type": "string" - } - }, - "additionalProperties": true -})JSON"); -} - -TEST(JSONSchema_format, reorder_does_not_invalidate_child_pointers) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "not": {}, - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::format(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - std::ostringstream stream; - sourcemeta::core::prettify(document, stream); - EXPECT_EQ(stream.str(), R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "not": {} -})JSON"); -} diff --git a/test/jsonschema/jsonschema_frame_2019_09_test.cc b/test/jsonschema/jsonschema_frame_2019_09_test.cc deleted file mode 100644 index 180754d8b..000000000 --- a/test/jsonschema/jsonschema_frame_2019_09_test.cc +++ /dev/null @@ -1,3512 +0,0 @@ -#include - -#include -#include -#include - -#include "jsonschema_test_utils.h" - -#define EXPECT_FRAME_STATIC_2019_09_POINTER( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_POINTER(frame, reference, root_id, expected_pointer, \ - "https://json-schema.org/draft/2019-09/schema", \ - JSON_Schema_2019_09, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_2019_09_RESOURCE( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_RESOURCE(frame, reference, root_id, expected_pointer, \ - "https://json-schema.org/draft/2019-09/schema", \ - JSON_Schema_2019_09, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_2019_09_ANCHOR( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_ANCHOR(frame, reference, root_id, expected_pointer, \ - "https://json-schema.org/draft/2019-09/schema", \ - JSON_Schema_2019_09, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_SUBSCHEMA( \ - frame, reference, root_id, expected_pointer, \ - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, \ - expected_base, expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_DYNAMIC_2019_09_ANCHOR( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_DYNAMIC_ANCHOR(frame, reference, root_id, expected_pointer, \ - "https://json-schema.org/draft/2019-09/schema", \ - JSON_Schema_2019_09, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -TEST(JSONSchema_frame_2019_09, anonymous_with_nested_schema_resource) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "additionalProperties": { "$id": "https://example.com" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "/additionalProperties", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$id", "/additionalProperties/$id", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalProperties", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalProperties", "/additionalProperties", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalProperties/$id", "/additionalProperties/$id", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalProperties", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - "https://example.com"); -} - -TEST(JSONSchema_frame_2019_09, empty_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, empty_schema_trailing_hash) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema#", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, one_level_applicators_without_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": { "type": "string" }, - "properties": { - "foo": { "type": "number" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/schema", "/items/type", "/items", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "/properties/foo", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/items"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); -} - -TEST(JSONSchema_frame_2019_09, one_level_applicators_with_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/test/qux", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": { "$id": "../foo", "type": "string" }, - "properties": { - "foo": { "$anchor": "test", "type": "number" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 14); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/test/qux", "", - "https://www.sourcemeta.com/test/qux", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // Anchors - - EXPECT_FRAME_STATIC_2019_09_ANCHOR( - frame, "https://www.sourcemeta.com/test/qux#test", - "https://www.sourcemeta.com/test/qux", "/properties/foo", - "https://www.sourcemeta.com/test/qux", "/properties/foo", "", false, - false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/$id", - "https://www.sourcemeta.com/test/qux", "/$id", - "https://www.sourcemeta.com/test/qux", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/test/qux#/items", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/$id", - "https://www.sourcemeta.com/test/qux", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/properties", - "https://www.sourcemeta.com/test/qux", "/properties", - "https://www.sourcemeta.com/test/qux", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/test/qux#/properties/foo", - "https://www.sourcemeta.com/test/qux", "/properties/foo", - "https://www.sourcemeta.com/test/qux", "/properties/foo", "", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/properties/foo/$anchor", - "https://www.sourcemeta.com/test/qux", "/properties/foo/$anchor", - "https://www.sourcemeta.com/test/qux", "/properties/foo/$anchor", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/properties/foo/type", - "https://www.sourcemeta.com/test/qux", "/properties/foo/type", - "https://www.sourcemeta.com/test/qux", "/properties/foo/type", - "/properties/foo", false, false); - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/foo#/$id", - "https://www.sourcemeta.com/test/qux", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux#/items", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux#/properties/foo", - "https://www.sourcemeta.com/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/test/qux#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/test/qux#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux#test", - "https://www.sourcemeta.com/test/qux#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux#/properties/foo", - "https://www.sourcemeta.com/test/qux#/properties/foo"); -} - -TEST(JSONSchema_frame_2019_09, subschema_absolute_identifier) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": { - "$id": "https://www.sourcemeta.com/foo", - "type": "string" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/$id", - "https://www.sourcemeta.com/schema", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/foo#/$id", - "https://www.sourcemeta.com/schema", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_2019_09, nested_schemas) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "$id": "https://www.sourcemeta.com/foo", - "$anchor": "test", - "items": { - "$id": "qux" - } - }, - "bar": { - "$id": "https://www.sourcemeta.com/bar" - }, - "baz": { - "$id": "baz", - "items": { - "$anchor": "extra" - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 30); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_ANCHOR( - frame, "https://www.sourcemeta.com/foo#test", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/bar", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/baz", - "https://www.sourcemeta.com/schema", "/properties/baz", - "https://www.sourcemeta.com/baz", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_ANCHOR( - frame, "https://www.sourcemeta.com/baz#extra", - "https://www.sourcemeta.com/schema", "/properties/baz/items", - "https://www.sourcemeta.com/baz", "/items", "/properties/baz", false, - false); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/qux", - "https://www.sourcemeta.com/schema", "/properties/foo/items", - "https://www.sourcemeta.com/qux", "", "/properties/foo", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - - // foo - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$id", - "https://www.sourcemeta.com/schema", "/properties/foo/$id", - "https://www.sourcemeta.com/foo", "/$id", "/properties/foo", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$anchor", - "https://www.sourcemeta.com/schema", "/properties/foo/$anchor", - "https://www.sourcemeta.com/foo", "/$anchor", "/properties/foo", false, - false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo/items", - "https://www.sourcemeta.com/schema", "/properties/foo/items", - "https://www.sourcemeta.com/qux", "", "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/items/$id", - "https://www.sourcemeta.com/schema", "/properties/foo/items/$id", - "https://www.sourcemeta.com/qux", "/$id", "/properties/foo/items", false, - false); - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/foo#/$id", - "https://www.sourcemeta.com/schema", "/properties/foo/$id", - "https://www.sourcemeta.com/foo", "/$id", "/properties/foo", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/foo#/$anchor", - "https://www.sourcemeta.com/schema", "/properties/foo/$anchor", - "https://www.sourcemeta.com/foo", "/$anchor", "/properties/foo", false, - false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/foo#/items", - "https://www.sourcemeta.com/schema", "/properties/foo/items", - "https://www.sourcemeta.com/qux", "", "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/foo#/items/$id", - "https://www.sourcemeta.com/schema", "/properties/foo/items/$id", - "https://www.sourcemeta.com/qux", "/$id", "/properties/foo/items", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/qux#/$id", - "https://www.sourcemeta.com/schema", "/properties/foo/items/$id", - "https://www.sourcemeta.com/qux", "/$id", "/properties/foo/items", false, - false); - - // bar - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/bar", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/bar/$id", - "https://www.sourcemeta.com/schema", "/properties/bar/$id", - "https://www.sourcemeta.com/bar", "/$id", "/properties/bar", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/bar#/$id", - "https://www.sourcemeta.com/schema", "/properties/bar/$id", - "https://www.sourcemeta.com/bar", "/$id", "/properties/bar", false, - false); - - // baz - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema", "/properties/baz", - "https://www.sourcemeta.com/baz", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/baz/$id", - "https://www.sourcemeta.com/schema", "/properties/baz/$id", - "https://www.sourcemeta.com/baz", "/$id", "/properties/baz", false, - false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/baz/items", - "https://www.sourcemeta.com/schema", "/properties/baz/items", - "https://www.sourcemeta.com/baz", "/items", "/properties/baz", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/baz/items/$anchor", - "https://www.sourcemeta.com/schema", "/properties/baz/items/$anchor", - "https://www.sourcemeta.com/baz", "/items/$anchor", - "/properties/baz/items", false, false); - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/baz#/$id", - "https://www.sourcemeta.com/schema", "/properties/baz/$id", - "https://www.sourcemeta.com/baz", "/$id", "/properties/baz", false, - false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/baz#/items", - "https://www.sourcemeta.com/schema", "/properties/baz/items", - "https://www.sourcemeta.com/baz", "/items", "/properties/baz", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/baz#/items/$anchor", - "https://www.sourcemeta.com/schema", "/properties/baz/items/$anchor", - "https://www.sourcemeta.com/baz", "/items/$anchor", - "/properties/baz/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/bar", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/baz", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/baz#extra", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/qux", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo/items", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz/items", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/baz#/items", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo#test", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/qux", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/bar", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/baz", - "https://www.sourcemeta.com/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/bar", - "https://www.sourcemeta.com/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/bar"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/baz"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/baz", - "https://www.sourcemeta.com/baz"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/baz#extra", - "https://www.sourcemeta.com/baz"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/qux"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/qux", - "https://www.sourcemeta.com/qux"); -} - -TEST(JSONSchema_frame_2019_09, id_override) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": { "$id": "schema" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaFrameError); -} - -TEST(JSONSchema_frame_2019_09, static_anchor_override) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$anchor": "foo", - "items": { "$anchor": "foo" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (sourcemeta::core::SchemaAnchorCollisionError &error) { - EXPECT_EQ(error.identifier(), "https://www.sourcemeta.com/schema#foo"); - EXPECT_EQ(sourcemeta::core::to_string(error.location()), "/items"); - EXPECT_EQ(sourcemeta::core::to_string(error.other()), ""); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2019_09, explicit_argument_id_same) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2019-09/schema", - "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, anchor_top_level) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$anchor": "foo" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$anchor", - "https://www.sourcemeta.com/schema", "/$anchor", - "https://www.sourcemeta.com/schema", "/$anchor", "", false, false); - - // Anchors - - EXPECT_FRAME_STATIC_2019_09_ANCHOR( - frame, "https://www.sourcemeta.com/schema#foo", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#foo", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, explicit_argument_id_different) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "items": { - "$anchor": "foo" - }, - "properties": { - "one": { - "$id": "test", - "$anchor": "bar" - }, - "two": { - "$id": "https://www.test.com", - "$anchor": "baz" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2019-09/schema", - "https://www.example.com"); - - EXPECT_EQ(frame.locations().size(), 38); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.example.com", "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.example.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.example.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.test.com", "https://www.sourcemeta.com/schema", - "/properties/two", "https://www.test.com", "", "", false, false); - - // Anchors - - EXPECT_FRAME_STATIC_2019_09_ANCHOR( - frame, "https://www.sourcemeta.com/schema#foo", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_2019_09_ANCHOR( - frame, "https://www.example.com#foo", "https://www.sourcemeta.com/schema", - "/items", "https://www.example.com", "/items", "", false, false); - EXPECT_FRAME_STATIC_2019_09_ANCHOR( - frame, "https://www.sourcemeta.com/test#bar", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_ANCHOR( - frame, "https://www.example.com/test#bar", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.example.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_ANCHOR( - frame, "https://www.test.com#baz", "https://www.sourcemeta.com/schema", - "/properties/two", "https://www.test.com", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/$anchor", - "https://www.sourcemeta.com/schema", "/items/$anchor", - "https://www.sourcemeta.com/schema", "/items/$anchor", "/items", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/one", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/one/$id", - "https://www.sourcemeta.com/schema", "/properties/one/$id", - "https://www.sourcemeta.com/test", "/$id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/one/$anchor", - "https://www.sourcemeta.com/schema", "/properties/one/$anchor", - "https://www.sourcemeta.com/test", "/$anchor", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/two", - "https://www.sourcemeta.com/schema", "/properties/two", - "https://www.test.com", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/two/$id", - "https://www.sourcemeta.com/schema", "/properties/two/$id", - "https://www.test.com", "/$id", "/properties/two", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/two/$anchor", - "https://www.sourcemeta.com/schema", "/properties/two/$anchor", - "https://www.test.com", "/$anchor", "/properties/two", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/test#/$id", - "https://www.sourcemeta.com/schema", "/properties/one/$id", - "https://www.sourcemeta.com/test", "/$id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/test#/$anchor", - "https://www.sourcemeta.com/schema", "/properties/one/$anchor", - "https://www.sourcemeta.com/test", "/$anchor", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.test.com#/$id", "https://www.sourcemeta.com/schema", - "/properties/two/$id", "https://www.test.com", "/$id", "/properties/two", - false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.test.com#/$anchor", - "https://www.sourcemeta.com/schema", "/properties/two/$anchor", - "https://www.test.com", "/$anchor", "/properties/two", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com#foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test#bar", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com/test#bar", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com#baz", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/one", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/two", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/one", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/two", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, ref_metaschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, location_independent_identifier_anonymous) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "foo": { - "$id": "#foo" - }, - "bar": { - "$ref": "#foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaFrameError &error) { - EXPECT_EQ(error.identifier(), "#foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2019_09, recursive_anchor_true_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$recursiveAnchor": true - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - // Dynamic anchors - - EXPECT_FRAME_DYNAMIC_2019_09_ANCHOR( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // Static identifiers - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // Static pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/$recursiveAnchor", "", false, - false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Dynamic, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, recursive_anchor_false_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$recursiveAnchor": false - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 4); - - // Static identifiers - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // Static pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/$recursiveAnchor", "", false, - false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, recursive_anchor_true_without_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "$recursiveAnchor": true - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - // Dynamic anchors - - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "", "/properties/foo", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - - // Static frames - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$recursiveAnchor", - "/properties/foo/$recursiveAnchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/properties/foo", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); -} - -TEST(JSONSchema_frame_2019_09, recursive_anchor_false_without_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "$recursiveAnchor": false - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - // Static frames - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$recursiveAnchor", - "/properties/foo/$recursiveAnchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/properties/foo", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); -} - -TEST(JSONSchema_frame_2019_09, recursive_ref_no_recursive_anchor_anonymous) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "additionalItems": { - "$recursiveRef": "#" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 4); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalItems", "/additionalItems", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalItems/$recursiveRef", - "/additionalItems/$recursiveRef", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_STATIC_REFERENCE(frame, "/additionalItems/$recursiveRef", "", "", - std::nullopt, "#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalItems", - frame.root()); - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", "#/additionalItems"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalItems", - "#/additionalItems"); -} - -TEST(JSONSchema_frame_2019_09, recursive_ref_no_recursive_anchor) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "additionalItems": { - "$recursiveRef": "#" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/additionalItems", - "https://www.sourcemeta.com/schema", "/additionalItems", - "https://www.sourcemeta.com/schema", "/additionalItems", "", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveRef", - "/additionalItems", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_STATIC_REFERENCE(frame, "/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", std::nullopt, - "#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/additionalItems", - frame.root()); - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/additionalItems"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/additionalItems", - "https://www.sourcemeta.com/schema#/additionalItems"); -} - -TEST(JSONSchema_frame_2019_09, recursive_ref_recursive_anchor_false_anonymous) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$recursiveAnchor": false, - "additionalItems": { - "$recursiveRef": "#" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$recursiveAnchor", "/$recursiveAnchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalItems", "/additionalItems", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalItems/$recursiveRef", - "/additionalItems/$recursiveRef", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_STATIC_REFERENCE(frame, "/additionalItems/$recursiveRef", "", "", - std::nullopt, "#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalItems", - frame.root()); - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", "#/additionalItems"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalItems", - "#/additionalItems"); -} - -TEST(JSONSchema_frame_2019_09, recursive_ref_recursive_anchor_false) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$recursiveAnchor": false, - "additionalItems": { - "$recursiveRef": "#" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/$recursiveAnchor", "", false, - false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/additionalItems", - "https://www.sourcemeta.com/schema", "/additionalItems", - "https://www.sourcemeta.com/schema", "/additionalItems", "", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveRef", - "/additionalItems", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_STATIC_REFERENCE(frame, "/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", std::nullopt, - "#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/additionalItems", - frame.root()); - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/additionalItems"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/additionalItems", - "https://www.sourcemeta.com/schema#/additionalItems"); -} - -TEST(JSONSchema_frame_2019_09, recursive_ref_recursive_anchor_true_anonymous) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$recursiveAnchor": true, - "additionalItems": { - "$recursiveRef": "#" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$recursiveAnchor", "/$recursiveAnchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalItems", "/additionalItems", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalItems/$recursiveRef", - "/additionalItems/$recursiveRef", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - - // Anchors - - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_DYNAMIC_REFERENCE(frame, "/additionalItems/$recursiveRef", "", "", - std::nullopt, "#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalItems", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "", frame.root()); - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", "#/additionalItems"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "", "#/additionalItems"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalItems", - "#/additionalItems"); -} - -TEST(JSONSchema_frame_2019_09, recursive_ref_recursive_anchor_true) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$recursiveAnchor": true, - "additionalItems": { - "$recursiveRef": "#" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 7); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/$recursiveAnchor", "", false, - false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/additionalItems", - "https://www.sourcemeta.com/schema", "/additionalItems", - "https://www.sourcemeta.com/schema", "/additionalItems", "", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveRef", - "/additionalItems", false, false); - - // Anchors - - EXPECT_FRAME_DYNAMIC_2019_09_ANCHOR( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_DYNAMIC_REFERENCE(frame, "/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", std::nullopt, - "#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/additionalItems", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Dynamic, "https://www.sourcemeta.com/schema", frame.root()); - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/additionalItems"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Dynamic, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/additionalItems"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/additionalItems", - "https://www.sourcemeta.com/schema#/additionalItems"); -} - -TEST(JSONSchema_frame_2019_09, - recursive_ref_recursive_anchor_false_anonymous_nested) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "additionalItems": { - "$id": "https://example.com", - "$recursiveAnchor": false, - "$recursiveRef": "#" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "/additionalItems", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalItems", "/additionalItems", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalItems/$id", "/additionalItems/$id", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalItems/$recursiveAnchor", - "/additionalItems/$recursiveAnchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalItems/$recursiveRef", - "/additionalItems/$recursiveRef", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$id", "/additionalItems/$id", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$recursiveAnchor", - "/additionalItems/$recursiveAnchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$recursiveRef", - "/additionalItems/$recursiveRef", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_STATIC_REFERENCE(frame, "/additionalItems/$recursiveRef", - "https://example.com", "https://example.com", - std::nullopt, "#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalItems", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - "https://example.com"); -} - -TEST(JSONSchema_frame_2019_09, - recursive_ref_recursive_anchor_true_anonymous_nested) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "additionalItems": { - "$id": "https://example.com", - "$recursiveAnchor": true, - "$recursiveRef": "#" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 11); - - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "/additionalItems", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalItems", "/additionalItems", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalItems/$id", "/additionalItems/$id", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalItems/$recursiveAnchor", - "/additionalItems/$recursiveAnchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalItems/$recursiveRef", - "/additionalItems/$recursiveRef", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$id", "/additionalItems/$id", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$recursiveAnchor", - "/additionalItems/$recursiveAnchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$recursiveRef", - "/additionalItems/$recursiveRef", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - - // Anchors - - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "https://example.com", "/additionalItems", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_DYNAMIC_REFERENCE(frame, "/additionalItems/$recursiveRef", - "https://example.com", "https://example.com", - std::nullopt, "#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalItems", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "https://example.com", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "https://example.com", - "https://example.com"); -} - -TEST(JSONSchema_frame_2019_09, recursive_ref_nested_recursive_anchor_true) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "additionalItems": { - "$recursiveAnchor": true, - "$recursiveRef": "#" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 7); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, - "https://www.sourcemeta.com/schema#/additionalItems/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveAnchor", - "/additionalItems", false, false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/additionalItems", - "https://www.sourcemeta.com/schema", "/additionalItems", - "https://www.sourcemeta.com/schema", "/additionalItems", "", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveRef", - "/additionalItems", false, false); - - // Anchors - - EXPECT_FRAME_DYNAMIC_2019_09_ANCHOR( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "/additionalItems", - "https://www.sourcemeta.com/schema", "/additionalItems", "", false, - false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_DYNAMIC_REFERENCE(frame, "/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", std::nullopt, - "#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/additionalItems", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Dynamic, "https://www.sourcemeta.com/schema", frame.root()); - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/additionalItems"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Dynamic, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/additionalItems"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/additionalItems", - "https://www.sourcemeta.com/schema#/additionalItems"); -} - -TEST(JSONSchema_frame_2019_09, recursive_ref_multiple_recursive_anchor_true) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$recursiveAnchor": true, - "additionalItems": { - "$id": "nested", - "$recursiveAnchor": true, - "$recursiveRef": "#" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 14); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/nested", - "https://www.sourcemeta.com/schema", "/additionalItems", - "https://www.sourcemeta.com/nested", "", "", false, false); - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/$recursiveAnchor", "", false, - false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/additionalItems", - "https://www.sourcemeta.com/schema", "/additionalItems", - "https://www.sourcemeta.com/nested", "", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/additionalItems/$id", - "https://www.sourcemeta.com/schema", "/additionalItems/$id", - "https://www.sourcemeta.com/nested", "/$id", "/additionalItems", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, - "https://www.sourcemeta.com/schema#/additionalItems/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveAnchor", - "https://www.sourcemeta.com/nested", "/$recursiveAnchor", - "/additionalItems", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/nested", "/$recursiveRef", "/additionalItems", - false, false); - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/nested#/$id", - "https://www.sourcemeta.com/schema", "/additionalItems/$id", - "https://www.sourcemeta.com/nested", "/$id", "/additionalItems", false, - false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/nested#/$recursiveAnchor", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveAnchor", - "https://www.sourcemeta.com/nested", "/$recursiveAnchor", - "/additionalItems", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/nested#/$recursiveRef", - "https://www.sourcemeta.com/schema", "/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/nested", "/$recursiveRef", "/additionalItems", - false, false); - - // Anchors - - EXPECT_FRAME_DYNAMIC_2019_09_ANCHOR( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_DYNAMIC_2019_09_ANCHOR( - frame, "https://www.sourcemeta.com/nested", - "https://www.sourcemeta.com/schema", "/additionalItems", - "https://www.sourcemeta.com/nested", "", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_DYNAMIC_REFERENCE(frame, "/additionalItems/$recursiveRef", - "https://www.sourcemeta.com/nested", - "https://www.sourcemeta.com/nested", std::nullopt, - "#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/nested", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/additionalItems", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Dynamic, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Dynamic, "https://www.sourcemeta.com/nested", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/nested"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/nested", - "https://www.sourcemeta.com/nested"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, - "https://www.sourcemeta.com/nested", - "https://www.sourcemeta.com/nested"); -} - -TEST(JSONSchema_frame_2019_09, recursive_anchor_conflict) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$recursiveAnchor": true, - "items": { - "$recursiveAnchor": true - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (sourcemeta::core::SchemaAnchorCollisionError &error) { - EXPECT_EQ(error.identifier(), "https://www.sourcemeta.com/schema"); - EXPECT_EQ(sourcemeta::core::to_string(error.location()), "/items"); - EXPECT_EQ(sourcemeta::core::to_string(error.other()), ""); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2019_09, invalid_recursive_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$recursiveRef": "nested#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaReferenceError &error) { - EXPECT_EQ(error.identifier(), "https://www.sourcemeta.com/schema"); - EXPECT_EQ(sourcemeta::core::to_string(error.location()), "/$recursiveRef"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2019_09, recursive_anchor_on_relative_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$recursiveAnchor": true, - "additionalItems": { - "$id": "middle", - "$recursiveAnchor": true - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 11); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "middle", "/additionalItems", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$recursiveAnchor", "/$recursiveAnchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalItems", "/additionalItems", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalItems/$id", "/additionalItems/$id", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalItems/$recursiveAnchor", - "/additionalItems/$recursiveAnchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "middle#/$recursiveAnchor", "/additionalItems/$recursiveAnchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/additionalItems", false, false); - - // Anchors - - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "middle", "/additionalItems", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "middle", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalItems", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "middle", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "middle"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "middle", "middle"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "middle", "middle"); -} - -TEST(JSONSchema_frame_2019_09, ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "#/$defs/string", - "$defs": { - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 7); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$ref", - "https://www.sourcemeta.com/schema", "/$ref", - "https://www.sourcemeta.com/schema", "/$ref", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs", - "https://www.sourcemeta.com/schema", "/$defs", - "https://www.sourcemeta.com/schema", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/$defs/string", - "https://www.sourcemeta.com/schema", "/$defs/string", - "https://www.sourcemeta.com/schema", "/$defs/string", "", false, true); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs/string/type", - "https://www.sourcemeta.com/schema", "/$defs/string/type", - "https://www.sourcemeta.com/schema", "/$defs/string/type", - "/$defs/string", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "https://www.sourcemeta.com/schema#/$defs/string", - "https://www.sourcemeta.com/schema", "/$defs/string", "#/$defs/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/string", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/string", - "https://www.sourcemeta.com/schema#/$defs/string"); -} - -TEST(JSONSchema_frame_2019_09, ref_from_definitions) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "#/definitions/middle", - "definitions": { - "middle": { "$ref": "#/definitions/string" }, - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$ref", - "https://www.sourcemeta.com/schema", "/$ref", - "https://www.sourcemeta.com/schema", "/$ref", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/definitions", - "https://www.sourcemeta.com/schema", "/definitions", - "https://www.sourcemeta.com/schema", "/definitions", "", false, false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/definitions/middle", - "https://www.sourcemeta.com/schema", "/definitions/middle", - "https://www.sourcemeta.com/schema", "/definitions/middle", "", false, - true); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/definitions/middle/$ref", - "https://www.sourcemeta.com/schema", "/definitions/middle/$ref", - "https://www.sourcemeta.com/schema", "/definitions/middle/$ref", - "/definitions/middle", false, true); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/definitions/string", - "https://www.sourcemeta.com/schema", "/definitions/string", - "https://www.sourcemeta.com/schema", "/definitions/string", "", false, - true); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/definitions/string/type", - "https://www.sourcemeta.com/schema", "/definitions/string/type", - "https://www.sourcemeta.com/schema", "/definitions/string/type", - "/definitions/string", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "https://www.sourcemeta.com/schema#/definitions/middle", - "https://www.sourcemeta.com/schema", "/definitions/middle", - "#/definitions/middle"); - EXPECT_STATIC_REFERENCE( - frame, "/definitions/middle/$ref", - "https://www.sourcemeta.com/schema#/definitions/string", - "https://www.sourcemeta.com/schema", "/definitions/string", - "#/definitions/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/definitions/middle", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/definitions/string", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/definitions/middle"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/definitions/middle", - "https://www.sourcemeta.com/schema#/definitions/middle"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/definitions/string", - "https://www.sourcemeta.com/schema#/definitions/middle"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/definitions/string"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/definitions/middle", - "https://www.sourcemeta.com/schema#/definitions/string"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/definitions/string", - "https://www.sourcemeta.com/schema#/definitions/string"); -} - -TEST(JSONSchema_frame_2019_09, relative_base_uri_without_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "common" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE(frame, "common", "common", "", "common", - "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER(frame, "common#/$schema", "common", - "/$schema", "common", "/$schema", "", - false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER(frame, "common#/$id", "common", "/$id", - "common", "/$id", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, relative_base_uri_with_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "common", - "allOf": [ { "$ref": "#foo" } ], - "$defs": { - "foo": { - "$anchor": "foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE(frame, "common", "common", "", "common", - "", std::nullopt, false, false); - - // Anchors - EXPECT_FRAME_STATIC_2019_09_ANCHOR(frame, "common#foo", "common", - "/$defs/foo", "common", "/$defs/foo", "", - false, true); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER(frame, "common#/$schema", "common", - "/$schema", "common", "/$schema", "", - false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER(frame, "common#/$id", "common", "/$id", - "common", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER(frame, "common#/allOf", "common", - "/allOf", "common", "/allOf", "", false, - false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA(frame, "common#/allOf/0", "common", - "/allOf/0", "common", "/allOf/0", "", - false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "common#/allOf/0/$ref", "common", "/allOf/0/$ref", "common", - "/allOf/0/$ref", "/allOf/0", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER(frame, "common#/$defs", "common", - "/$defs", "common", "/$defs", "", false, - false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA(frame, "common#/$defs/foo", "common", - "/$defs/foo", "common", "/$defs/foo", - "", false, true); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "common#/$defs/foo/$anchor", "common", "/$defs/foo/$anchor", - "common", "/$defs/foo/$anchor", "/$defs/foo", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_STATIC_REFERENCE(frame, "/allOf/0/$ref", "common#foo", "common", "foo", - "#foo"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/allOf/0", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/$defs/foo", - frame.root()); -} - -TEST(JSONSchema_frame_2019_09, relative_id_leading_slash) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "/base", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_2019_09_RESOURCE(frame, "/base", "/base", "", "/base", "", - std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2019_09_POINTER(frame, "/base#/$id", "/base", "/$id", - "/base", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER(frame, "/base#/$schema", "/base", - "/$schema", "/base", "/$schema", "", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "/base", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, - ref_does_not_invalidate_sibling_subschemas_and_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "$ref": "#/definitions/enabled", - "properties": { - "bar": { - "$ref": "#/definitions/config", - "additionalProperties": { - "$ref": "#/definitions/threshold" - } - } - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$ref", "/properties/foo/$ref", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties", "/properties/foo/properties", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo/properties/bar", - "/properties/foo/properties/bar", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar/$ref", - "/properties/foo/properties/bar/$ref", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/properties/foo/properties/bar", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo/properties/bar/additionalProperties", - "/properties/foo/properties/bar/additionalProperties", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/properties/foo/properties/bar", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar/additionalProperties/$ref", - "/properties/foo/properties/bar/additionalProperties/$ref", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/properties/foo/properties/bar/additionalProperties", false, false); - - EXPECT_EQ(frame.references().size(), 4); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", - "#/definitions/enabled", "", "/definitions/enabled", - "#/definitions/enabled"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/properties/bar/$ref", - "#/definitions/config", "", "/definitions/config", - "#/definitions/config"); - EXPECT_STATIC_REFERENCE( - frame, "/properties/foo/properties/bar/additionalProperties/$ref", - "#/definitions/threshold", "", "/definitions/threshold", - "#/definitions/threshold"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "#/properties/foo/properties/bar", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "#/properties/foo/properties/bar/additionalProperties", - frame.root()); -} - -TEST(JSONSchema_frame_2019_09, propertyNames_with_nested_applicators) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$anchor": "outer", - "propertyNames": { - "$anchor": "inner", - "anyOf": [ - { "minLength": 1 }, - { "maxLength": 10 }, - { "$anchor": "nested" } - ], - "additionalProperties": { - "$anchor": "other", - "type": "boolean" - }, - "$defs": { - "test": { - "type": "string" - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 22); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/propertyNames", "/propertyNames", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/propertyNames/anyOf/0", "/propertyNames/anyOf/0", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/propertyNames/anyOf/1", "/propertyNames/anyOf/1", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/propertyNames/anyOf/2", "/propertyNames/anyOf/2", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/propertyNames/additionalProperties", - "/propertyNames/additionalProperties", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/propertyNames/$defs/test", "/propertyNames/$defs/test", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames", false, true); - - // Anchors - - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#outer", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#inner", "/propertyNames", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#nested", "/propertyNames/anyOf/2", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#other", "/propertyNames/additionalProperties", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames", false, false); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$anchor", "/$anchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/$anchor", "/propertyNames/$anchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/anyOf", "/propertyNames/anyOf", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/anyOf/0/minLength", - "/propertyNames/anyOf/0/minLength", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames/anyOf/0", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/anyOf/1/maxLength", - "/propertyNames/anyOf/1/maxLength", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames/anyOf/1", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/anyOf/2/$anchor", - "/propertyNames/anyOf/2/$anchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames/anyOf/2", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/additionalProperties/$anchor", - "/propertyNames/additionalProperties/$anchor", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames/additionalProperties", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/additionalProperties/type", - "/propertyNames/additionalProperties/type", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames/additionalProperties", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/$defs", "/propertyNames/$defs", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/$defs/test/type", - "/propertyNames/$defs/test/type", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/propertyNames/$defs/test", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/propertyNames", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/propertyNames/anyOf/0", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/propertyNames/anyOf/1", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/propertyNames/anyOf/2", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "#/propertyNames/additionalProperties", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "#/propertyNames/$defs/test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#outer", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#inner", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#nested", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#other", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, invalid_recursive_anchor_not_boolean) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$recursiveAnchor": "foo" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$recursiveAnchor"); - EXPECT_EQ(error.value(), "\"foo\""); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2019_09, invalid_recursive_ref_not_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$recursiveRef": 123 - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$recursiveRef"); - EXPECT_EQ(error.value(), "123"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2019_09, ref_from_def_to_sibling_def) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "foo": { - "properties": { - "bar": { "$ref": "#/$defs/bar" } - } - }, - "bar": {} - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/foo", "/$defs/foo", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/foo/properties/bar", "/$defs/foo/properties/bar", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/$defs/foo", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/bar", "/$defs/bar", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, true); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/foo/properties", "/$defs/foo/properties", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/$defs/foo", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/foo/properties/bar/$ref", - "/$defs/foo/properties/bar/$ref", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "/$defs/foo/properties/bar", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/foo/properties/bar/$ref", - "#/$defs/bar", "", "/$defs/bar", "#/$defs/bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/foo", - frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "#/$defs/foo/properties/bar", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/bar", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/foo", "#/$defs/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/foo/properties/bar", - "#/$defs/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/bar", "#/$defs/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", - "#/$defs/foo/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/foo", - "#/$defs/foo/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/foo/properties/bar", - "#/$defs/foo/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/bar", - "#/$defs/foo/properties/bar"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/foo", - "#/$defs/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "#/$defs/foo/properties/bar", "#/$defs/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/bar", "#/$defs/bar"); -} - -TEST(JSONSchema_frame_2019_09, anchor_with_invalid_format_empty) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$anchor": "" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$anchor"); - EXPECT_EQ(error.value(), ""); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2019_09, anchor_with_invalid_format_leading_digit) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$anchor": "1foo" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$anchor"); - EXPECT_EQ(error.value(), "1foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2019_09, anchor_with_invalid_format_leading_underscore) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$anchor": "_foo" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$anchor"); - EXPECT_EQ(error.value(), "_foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2019_09, anchor_with_invalid_format_whitespace) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$anchor": "foo bar" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$anchor"); - EXPECT_EQ(error.value(), "foo bar"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2019_09, anchor_with_invalid_format_punctuation) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$anchor": "foo!bar" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$anchor"); - EXPECT_EQ(error.value(), "foo!bar"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2019_09, anchor_with_valid_colon) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$anchor": "foo:bar" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$anchor", - "https://www.sourcemeta.com/schema", "/$anchor", - "https://www.sourcemeta.com/schema", "/$anchor", "", false, false); - - // Anchors - - EXPECT_FRAME_STATIC_2019_09_ANCHOR( - frame, "https://www.sourcemeta.com/schema#foo:bar", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#foo:bar", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, top_level_id_absolute_with_non_empty_fragment) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema#foo", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaFrameError &error) { - EXPECT_EQ(error.identifier(), "https://www.sourcemeta.com/schema#foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2019_09, nested_id_absolute_with_non_empty_fragment) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "foo": { - "$id": "https://www.sourcemeta.com/nested#foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaFrameError &error) { - EXPECT_EQ(error.identifier(), "https://www.sourcemeta.com/nested#foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2019_09, top_level_id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "#", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.root().empty()); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$id", "/$id", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, nested_id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "foo": { - "$id": "#" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.root(), "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs", - "https://www.sourcemeta.com/schema", "/$defs", - "https://www.sourcemeta.com/schema", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/$defs/foo", - "https://www.sourcemeta.com/schema", "/$defs/foo", - "https://www.sourcemeta.com/schema", "/$defs/foo", "", false, true); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs/foo/$id", - "https://www.sourcemeta.com/schema", "/$defs/foo/$id", - "https://www.sourcemeta.com/schema", "/$defs/foo/$id", "/$defs/foo", - false, true); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, top_level_id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.root().empty()); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$id", "/$id", "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, "", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_2019_09, nested_id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "foo": { - "$id": "" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.root(), "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_FRAME_STATIC_2019_09_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs", - "https://www.sourcemeta.com/schema", "/$defs", - "https://www.sourcemeta.com/schema", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_2019_09_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/$defs/foo", - "https://www.sourcemeta.com/schema", "/$defs/foo", - "https://www.sourcemeta.com/schema", "/$defs/foo", "", false, true); - EXPECT_FRAME_STATIC_2019_09_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs/foo/$id", - "https://www.sourcemeta.com/schema", "/$defs/foo/$id", - "https://www.sourcemeta.com/schema", "/$defs/foo/$id", "/$defs/foo", - false, true); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} diff --git a/test/jsonschema/jsonschema_frame_2020_12_test.cc b/test/jsonschema/jsonschema_frame_2020_12_test.cc deleted file mode 100644 index 1e64b3f7c..000000000 --- a/test/jsonschema/jsonschema_frame_2020_12_test.cc +++ /dev/null @@ -1,7951 +0,0 @@ -#include - -#include -#include -#include - -#include "jsonschema_test_utils.h" - -#define EXPECT_FRAME_STATIC_2020_12_POINTER( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_POINTER(frame, reference, root_id, expected_pointer, \ - "https://json-schema.org/draft/2020-12/schema", \ - JSON_Schema_2020_12, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_2020_12_RESOURCE( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_RESOURCE(frame, reference, root_id, expected_pointer, \ - "https://json-schema.org/draft/2020-12/schema", \ - JSON_Schema_2020_12, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_2020_12_ANCHOR( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_ANCHOR(frame, reference, root_id, expected_pointer, \ - "https://json-schema.org/draft/2020-12/schema", \ - JSON_Schema_2020_12, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_SUBSCHEMA( \ - frame, reference, root_id, expected_pointer, \ - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, \ - expected_base, expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_DYNAMIC_2020_12_ANCHOR( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_DYNAMIC_ANCHOR(frame, reference, root_id, expected_pointer, \ - "https://json-schema.org/draft/2020-12/schema", \ - JSON_Schema_2020_12, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -TEST(JSONSchema_frame_2020_12, anonymous_with_nested_schema_resource) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": { "$id": "https://example.com" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "/additionalProperties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$id", "/additionalProperties/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/additionalProperties", false, false); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalProperties", "/additionalProperties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalProperties/$id", "/additionalProperties/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/additionalProperties", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - "https://example.com"); -} - -TEST(JSONSchema_frame_2020_12, empty_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, empty_schema_trailing_hash) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema#", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, one_level_applicators_without_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "type": "string" }, - "properties": { - "foo": { "type": "number" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/schema", "/items/type", "/items", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "/properties/foo", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/items"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); -} - -TEST(JSONSchema_frame_2020_12, one_level_applicators_with_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/test/qux", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "$id": "../foo", "type": "string" }, - "properties": { - "foo": { "$anchor": "test", "type": "number" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 14); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/test/qux", "", - "https://www.sourcemeta.com/test/qux", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // Anchors - - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/test/qux#test", - "https://www.sourcemeta.com/test/qux", "/properties/foo", - "https://www.sourcemeta.com/test/qux", "/properties/foo", "", false, - false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/$id", - "https://www.sourcemeta.com/test/qux", "/$id", - "https://www.sourcemeta.com/test/qux", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/test/qux#/items", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/$id", - "https://www.sourcemeta.com/test/qux", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/properties", - "https://www.sourcemeta.com/test/qux", "/properties", - "https://www.sourcemeta.com/test/qux", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/test/qux#/properties/foo", - "https://www.sourcemeta.com/test/qux", "/properties/foo", - "https://www.sourcemeta.com/test/qux", "/properties/foo", "", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/properties/foo/$anchor", - "https://www.sourcemeta.com/test/qux", "/properties/foo/$anchor", - "https://www.sourcemeta.com/test/qux", "/properties/foo/$anchor", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/properties/foo/type", - "https://www.sourcemeta.com/test/qux", "/properties/foo/type", - "https://www.sourcemeta.com/test/qux", "/properties/foo/type", - "/properties/foo", false, false); - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/foo#/$id", - "https://www.sourcemeta.com/test/qux", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux#/items", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux#test", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux#/items", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux#/properties/foo", - "https://www.sourcemeta.com/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/test/qux#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/test/qux#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux#test", - "https://www.sourcemeta.com/test/qux#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux#/items", - "https://www.sourcemeta.com/test/qux#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux#/properties/foo", - "https://www.sourcemeta.com/test/qux#/properties/foo"); -} - -TEST(JSONSchema_frame_2020_12, subschema_absolute_identifier) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { - "$id": "https://www.sourcemeta.com/foo", - "type": "string" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/$id", - "https://www.sourcemeta.com/schema", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_2020_12, nested_schemas) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$id": "https://www.sourcemeta.com/foo", - "$anchor": "test", - "items": { - "$id": "qux" - } - }, - "bar": { - "$id": "https://www.sourcemeta.com/bar" - }, - "baz": { - "$id": "baz", - "items": { - "$anchor": "extra" - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 30); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/foo#test", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/bar", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/baz", - "https://www.sourcemeta.com/schema", "/properties/baz", - "https://www.sourcemeta.com/baz", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/baz#extra", - "https://www.sourcemeta.com/schema", "/properties/baz/items", - "https://www.sourcemeta.com/baz", "/items", "/properties/baz", false, - false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/qux", - "https://www.sourcemeta.com/schema", "/properties/foo/items", - "https://www.sourcemeta.com/qux", "", "/properties/foo", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - - // foo - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$id", - "https://www.sourcemeta.com/schema", "/properties/foo/$id", - "https://www.sourcemeta.com/foo", "/$id", "/properties/foo", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$anchor", - "https://www.sourcemeta.com/schema", "/properties/foo/$anchor", - "https://www.sourcemeta.com/foo", "/$anchor", "/properties/foo", false, - false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo/items", - "https://www.sourcemeta.com/schema", "/properties/foo/items", - "https://www.sourcemeta.com/qux", "", "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/items/$id", - "https://www.sourcemeta.com/schema", "/properties/foo/items/$id", - "https://www.sourcemeta.com/qux", "/$id", "/properties/foo/items", false, - false); - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/foo#/$id", - "https://www.sourcemeta.com/schema", "/properties/foo/$id", - "https://www.sourcemeta.com/foo", "/$id", "/properties/foo", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/foo#/$anchor", - "https://www.sourcemeta.com/schema", "/properties/foo/$anchor", - "https://www.sourcemeta.com/foo", "/$anchor", "/properties/foo", false, - false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/foo#/items", - "https://www.sourcemeta.com/schema", "/properties/foo/items", - "https://www.sourcemeta.com/qux", "", "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/foo#/items/$id", - "https://www.sourcemeta.com/schema", "/properties/foo/items/$id", - "https://www.sourcemeta.com/qux", "/$id", "/properties/foo/items", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/qux#/$id", - "https://www.sourcemeta.com/schema", "/properties/foo/items/$id", - "https://www.sourcemeta.com/qux", "/$id", "/properties/foo/items", false, - false); - - // bar - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/bar", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/bar/$id", - "https://www.sourcemeta.com/schema", "/properties/bar/$id", - "https://www.sourcemeta.com/bar", "/$id", "/properties/bar", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/bar#/$id", - "https://www.sourcemeta.com/schema", "/properties/bar/$id", - "https://www.sourcemeta.com/bar", "/$id", "/properties/bar", false, - false); - - // baz - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema", "/properties/baz", - "https://www.sourcemeta.com/baz", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/baz/$id", - "https://www.sourcemeta.com/schema", "/properties/baz/$id", - "https://www.sourcemeta.com/baz", "/$id", "/properties/baz", false, - false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/baz/items", - "https://www.sourcemeta.com/schema", "/properties/baz/items", - "https://www.sourcemeta.com/baz", "/items", "/properties/baz", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/baz/items/$anchor", - "https://www.sourcemeta.com/schema", "/properties/baz/items/$anchor", - "https://www.sourcemeta.com/baz", "/items/$anchor", - "/properties/baz/items", false, false); - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/baz#/$id", - "https://www.sourcemeta.com/schema", "/properties/baz/$id", - "https://www.sourcemeta.com/baz", "/$id", "/properties/baz", false, - false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/baz#/items", - "https://www.sourcemeta.com/schema", "/properties/baz/items", - "https://www.sourcemeta.com/baz", "/items", "/properties/baz", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/baz#/items/$anchor", - "https://www.sourcemeta.com/schema", "/properties/baz/items/$anchor", - "https://www.sourcemeta.com/baz", "/items/$anchor", - "/properties/baz/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/bar", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/baz", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/baz#extra", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/qux", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo/items", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz/items", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/baz#/items", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo#test", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/qux", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/bar", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/baz", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/baz#extra", - "https://www.sourcemeta.com/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/qux"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/qux"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo#test", - "https://www.sourcemeta.com/qux"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/qux", - "https://www.sourcemeta.com/qux"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/bar", - "https://www.sourcemeta.com/qux"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/baz", - "https://www.sourcemeta.com/qux"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/baz#extra", - "https://www.sourcemeta.com/qux"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/qux", - "https://www.sourcemeta.com/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/bar", - "https://www.sourcemeta.com/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/baz", - "https://www.sourcemeta.com/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/baz#extra", - "https://www.sourcemeta.com/bar"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/baz"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/baz"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/qux", - "https://www.sourcemeta.com/baz"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/bar", - "https://www.sourcemeta.com/baz"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/baz", - "https://www.sourcemeta.com/baz"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/baz#extra", - "https://www.sourcemeta.com/baz"); -} - -TEST(JSONSchema_frame_2020_12, id_override) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "$id": "schema" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaFrameError); -} - -TEST(JSONSchema_frame_2020_12, static_anchor_override) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": "foo", - "items": { "$anchor": "foo" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (sourcemeta::core::SchemaAnchorCollisionError &error) { - EXPECT_EQ(error.identifier(), "https://www.sourcemeta.com/schema#foo"); - EXPECT_EQ(sourcemeta::core::to_string(error.location()), "/items"); - EXPECT_EQ(sourcemeta::core::to_string(error.other()), ""); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, explicit_argument_id_same) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema", - "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, anchor_top_level) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": "foo" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$anchor", - "https://www.sourcemeta.com/schema", "/$anchor", - "https://www.sourcemeta.com/schema", "/$anchor", "", false, false); - - // Anchors - - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#foo", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#foo", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, explicit_argument_id_different) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { - "$anchor": "foo" - }, - "properties": { - "one": { - "$id": "test", - "$anchor": "bar" - }, - "two": { - "$id": "https://www.test.com", - "$anchor": "baz" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema", - "https://www.example.com"); - - EXPECT_EQ(frame.locations().size(), 38); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.example.com", "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.example.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.example.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.test.com", "https://www.sourcemeta.com/schema", - "/properties/two", "https://www.test.com", "", "", false, false); - - // Anchors - - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#foo", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.example.com#foo", "https://www.sourcemeta.com/schema", - "/items", "https://www.example.com", "/items", "", false, false); - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/test#bar", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.example.com/test#bar", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.example.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.test.com#baz", "https://www.sourcemeta.com/schema", - "/properties/two", "https://www.test.com", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/$anchor", - "https://www.sourcemeta.com/schema", "/items/$anchor", - "https://www.sourcemeta.com/schema", "/items/$anchor", "/items", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/one", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/one/$id", - "https://www.sourcemeta.com/schema", "/properties/one/$id", - "https://www.sourcemeta.com/test", "/$id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/one/$anchor", - "https://www.sourcemeta.com/schema", "/properties/one/$anchor", - "https://www.sourcemeta.com/test", "/$anchor", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/two", - "https://www.sourcemeta.com/schema", "/properties/two", - "https://www.test.com", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/two/$id", - "https://www.sourcemeta.com/schema", "/properties/two/$id", - "https://www.test.com", "/$id", "/properties/two", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/two/$anchor", - "https://www.sourcemeta.com/schema", "/properties/two/$anchor", - "https://www.test.com", "/$anchor", "/properties/two", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/test#/$id", - "https://www.sourcemeta.com/schema", "/properties/one/$id", - "https://www.sourcemeta.com/test", "/$id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/test#/$anchor", - "https://www.sourcemeta.com/schema", "/properties/one/$anchor", - "https://www.sourcemeta.com/test", "/$anchor", "/properties/one", false, - false); - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.test.com#/$id", "https://www.sourcemeta.com/schema", - "/properties/two/$id", "https://www.test.com", "/$id", "/properties/two", - false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.test.com#/$anchor", - "https://www.sourcemeta.com/schema", "/properties/two/$anchor", - "https://www.test.com", "/$anchor", "/properties/two", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com#foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test#bar", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com/test#bar", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com#baz", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/one", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/two", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/one", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/two", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#foo", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.test.com", - "https://www.sourcemeta.com/schema#/items"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test#bar", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "https://www.test.com", - "https://www.sourcemeta.com/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.test.com"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", - "https://www.test.com"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", "https://www.test.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - "https://www.test.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com#baz", - "https://www.test.com"); -} - -TEST(JSONSchema_frame_2020_12, dynamic_refs_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$dynamicRef": "#" }, - "bar": { "$dynamicRef": "#/properties/baz" }, - "baz": { - "$anchor": "baz", - "type": "string" - }, - "qux": { - "$id": "test", - "$dynamicRef": "#" - }, - "anchor": { - "$dynamicRef": "#baz" - }, - "dynamic": { - "$dynamicAnchor": "dynamic" - }, - "extra": { - "$dynamicRef": "#dynamic" - }, - "unknown": { - "$dynamicRef": "foo#xxx" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 28); - - // Resources - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema", "/properties/qux", - "https://www.sourcemeta.com/test", "", "", false, false); - - // Anchors - - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#baz", - "https://www.sourcemeta.com/schema", "/properties/baz", - "https://www.sourcemeta.com/schema", "/properties/baz", "", false, false); - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#dynamic", - "https://www.sourcemeta.com/schema", "/properties/dynamic", - "https://www.sourcemeta.com/schema", "/properties/dynamic", "", false, - false); - EXPECT_FRAME_DYNAMIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#dynamic", - "https://www.sourcemeta.com/schema", "/properties/dynamic", - "https://www.sourcemeta.com/schema", "/properties/dynamic", "", false, - false); - - // Subschemas - - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema", "/properties/baz", - "https://www.sourcemeta.com/schema", "/properties/baz", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/qux", - "https://www.sourcemeta.com/schema", "/properties/qux", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/anchor", - "https://www.sourcemeta.com/schema", "/properties/anchor", - "https://www.sourcemeta.com/schema", "/properties/anchor", "", false, - false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/dynamic", - "https://www.sourcemeta.com/schema", "/properties/dynamic", - "https://www.sourcemeta.com/schema", "/properties/dynamic", "", false, - false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/extra", - "https://www.sourcemeta.com/schema", "/properties/extra", - "https://www.sourcemeta.com/schema", "/properties/extra", "", false, - false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/unknown", - "https://www.sourcemeta.com/schema", "/properties/unknown", - "https://www.sourcemeta.com/schema", "/properties/unknown", "", false, - false); - - // Pointers (from root base URI) - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/foo/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/foo/$dynamicRef", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/bar/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/bar/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/bar/$dynamicRef", - "/properties/bar", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/baz/$anchor", - "https://www.sourcemeta.com/schema", "/properties/baz/$anchor", - "https://www.sourcemeta.com/schema", "/properties/baz/$anchor", - "/properties/baz", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/baz/type", - "https://www.sourcemeta.com/schema", "/properties/baz/type", - "https://www.sourcemeta.com/schema", "/properties/baz/type", - "/properties/baz", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/qux/$id", - "https://www.sourcemeta.com/schema", "/properties/qux/$id", - "https://www.sourcemeta.com/test", "/$id", "/properties/qux", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/qux/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/qux/$dynamicRef", - "https://www.sourcemeta.com/test", "/$dynamicRef", "/properties/qux", - false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/anchor/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/anchor/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/anchor/$dynamicRef", - "/properties/anchor", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, - "https://www.sourcemeta.com/schema#/properties/dynamic/$dynamicAnchor", - "https://www.sourcemeta.com/schema", "/properties/dynamic/$dynamicAnchor", - "https://www.sourcemeta.com/schema", "/properties/dynamic/$dynamicAnchor", - "/properties/dynamic", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/extra/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/extra/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/extra/$dynamicRef", - "/properties/extra", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, - "https://www.sourcemeta.com/schema#/properties/unknown/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/unknown/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/unknown/$dynamicRef", - "/properties/unknown", false, false); - - // Pointers (from nested base URI) - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/test#/$id", - "https://www.sourcemeta.com/schema", "/properties/qux/$id", - "https://www.sourcemeta.com/test", "/$id", "/properties/qux", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/test#/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/qux/$dynamicRef", - "https://www.sourcemeta.com/test", "/$dynamicRef", "/properties/qux", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 7); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/properties/foo/$dynamicRef", "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", std::nullopt, "#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/bar/$dynamicRef", - "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema", - "/properties/baz", "#/properties/baz"); - EXPECT_STATIC_REFERENCE(frame, "/properties/qux/$dynamicRef", - "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/test", std::nullopt, "#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/anchor/$dynamicRef", - "https://www.sourcemeta.com/schema#baz", - "https://www.sourcemeta.com/schema", "baz", "#baz"); - EXPECT_DYNAMIC_REFERENCE(frame, "/properties/extra/$dynamicRef", - "https://www.sourcemeta.com/schema#dynamic", - "https://www.sourcemeta.com/schema", "dynamic", - "#dynamic"); - EXPECT_DYNAMIC_REFERENCE(frame, "/properties/unknown/$dynamicRef", - "https://www.sourcemeta.com/foo#xxx", - "https://www.sourcemeta.com/foo", "xxx", "foo#xxx"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#baz", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#dynamic", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, - "https://www.sourcemeta.com/schema#dynamic", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/qux", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/anchor", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/dynamic", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/extra", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/unknown", - frame.root()); - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/anchor", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/dynamic", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/extra", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/unknown", - "https://www.sourcemeta.com/schema#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#baz", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/dynamic", - "https://www.sourcemeta.com/schema#/properties/bar"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/baz"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/baz"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/baz"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema#/properties/baz"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#baz", - "https://www.sourcemeta.com/schema#/properties/baz"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema#/properties/baz"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/qux", - "https://www.sourcemeta.com/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/anchor"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/anchor"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/anchor", - "https://www.sourcemeta.com/schema#/properties/anchor"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema#/properties/anchor"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#baz", - "https://www.sourcemeta.com/schema#/properties/anchor"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema#/properties/anchor"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/dynamic"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/dynamic"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema#/properties/dynamic"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/dynamic", - "https://www.sourcemeta.com/schema#/properties/dynamic"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#dynamic", - "https://www.sourcemeta.com/schema#/properties/dynamic"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/extra"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/extra"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema#/properties/extra"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/extra", - "https://www.sourcemeta.com/schema#/properties/extra"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/dynamic", - "https://www.sourcemeta.com/schema#/properties/extra"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#dynamic", - "https://www.sourcemeta.com/schema#/properties/extra"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/unknown"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/unknown"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema#/properties/unknown"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/unknown", - "https://www.sourcemeta.com/schema#/properties/unknown"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema#/properties/unknown"); -} - -TEST(JSONSchema_frame_2020_12, dynamic_refs_with_no_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$dynamicRef": "#" }, - "bar": { "$dynamicRef": "#/properties/baz" }, - "baz": { - "$anchor": "baz", - "type": "string" - }, - "qux": { - "$id": "https://www.example.com", - "$dynamicRef": "#" - }, - "anchor": { - "$dynamicRef": "#baz" - }, - "dynamic": { - "$dynamicAnchor": "dynamic" - }, - "extra": { - "$dynamicRef": "#dynamic" - }, - "unknown": { - "$dynamicRef": "https://www.example.com/foo#xxx" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 27); - - // Resources - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.example.com", "", "/properties/qux", - "https://www.example.com", "", "", false, false); - - // Anchors - - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#baz", "/properties/baz", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#dynamic", "/properties/dynamic", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "#dynamic", "/properties/dynamic", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/bar", "/properties/bar", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/baz", "/properties/baz", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/qux", "/properties/qux", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/anchor", "/properties/anchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/dynamic", "/properties/dynamic", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/extra", "/properties/extra", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/unknown", "/properties/unknown", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - // Pointers (anonymous) - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$dynamicRef", "/properties/foo/$dynamicRef", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/bar/$dynamicRef", "/properties/bar/$dynamicRef", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/bar", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/baz/$anchor", "/properties/baz/$anchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/baz", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/baz/type", "/properties/baz/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/baz", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/qux/$id", "/properties/qux/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/qux", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/qux/$dynamicRef", "/properties/qux/$dynamicRef", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/qux", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/anchor/$dynamicRef", - "/properties/anchor/$dynamicRef", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/anchor", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/dynamic/$dynamicAnchor", - "/properties/dynamic/$dynamicAnchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/dynamic", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/extra/$dynamicRef", "/properties/extra/$dynamicRef", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/extra", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/unknown/$dynamicRef", - "/properties/unknown/$dynamicRef", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/unknown", false, false); - - // Pointers (from nested $id base URI) - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.example.com#/$id", "", "/properties/qux/$id", - "https://www.example.com", "/$id", "/properties/qux", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.example.com#/$dynamicRef", "", - "/properties/qux/$dynamicRef", "https://www.example.com", "/$dynamicRef", - "/properties/qux", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 7); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$dynamicRef", "", "", - std::nullopt, "#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/bar/$dynamicRef", - "#/properties/baz", "", "/properties/baz", - "#/properties/baz"); - EXPECT_STATIC_REFERENCE(frame, "/properties/qux/$dynamicRef", - "https://www.example.com", "https://www.example.com", - std::nullopt, "#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/anchor/$dynamicRef", "#baz", "", - "baz", "#baz"); - EXPECT_DYNAMIC_REFERENCE(frame, "/properties/extra/$dynamicRef", "#dynamic", - "", "dynamic", "#dynamic"); - EXPECT_DYNAMIC_REFERENCE(frame, "/properties/unknown/$dynamicRef", - "https://www.example.com/foo#xxx", - "https://www.example.com/foo", "xxx", - "https://www.example.com/foo#xxx"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#baz", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#dynamic", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#dynamic", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/bar", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/baz", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/qux", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/anchor", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/dynamic", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/extra", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/unknown", - frame.root()); - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/bar", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/baz", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/dynamic", - "#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/bar", - "#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/baz", - "#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#baz", "#/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "https://www.example.com", - "#/properties/bar"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/baz"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/baz"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/baz", - "#/properties/baz"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#baz", "#/properties/baz"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "https://www.example.com", - "#/properties/baz"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", - "https://www.example.com"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "https://www.example.com"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/baz", - "https://www.example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - "https://www.example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/qux", - "https://www.example.com"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/anchor"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/anchor", - "#/properties/anchor"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/baz", - "#/properties/anchor"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#baz", "#/properties/anchor"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/anchor"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", - "#/properties/dynamic"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/dynamic", - "#/properties/dynamic"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#dynamic", - "#/properties/dynamic"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/dynamic"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/extra"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/extra", - "#/properties/extra"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/dynamic", - "#/properties/extra"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#dynamic", - "#/properties/extra"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/extra"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", - "#/properties/unknown"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/unknown", - "#/properties/unknown"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/unknown"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "https://www.example.com", - "#/properties/unknown"); -} - -TEST(JSONSchema_frame_2020_12, ref_to_dynamic_anchor) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$anchor": "foo" - }, - "bar": { - "$ref": "#foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - - // Anchors - - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - - // Resources - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // Subschemas - - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", "", false, false); - - // Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$anchor", - "https://www.sourcemeta.com/schema", "/properties/foo/$anchor", - "https://www.sourcemeta.com/schema", "/properties/foo/$anchor", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/bar/$ref", - "https://www.sourcemeta.com/schema", "/properties/bar/$ref", - "https://www.sourcemeta.com/schema", "/properties/bar/$ref", - "/properties/bar", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/bar/$ref", - "https://www.sourcemeta.com/schema#foo", - "https://www.sourcemeta.com/schema", "foo", "#foo"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#foo", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#foo", - "https://www.sourcemeta.com/schema#/properties/bar"); -} - -TEST(JSONSchema_frame_2020_12, different_dynamic_and_refs_in_same_object) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$ref": "#/properties/bar", - "$dynamicRef": "#" - }, - "bar": { - "type": "string" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - - // Resources - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // Subschemas - - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", "", false, false); - - // Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$ref", - "https://www.sourcemeta.com/schema", "/properties/foo/$ref", - "https://www.sourcemeta.com/schema", "/properties/foo/$ref", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/foo/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/foo/$dynamicRef", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/bar/type", - "https://www.sourcemeta.com/schema", "/properties/bar/type", - "https://www.sourcemeta.com/schema", "/properties/bar/type", - "/properties/bar", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", - "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", - "/properties/bar", "#/properties/bar"); - EXPECT_STATIC_REFERENCE( - frame, "/properties/foo/$dynamicRef", "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", std::nullopt, "#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - frame.root()); - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/bar"); -} - -TEST(JSONSchema_frame_2020_12, same_dynamic_and_refs_in_same_object) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$ref": "#/properties/bar", - "$dynamicRef": "#/properties/bar" - }, - "bar": { - "type": "string" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - - // Resources - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // Subschemas - - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", "", false, false); - - // Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$ref", - "https://www.sourcemeta.com/schema", "/properties/foo/$ref", - "https://www.sourcemeta.com/schema", "/properties/foo/$ref", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/foo/$dynamicRef", - "https://www.sourcemeta.com/schema", "/properties/foo/$dynamicRef", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/bar/type", - "https://www.sourcemeta.com/schema", "/properties/bar/type", - "https://www.sourcemeta.com/schema", "/properties/bar/type", - "/properties/bar", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", - "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", - "/properties/bar", "#/properties/bar"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$dynamicRef", - "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", - "/properties/bar", "#/properties/bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/bar"); -} - -TEST(JSONSchema_frame_2020_12, dynamic_anchor_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "foo", - "properties": { - "foo": { - "$dynamicAnchor": "test" - }, - "bar": { - "$id": "bar", - "$dynamicAnchor": "test", - "$anchor": "test" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 21); - - // Dynamic anchors - - EXPECT_FRAME_DYNAMIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#foo", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_DYNAMIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#test", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_DYNAMIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/bar#test", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/bar", "", "", false, false); - - // Static anchors - - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#foo", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#test", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/bar#test", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/bar", "", "", false, false); - - // Static identifiers - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/bar", "", "", false, false); - - // Static pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$dynamicAnchor", - "https://www.sourcemeta.com/schema", "/$dynamicAnchor", - "https://www.sourcemeta.com/schema", "/$dynamicAnchor", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$dynamicAnchor", - "https://www.sourcemeta.com/schema", "/properties/foo/$dynamicAnchor", - "https://www.sourcemeta.com/schema", "/properties/foo/$dynamicAnchor", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/bar", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/bar/$id", - "https://www.sourcemeta.com/schema", "/properties/bar/$id", - "https://www.sourcemeta.com/bar", "/$id", "/properties/bar", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/bar/$dynamicAnchor", - "https://www.sourcemeta.com/schema", "/properties/bar/$dynamicAnchor", - "https://www.sourcemeta.com/bar", "/$dynamicAnchor", "/properties/bar", - false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/bar/$anchor", - "https://www.sourcemeta.com/schema", "/properties/bar/$anchor", - "https://www.sourcemeta.com/bar", "/$anchor", "/properties/bar", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/bar#/$id", - "https://www.sourcemeta.com/schema", "/properties/bar/$id", - "https://www.sourcemeta.com/bar", "/$id", "/properties/bar", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/bar#/$dynamicAnchor", - "https://www.sourcemeta.com/schema", "/properties/bar/$dynamicAnchor", - "https://www.sourcemeta.com/bar", "/$dynamicAnchor", "/properties/bar", - false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/bar#/$anchor", - "https://www.sourcemeta.com/schema", "/properties/bar/$anchor", - "https://www.sourcemeta.com/bar", "/$anchor", "/properties/bar", false, - false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Dynamic, "https://www.sourcemeta.com/schema#foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Dynamic, "https://www.sourcemeta.com/schema#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Dynamic, "https://www.sourcemeta.com/bar#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/bar#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/bar", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#test", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Dynamic, "https://www.sourcemeta.com/schema#test", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/bar", - "https://www.sourcemeta.com/schema#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/bar", - "https://www.sourcemeta.com/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/bar#test", - "https://www.sourcemeta.com/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, - "https://www.sourcemeta.com/bar#test", - "https://www.sourcemeta.com/bar"); -} - -TEST(JSONSchema_frame_2020_12, dynamic_anchor_without_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$dynamicAnchor": "test" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 7); - - // Dynamic anchors - - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "#test", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#test", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - // Static frames - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$dynamicAnchor", - "/properties/foo/$dynamicAnchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#test", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#test", "#/properties/foo"); -} - -TEST(JSONSchema_frame_2020_12, - dynamic_ref_to_single_dynamic_anchor_standalone) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicRef": "#test", - "$defs": { - "test": { - "$dynamicAnchor": "test" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - - // Dynamic anchors - - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "#test", "/$defs/test", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#test", "/$defs/test", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - - // Static frames - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$dynamicRef", "/$dynamicRef", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/test", "/$defs/test", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/test/$dynamicAnchor", "/$defs/test/$dynamicAnchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/test", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/$dynamicRef", "#test", "", "test", "#test"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/test", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/test", - "#/$defs/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#test", "#/$defs/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#test", "#/$defs/test"); -} - -TEST(JSONSchema_frame_2020_12, dynamic_ref_to_single_dynamic_anchor_external) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicRef": "#test", - "$defs": { - "test": { - "$dynamicAnchor": "test" - }, - "foo": { - "$ref": "https://sourcemeta.com" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - // Dynamic anchors - - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "#test", "/$defs/test", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#test", "/$defs/test", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - - // Static frames - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$dynamicRef", "/$dynamicRef", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/test", "/$defs/test", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/test/$dynamicAnchor", "/$defs/test/$dynamicAnchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/test", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/foo", "/$defs/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/foo/$ref", "/$defs/foo/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/foo", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_DYNAMIC_REFERENCE(frame, "/$dynamicRef", "#test", "", "test", "#test"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/foo/$ref", "https://sourcemeta.com", - "https://sourcemeta.com", std::nullopt, - "https://sourcemeta.com"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/test", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/test", - "#/$defs/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#test", "#/$defs/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#test", "#/$defs/test"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/foo", - "#/$defs/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/foo", "#/$defs/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/test", - "#/$defs/foo"); -} - -TEST(JSONSchema_frame_2020_12, dynamic_anchor_same_on_schema_resource) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "foo", - "items": { - "$dynamicAnchor": "foo" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (sourcemeta::core::SchemaAnchorCollisionError &error) { - EXPECT_EQ(error.identifier(), "https://www.sourcemeta.com/schema#foo"); - EXPECT_EQ(sourcemeta::core::to_string(error.location()), "/items"); - EXPECT_EQ(sourcemeta::core::to_string(error.other()), ""); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, no_id_recursive_empty_pointer) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$ref": "#" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$ref", "/properties/foo/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", "", "", std::nullopt, - "#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/foo"); -} - -TEST(JSONSchema_frame_2020_12, ref_metaschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, location_independent_identifier_anonymous) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "foo": { - "$id": "#foo" - }, - "bar": { - "$ref": "#foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaFrameError &error) { - EXPECT_EQ(error.identifier(), "#foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "#/$defs/string", - "$defs": { - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 7); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$ref", - "https://www.sourcemeta.com/schema", "/$ref", - "https://www.sourcemeta.com/schema", "/$ref", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs", - "https://www.sourcemeta.com/schema", "/$defs", - "https://www.sourcemeta.com/schema", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/$defs/string", - "https://www.sourcemeta.com/schema", "/$defs/string", - "https://www.sourcemeta.com/schema", "/$defs/string", "", false, true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs/string/type", - "https://www.sourcemeta.com/schema", "/$defs/string/type", - "https://www.sourcemeta.com/schema", "/$defs/string/type", - "/$defs/string", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "https://www.sourcemeta.com/schema#/$defs/string", - "https://www.sourcemeta.com/schema", "/$defs/string", "#/$defs/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/string", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/string", - "https://www.sourcemeta.com/schema#/$defs/string"); -} - -TEST(JSONSchema_frame_2020_12, ref_from_definitions) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "#/definitions/middle", - "definitions": { - "middle": { "$ref": "#/definitions/string" }, - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$ref", - "https://www.sourcemeta.com/schema", "/$ref", - "https://www.sourcemeta.com/schema", "/$ref", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/definitions", - "https://www.sourcemeta.com/schema", "/definitions", - "https://www.sourcemeta.com/schema", "/definitions", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/definitions/middle", - "https://www.sourcemeta.com/schema", "/definitions/middle", - "https://www.sourcemeta.com/schema", "/definitions/middle", "", false, - true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/definitions/middle/$ref", - "https://www.sourcemeta.com/schema", "/definitions/middle/$ref", - "https://www.sourcemeta.com/schema", "/definitions/middle/$ref", - "/definitions/middle", false, true); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/definitions/string", - "https://www.sourcemeta.com/schema", "/definitions/string", - "https://www.sourcemeta.com/schema", "/definitions/string", "", false, - true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/definitions/string/type", - "https://www.sourcemeta.com/schema", "/definitions/string/type", - "https://www.sourcemeta.com/schema", "/definitions/string/type", - "/definitions/string", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "https://www.sourcemeta.com/schema#/definitions/middle", - "https://www.sourcemeta.com/schema", "/definitions/middle", - "#/definitions/middle"); - EXPECT_STATIC_REFERENCE( - frame, "/definitions/middle/$ref", - "https://www.sourcemeta.com/schema#/definitions/string", - "https://www.sourcemeta.com/schema", "/definitions/string", - "#/definitions/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/definitions/middle", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/definitions/string", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/definitions/middle"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/definitions/middle", - "https://www.sourcemeta.com/schema#/definitions/middle"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/definitions/string", - "https://www.sourcemeta.com/schema#/definitions/middle"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/definitions/string"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/definitions/middle", - "https://www.sourcemeta.com/schema#/definitions/string"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/definitions/string", - "https://www.sourcemeta.com/schema#/definitions/string"); -} - -TEST(JSONSchema_frame_2020_12, relative_base_uri_without_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "common" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE(frame, "common", "common", "", "common", - "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER(frame, "common#/$schema", "common", - "/$schema", "common", "/$schema", "", - false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER(frame, "common#/$id", "common", "/$id", - "common", "/$id", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, relative_base_uri_with_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "common", - "allOf": [ { "$ref": "#foo" } ], - "$defs": { - "foo": { - "$anchor": "foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE(frame, "common", "common", "", "common", - "", std::nullopt, false, false); - - // Anchors - EXPECT_FRAME_STATIC_2020_12_ANCHOR(frame, "common#foo", "common", - "/$defs/foo", "common", "/$defs/foo", "", - false, true); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER(frame, "common#/$schema", "common", - "/$schema", "common", "/$schema", "", - false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER(frame, "common#/$id", "common", "/$id", - "common", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER(frame, "common#/allOf", "common", - "/allOf", "common", "/allOf", "", false, - false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA(frame, "common#/allOf/0", "common", - "/allOf/0", "common", "/allOf/0", "", - false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "common#/allOf/0/$ref", "common", "/allOf/0/$ref", "common", - "/allOf/0/$ref", "/allOf/0", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER(frame, "common#/$defs", "common", - "/$defs", "common", "/$defs", "", false, - false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA(frame, "common#/$defs/foo", "common", - "/$defs/foo", "common", "/$defs/foo", - "", false, true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "common#/$defs/foo/$anchor", "common", "/$defs/foo/$anchor", - "common", "/$defs/foo/$anchor", "/$defs/foo", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/allOf/0/$ref", "common#foo", "common", "foo", - "#foo"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/allOf/0", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/$defs/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "common", - "common#/allOf/0"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/allOf/0", - "common#/allOf/0"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/$defs/foo", - "common#/allOf/0"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "common", - "common#/$defs/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "common#/allOf/0", - "common#/$defs/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/$defs/foo", - "common#/$defs/foo"); -} - -TEST(JSONSchema_frame_2020_12, relative_base_with_relative_path_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "foo/bar/baz", - "$ref": "qux" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 4); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE(frame, "foo/bar/baz", "foo/bar/baz", "", - "foo/bar/baz", "", std::nullopt, false, - false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER(frame, "foo/bar/baz#/$schema", - "foo/bar/baz", "/$schema", "foo/bar/baz", - "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER(frame, "foo/bar/baz#/$id", "foo/bar/baz", - "/$id", "foo/bar/baz", "/$id", "", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER(frame, "foo/bar/baz#/$ref", "foo/bar/baz", - "/$ref", "foo/bar/baz", "/$ref", "", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "foo/bar/qux", "foo/bar/qux", - std::nullopt, "qux"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "foo/bar/baz", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, idempotent_with_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "#/$defs/string", - "$defs": { - "string": {} - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$ref", - "https://www.sourcemeta.com/schema", "/$ref", - "https://www.sourcemeta.com/schema", "/$ref", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs", - "https://www.sourcemeta.com/schema", "/$defs", - "https://www.sourcemeta.com/schema", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/$defs/string", - "https://www.sourcemeta.com/schema", "/$defs/string", - "https://www.sourcemeta.com/schema", "/$defs/string", "", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "https://www.sourcemeta.com/schema#/$defs/string", - "https://www.sourcemeta.com/schema", "/$defs/string", "#/$defs/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/string", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/string", - "https://www.sourcemeta.com/schema#/$defs/string"); -} - -TEST(JSONSchema_frame_2020_12, allof_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "allOf": [ - { "$ref": "https://json-schema.org/draft/2020-12/schema" }, - { "$ref": "https://json-schema.org/draft/2020-12/meta/hyper-schema" } - ] - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 7); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/allOf/0", "/allOf/0", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/allOf/1", "/allOf/1", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - // Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/allOf", "/allOf", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/allOf/0/$ref", "/allOf/0/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/allOf/0", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/allOf/1/$ref", "/allOf/1/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/allOf/1", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/allOf/0/$ref", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/allOf/1/$ref", - "https://json-schema.org/draft/2020-12/meta/hyper-schema", - "https://json-schema.org/draft/2020-12/meta/hyper-schema", std::nullopt, - "https://json-schema.org/draft/2020-12/meta/hyper-schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/allOf/0", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/allOf/1", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/allOf/0"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/allOf/0", "#/allOf/0"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/allOf/1", "#/allOf/0"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/allOf/1"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/allOf/0", "#/allOf/1"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/allOf/1", "#/allOf/1"); -} - -TEST(JSONSchema_frame_2020_12, properties_with_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "type": "string" - }, - "bar": { - "$ref": "#/properties/foo" - }, - "baz": { - "items": { - "$ref": "#/properties/bar" - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 11); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "/properties/foo", false, false); - - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/bar/$ref", - "https://www.sourcemeta.com/schema", "/properties/bar/$ref", - "https://www.sourcemeta.com/schema", "/properties/bar/$ref", - "/properties/bar", false, false); - - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema", "/properties/baz", - "https://www.sourcemeta.com/schema", "/properties/baz", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/baz/items", - "https://www.sourcemeta.com/schema", "/properties/baz/items", - "https://www.sourcemeta.com/schema", "/properties/baz/items", - "/properties/baz", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/baz/items/$ref", - "https://www.sourcemeta.com/schema", "/properties/baz/items/$ref", - "https://www.sourcemeta.com/schema", "/properties/baz/items/$ref", - "/properties/baz/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/bar/$ref", - "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", - "/properties/foo", "#/properties/foo"); - EXPECT_STATIC_REFERENCE(frame, "/properties/baz/items/$ref", - "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", - "/properties/bar", "#/properties/bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz/items", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz/items", - "https://www.sourcemeta.com/schema#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz/items", - "https://www.sourcemeta.com/schema#/properties/bar"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/baz"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/baz"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/baz"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema#/properties/baz"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz/items", - "https://www.sourcemeta.com/schema#/properties/baz"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/baz/items"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/baz/items"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/baz/items"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema#/properties/baz/items"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/baz/items", - "https://www.sourcemeta.com/schema#/properties/baz/items"); -} - -TEST(JSONSchema_frame_2020_12, property_ref_defs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$ref": "#/$defs/helper" - }, - "bar": { - "$ref": "#/$defs/helper/items" - } - }, - "$defs": { - "helper": { - "items": { - "additionalProperties": { - "type": "string" - } - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 13); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$ref", - "https://www.sourcemeta.com/schema", "/properties/foo/$ref", - "https://www.sourcemeta.com/schema", "/properties/foo/$ref", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/bar/$ref", - "https://www.sourcemeta.com/schema", "/properties/bar/$ref", - "https://www.sourcemeta.com/schema", "/properties/bar/$ref", - "/properties/bar", false, false); - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs", - "https://www.sourcemeta.com/schema", "/$defs", - "https://www.sourcemeta.com/schema", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/$defs/helper", - "https://www.sourcemeta.com/schema", "/$defs/helper", - "https://www.sourcemeta.com/schema", "/$defs/helper", "", false, true); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/$defs/helper/items", - "https://www.sourcemeta.com/schema", "/$defs/helper/items", - "https://www.sourcemeta.com/schema", "/$defs/helper/items", - "/$defs/helper", false, true); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, - "https://www.sourcemeta.com/schema#/$defs/helper/items/" - "additionalProperties", - "https://www.sourcemeta.com/schema", - "/$defs/helper/items/additionalProperties", - "https://www.sourcemeta.com/schema", - "/$defs/helper/items/additionalProperties", "/$defs/helper/items", false, - true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, - "https://www.sourcemeta.com/schema#/$defs/helper/items/" - "additionalProperties/type", - "https://www.sourcemeta.com/schema", - "/$defs/helper/items/additionalProperties/type", - "https://www.sourcemeta.com/schema", - "/$defs/helper/items/additionalProperties/type", - "/$defs/helper/items/additionalProperties", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", - "https://www.sourcemeta.com/schema#/$defs/helper", - "https://www.sourcemeta.com/schema", "/$defs/helper", - "#/$defs/helper"); - EXPECT_STATIC_REFERENCE( - frame, "/properties/bar/$ref", - "https://www.sourcemeta.com/schema#/$defs/helper/items", - "https://www.sourcemeta.com/schema", "/$defs/helper/items", - "#/$defs/helper/items"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/helper", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/helper/items", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/$defs/" - "helper/items/additionalProperties", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/helper", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/helper/items", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://www.sourcemeta.com/schema#/$defs/helper/items/" - "additionalProperties", - "https://www.sourcemeta.com/schema#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/helper", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/helper/items", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://www.sourcemeta.com/schema#/$defs/helper/items/" - "additionalProperties", - "https://www.sourcemeta.com/schema#/properties/bar"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/$defs/helper"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/$defs/helper"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/$defs/helper"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/helper", - "https://www.sourcemeta.com/schema#/$defs/helper"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/helper/items", - "https://www.sourcemeta.com/schema#/$defs/helper"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://www.sourcemeta.com/schema#/$defs/helper/items/" - "additionalProperties", - "https://www.sourcemeta.com/schema#/$defs/helper"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/$defs/helper/items"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/$defs/helper/items"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/$defs/helper/items"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/helper", - "https://www.sourcemeta.com/schema#/$defs/helper/items"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/helper/items", - "https://www.sourcemeta.com/schema#/$defs/helper/items"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://www.sourcemeta.com/schema#/$defs/helper/items/" - "additionalProperties", - "https://www.sourcemeta.com/schema#/$defs/helper/items"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/$defs/helper/items/" - "additionalProperties"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/$defs/helper/items/" - "additionalProperties"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/$defs/helper/items/" - "additionalProperties"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/helper", - "https://www.sourcemeta.com/schema#/$defs/helper/items/" - "additionalProperties"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/helper/items", - "https://www.sourcemeta.com/schema#/$defs/helper/items/" - "additionalProperties"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://www.sourcemeta.com/schema#/$defs/helper/items/" - "additionalProperties", - "https://www.sourcemeta.com/schema#/$defs/helper/items/" - "additionalProperties"); -} - -TEST(JSONSchema_frame_2020_12, property_cross_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$ref": "#/properties/bar" - }, - "bar": { - "items": { - "$anchor": "foo", - "additionalProperties": true - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 11); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$ref", - "https://www.sourcemeta.com/schema", "/properties/foo/$ref", - "https://www.sourcemeta.com/schema", "/properties/foo/$ref", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/bar/items", - "https://www.sourcemeta.com/schema", "/properties/bar/items", - "https://www.sourcemeta.com/schema", "/properties/bar/items", - "/properties/bar", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/bar/items/$anchor", - "https://www.sourcemeta.com/schema", "/properties/bar/items/$anchor", - "https://www.sourcemeta.com/schema", "/properties/bar/items/$anchor", - "/properties/bar/items", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, - "https://www.sourcemeta.com/schema#/properties/bar/items/" - "additionalProperties", - "https://www.sourcemeta.com/schema", - "/properties/bar/items/additionalProperties", - "https://www.sourcemeta.com/schema", - "/properties/bar/items/additionalProperties", "/properties/bar/items", - false, false); - - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#foo", - "https://www.sourcemeta.com/schema", "/properties/bar/items", - "https://www.sourcemeta.com/schema", "/properties/bar/items", - "/properties/bar", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", - "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", - "/properties/bar", "#/properties/bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar/items", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://www.sourcemeta.com/schema#/properties/bar/items/" - "additionalProperties", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#foo", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar/items", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://www.sourcemeta.com/schema#/properties/bar/items/" - "additionalProperties", - "https://www.sourcemeta.com/schema#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar/items", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://www.sourcemeta.com/schema#/properties/bar/items/" - "additionalProperties", - "https://www.sourcemeta.com/schema#/properties/bar"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/bar/items"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/bar/items"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/bar/items"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar/items", - "https://www.sourcemeta.com/schema#/properties/bar/items"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://www.sourcemeta.com/schema#/properties/bar/items/" - "additionalProperties", - "https://www.sourcemeta.com/schema#/properties/bar/items"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/bar/items/" - "additionalProperties"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/bar/items/" - "additionalProperties"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/bar/items/" - "additionalProperties"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar/items", - "https://www.sourcemeta.com/schema#/properties/bar/items/" - "additionalProperties"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://www.sourcemeta.com/schema#/properties/bar/items/" - "additionalProperties", - "https://www.sourcemeta.com/schema#/properties/bar/items/" - "additionalProperties"); -} - -TEST(JSONSchema_frame_2020_12, dynamic_ref_multiple_targets) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "test", - "properties": { - "foo": { - "$id": "foo", - "$dynamicAnchor": "test" - }, - "bar": { - "$dynamicRef": "#test" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 17); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.example.com", "https://www.example.com", "", - "https://www.example.com", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.example.com/foo", "https://www.example.com", - "/properties/foo", "https://www.example.com/foo", "", "", false, false); - - // Subschemas - - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.example.com#/properties/foo", - "https://www.example.com", "/properties/foo", - "https://www.example.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.example.com#/properties/bar", - "https://www.example.com", "/properties/bar", "https://www.example.com", - "/properties/bar", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.example.com#/$id", "https://www.example.com", "/$id", - "https://www.example.com", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.example.com#/$schema", "https://www.example.com", - "/$schema", "https://www.example.com", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.example.com#/$dynamicAnchor", - "https://www.example.com", "/$dynamicAnchor", "https://www.example.com", - "/$dynamicAnchor", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.example.com#/properties", "https://www.example.com", - "/properties", "https://www.example.com", "/properties", "", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.example.com#/properties/foo/$id", - "https://www.example.com", "/properties/foo/$id", - "https://www.example.com/foo", "/$id", "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.example.com#/properties/foo/$dynamicAnchor", - "https://www.example.com", "/properties/foo/$dynamicAnchor", - "https://www.example.com/foo", "/$dynamicAnchor", "/properties/foo", - false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.example.com#/properties/bar/$dynamicRef", - "https://www.example.com", "/properties/bar/$dynamicRef", - "https://www.example.com", "/properties/bar/$dynamicRef", - "/properties/bar", false, false); - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.example.com/foo#/$id", "https://www.example.com", - "/properties/foo/$id", "https://www.example.com/foo", "/$id", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.example.com/foo#/$dynamicAnchor", - "https://www.example.com", "/properties/foo/$dynamicAnchor", - "https://www.example.com/foo", "/$dynamicAnchor", "/properties/foo", - false, false); - - // Anchors - - // Note that instance locations here are weird, given that instance locations - // operate solely on pointers, independently on the location type. So these - // locations have those instance locations, even though they don't originate - // from static anchors - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.example.com#test", "https://www.example.com", "", - "https://www.example.com", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.example.com/foo#test", "https://www.example.com", - "/properties/foo", "https://www.example.com/foo", "", "", false, false); - - EXPECT_FRAME_DYNAMIC_2020_12_ANCHOR( - frame, "https://www.example.com#test", "https://www.example.com", "", - "https://www.example.com", "", std::nullopt, false, false); - EXPECT_FRAME_DYNAMIC_2020_12_ANCHOR( - frame, "https://www.example.com/foo#test", "https://www.example.com", - "/properties/foo", "https://www.example.com/foo", "", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_DYNAMIC_REFERENCE(frame, "/properties/bar/$dynamicRef", - "https://www.example.com#test", - "https://www.example.com", "test", "#test"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/bar", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com#test", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com/foo#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, - "https://www.example.com#test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Dynamic, "https://www.example.com/foo#test", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.example.com", - "https://www.example.com#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.example.com#/properties/foo", - "https://www.example.com#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.example.com#/properties/bar", - "https://www.example.com#/properties/foo"); - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - "https://www.example.com#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.example.com#/properties/foo", - "https://www.example.com#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.example.com#/properties/bar", - "https://www.example.com#/properties/bar"); -} - -TEST(JSONSchema_frame_2020_12, cross_id_anonymous_nested) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "#/$defs/schema/items", - "$defs": { - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com", - "items": true - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 12); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - // From the top - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/schema", "/$defs/schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/schema/$schema", "/$defs/schema/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/schema/$id", "/$defs/schema/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/schema/items", "/$defs/schema/items", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - - // From within - - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "/$defs/schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$schema", "/$defs/schema/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$id", "/$defs/schema/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com#/items", "/$defs/schema/items", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "#/$defs/schema/items", "", - "/$defs/schema/items", "#/$defs/schema/items"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/schema/$schema", - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", - std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/schema", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/schema/items", - frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com#/items", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/schema"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/schema", - "#/$defs/schema"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/schema/items", - "#/$defs/schema"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", - "#/$defs/schema/items"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/schema", - "#/$defs/schema/items"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/schema/items", - "#/$defs/schema/items"); -} - -TEST(JSONSchema_frame_2020_12, relative_id_with_absolute_default_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "relative", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema", - "https://example.com/relative"); - - EXPECT_EQ(frame.locations().size(), 6); - - // With current identifier - EXPECT_FRAME_STATIC_2020_12_RESOURCE(frame, "relative", "relative", "", - "relative", "", std::nullopt, false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER(frame, "relative#/$id", "relative", - "/$id", "relative", "/$id", "", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER(frame, "relative#/$schema", "relative", - "/$schema", "relative", "/$schema", "", - false, false); - - // With default identifier - EXPECT_FRAME_STATIC_2020_12_RESOURCE(frame, "https://example.com/relative", - "relative", "", "relative", "", - std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/relative#/$id", "relative", "/$id", - "relative", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/relative#/$schema", "relative", "/$schema", - "relative", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "relative", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com/relative", - frame.root()); -} - -TEST(JSONSchema_frame_2020_12, zero_paths) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, "", "", {}); - - EXPECT_EQ(frame.locations().size(), 0); - EXPECT_EQ(frame.references().size(), 0); -} - -TEST(JSONSchema_frame_2020_12, single_nested_path_recursive_with_identifier) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "wrapper": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "#" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - const sourcemeta::core::Pointer wrapper_path{"wrapper"}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, "", "", - {sourcemeta::core::to_weak_pointer(wrapper_path)}); - - EXPECT_EQ(frame.locations().size(), 8); - - // From the nested identifier - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", "", "/wrapper", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", "", "/wrapper/$id", - "https://www.sourcemeta.com/schema", "/$id", "/wrapper", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", "", - "/wrapper/$schema", "https://www.sourcemeta.com/schema", "/$schema", - "/wrapper", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$ref", "", "/wrapper/$ref", - "https://www.sourcemeta.com/schema", "/$ref", "/wrapper", false, false); - - // From the root - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/wrapper", "/wrapper", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/wrapper/$id", "/wrapper/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/wrapper", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/wrapper/$schema", "/wrapper/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/wrapper", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/wrapper/$ref", "/wrapper/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/wrapper", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/wrapper/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Because the schema has `$id`, `#` does not escape to the root - EXPECT_STATIC_REFERENCE( - frame, "/wrapper/$ref", "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", std::nullopt, "#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/wrapper", - "https://www.sourcemeta.com/schema"); -} - -TEST(JSONSchema_frame_2020_12, - single_nested_path_recursive_without_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "wrapper": { - "$ref": "#/wrapper" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - const sourcemeta::core::Pointer wrapper_path{"wrapper"}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema", "", - {sourcemeta::core::to_weak_pointer(wrapper_path)}); - - EXPECT_EQ(frame.locations().size(), 2); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/wrapper", "/wrapper", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/wrapper/$ref", "/wrapper/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/wrapper", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - // Without an identifier, the reference goes from the root - EXPECT_STATIC_REFERENCE(frame, "/wrapper/$ref", "#/wrapper", "", "/wrapper", - "#/wrapper"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/wrapper", "#/wrapper"); -} - -TEST(JSONSchema_frame_2020_12, single_nested_anonymous_with_nested_resource) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "wrapper": { - "items": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": "test" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - const sourcemeta::core::Pointer wrapper_path{"wrapper"}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema", "", - {sourcemeta::core::to_weak_pointer(wrapper_path)}); - - EXPECT_EQ(frame.locations().size(), 10); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/wrapper", "/wrapper", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - std::nullopt, false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/wrapper/items", "/wrapper/items", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/wrapper", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/wrapper/items/$id", "/wrapper/items/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/wrapper/items", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/wrapper/items/$schema", "/wrapper/items/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/wrapper/items", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/wrapper/items/$anchor", "/wrapper/items/$anchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/wrapper/items", false, false); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", "", "/wrapper/items", - "https://www.sourcemeta.com/schema", "", "/wrapper", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", "", "/wrapper/items/$id", - "https://www.sourcemeta.com/schema", "/$id", "/wrapper/items", false, - false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", "", - "/wrapper/items/$schema", "https://www.sourcemeta.com/schema", "/$schema", - "/wrapper/items", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$anchor", "", - "/wrapper/items/$anchor", "https://www.sourcemeta.com/schema", "/$anchor", - "/wrapper/items", false, false); - - // Anchors - - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#test", "", "/wrapper/items", - "https://www.sourcemeta.com/schema", "", "/wrapper", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE(frame, "/wrapper/items/$schema", - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", - std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/wrapper", "#/wrapper"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/wrapper/items", - "#/wrapper"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", "#/wrapper"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#test", "#/wrapper"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/wrapper", - "#/wrapper/items"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/wrapper/items", - "#/wrapper/items"); -} - -TEST(JSONSchema_frame_2020_12, multiple_nested_cross_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "wrapper": { - "$ref": "#/common/test" - }, - "common": { - "test": { - "$anchor": "foo", - "$ref": "#/common/with-id" - }, - "with-id": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": "bar", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - const sourcemeta::core::Pointer path1{"wrapper"}; - const sourcemeta::core::Pointer path2{"common", "test"}; - const sourcemeta::core::Pointer path3{"common", "with-id"}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema", "", - {sourcemeta::core::to_weak_pointer(path1), - sourcemeta::core::to_weak_pointer(path2), - sourcemeta::core::to_weak_pointer(path3)}); - - EXPECT_EQ(frame.locations().size(), 17); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/wrapper", "/wrapper", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/wrapper/$ref", "/wrapper/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/wrapper", false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/common/test", "/common/test", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/common/test/$anchor", "/common/test/$anchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/common/test", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/common/test/$ref", "/common/test/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/common/test", false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/common/with-id", "/common/with-id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/common/with-id/$id", "/common/with-id/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/common/with-id", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/common/with-id/$schema", "/common/with-id/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/common/with-id", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/common/with-id/$anchor", "/common/with-id/$anchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/common/with-id", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/common/with-id/type", "/common/with-id/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/common/with-id", false, false); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", "", "/common/with-id", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", "", - "/common/with-id/$id", "https://www.sourcemeta.com/schema", "/$id", - "/common/with-id", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", "", - "/common/with-id/$schema", "https://www.sourcemeta.com/schema", - "/$schema", "/common/with-id", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$anchor", "", - "/common/with-id/$anchor", "https://www.sourcemeta.com/schema", - "/$anchor", "/common/with-id", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/type", "", - "/common/with-id/type", "https://www.sourcemeta.com/schema", "/type", - "/common/with-id", false, false); - - // Anchors - - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#foo", "/common/test", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#bar", "", "/common/with-id", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // References - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE(frame, "/wrapper/$ref", "#/common/test", "", - "/common/test", "#/common/test"); - EXPECT_STATIC_REFERENCE(frame, "/common/test/$ref", "#/common/with-id", "", - "/common/with-id", "#/common/with-id"); - EXPECT_STATIC_REFERENCE(frame, "/common/with-id/$schema", - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", - std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/wrapper", "#/wrapper"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/common/test", "#/wrapper"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/common/with-id", - "#/wrapper"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", "#/wrapper"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#foo", "#/wrapper"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#bar", "#/wrapper"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/wrapper", - "#/common/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/common/test", - "#/common/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/common/with-id", - "#/common/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/wrapper", - "#/common/with-id"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/common/test", - "#/common/with-id"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/common/with-id", - "#/common/with-id"); -} - -TEST(JSONSchema_frame_2020_12, multiple_nested_cross_ref_missing_target) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "wrapper": { - "$ref": "#/common/test" - }, - "common": { - "test": { - "$ref": "#/common/with-id" - }, - "with-id": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - const sourcemeta::core::Pointer path1{"wrapper"}; - const sourcemeta::core::Pointer path2{"common", "test"}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema", "", - {sourcemeta::core::to_weak_pointer(path1), - sourcemeta::core::to_weak_pointer(path2)}); - - EXPECT_EQ(frame.locations().size(), 4); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/wrapper", "/wrapper", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/wrapper/$ref", "/wrapper/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/wrapper", false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/common/test", "/common/test", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/common/test/$ref", "/common/test/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/common/test", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE(frame, "/wrapper/$ref", "#/common/test", "", - "/common/test", "#/common/test"); - EXPECT_STATIC_REFERENCE(frame, "/common/test/$ref", "#/common/with-id", "", - "/common/with-id", "#/common/with-id"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/wrapper", "#/wrapper"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/common/test", "#/wrapper"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/wrapper", - "#/common/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/common/test", - "#/common/test"); -} - -TEST(JSONSchema_frame_2020_12, multiple_nested_no_base_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "wrapper": { - "$ref": "#/common/test" - }, - "common": { - "test": { - "$ref": "#/common/with-id" - }, - "with-id": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - const sourcemeta::core::Pointer path1{"wrapper"}; - const sourcemeta::core::Pointer path2{"common", "test"}; - const sourcemeta::core::Pointer path3{"common", "with-id"}; - - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, "", "", - {sourcemeta::core::to_weak_pointer(path1), - sourcemeta::core::to_weak_pointer(path2), - sourcemeta::core::to_weak_pointer(path3)}), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_frame_2020_12, multiple_nested_same_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "common": { - "foo": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema" - }, - "bar": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - const sourcemeta::core::Pointer path1{"common", "foo"}; - const sourcemeta::core::Pointer path2{"common", "bar"}; - - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, "", "", - {sourcemeta::core::to_weak_pointer(path1), - sourcemeta::core::to_weak_pointer(path2)}), - sourcemeta::core::SchemaFrameError); -} - -TEST(JSONSchema_frame_2020_12, multiple_nested_same_anonymous_anchors) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "common": { - "foo": { - "$anchor": "test" - }, - "bar": { - "$anchor": "test" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - const sourcemeta::core::Pointer path1{"common", "foo"}; - const sourcemeta::core::Pointer path2{"common", "bar"}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema", "", - {sourcemeta::core::to_weak_pointer(path1), - sourcemeta::core::to_weak_pointer(path2)}); - FAIL(); - } catch (sourcemeta::core::SchemaAnchorCollisionError &error) { - EXPECT_EQ(error.identifier(), "#test"); - EXPECT_EQ(sourcemeta::core::to_string(error.location()), "/common/bar"); - EXPECT_EQ(sourcemeta::core::to_string(error.other()), "/common/foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, multiple_nested_with_default_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "wrapper": { - "$ref": "#/common/test" - }, - "common": { - "test": { - "$ref": "#/common/with-id" - }, - "with-id": { - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - const sourcemeta::core::Pointer path1{"wrapper"}; - const sourcemeta::core::Pointer path2{"common", "test"}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema", - // The default id should be getting ignored on nested schemas - // as it only makes sense for top-level framing - "https://www.example.com", - {sourcemeta::core::to_weak_pointer(path1), - sourcemeta::core::to_weak_pointer(path2)}); - - EXPECT_EQ(frame.locations().size(), 4); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/wrapper", "/wrapper", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/wrapper/$ref", "/wrapper/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/wrapper", false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/common/test", "/common/test", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/common/test/$ref", "/common/test/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/common/test", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE(frame, "/wrapper/$ref", "#/common/test", "", - "/common/test", "#/common/test"); - EXPECT_STATIC_REFERENCE(frame, "/common/test/$ref", "#/common/with-id", "", - "/common/with-id", "#/common/with-id"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/wrapper", "#/wrapper"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/common/test", "#/wrapper"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/wrapper", - "#/common/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/common/test", - "#/common/test"); -} - -TEST(JSONSchema_frame_2020_12, anchor_with_invalid_type) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": 123 - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$anchor", "/$anchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - EXPECT_EQ(frame.references().size(), 1); - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, dynamic_anchor_with_invalid_type) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": 123 - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$dynamicAnchor", "/$dynamicAnchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - EXPECT_EQ(frame.references().size(), 1); - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, dynamic_ref_with_invalid_type) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicRef": 123 - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$dynamicRef"); - EXPECT_EQ(error.value(), "123"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, - ref_does_not_invalidate_sibling_subschemas_and_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$ref": "#/definitions/enabled", - "properties": { - "bar": { - "$ref": "#/definitions/config", - "additionalProperties": { - "$ref": "#/definitions/threshold" - } - } - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$ref", "/properties/foo/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties", "/properties/foo/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo/properties/bar", - "/properties/foo/properties/bar", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar/$ref", - "/properties/foo/properties/bar/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo/properties/bar", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo/properties/bar/additionalProperties", - "/properties/foo/properties/bar/additionalProperties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo/properties/bar", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar/additionalProperties/$ref", - "/properties/foo/properties/bar/additionalProperties/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo/properties/bar/additionalProperties", false, false); - - EXPECT_EQ(frame.references().size(), 4); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", - "#/definitions/enabled", "", "/definitions/enabled", - "#/definitions/enabled"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/properties/bar/$ref", - "#/definitions/config", "", "/definitions/config", - "#/definitions/config"); - EXPECT_STATIC_REFERENCE( - frame, "/properties/foo/properties/bar/additionalProperties/$ref", - "#/definitions/threshold", "", "/definitions/threshold", - "#/definitions/threshold"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "#/properties/foo/properties/bar", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "#/properties/foo/properties/bar/additionalProperties", - frame.root()); -} - -TEST(JSONSchema_frame_2020_12, ref_to_ref_chain) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "#/$defs/parent", - "$defs": { - "parent": { - "$ref": "#/$defs/child" - }, - "child": { - "type": "string" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$ref", - "https://www.sourcemeta.com/schema", "/$ref", - "https://www.sourcemeta.com/schema", "/$ref", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs", - "https://www.sourcemeta.com/schema", "/$defs", - "https://www.sourcemeta.com/schema", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/$defs/parent", - "https://www.sourcemeta.com/schema", "/$defs/parent", - "https://www.sourcemeta.com/schema", "/$defs/parent", "", false, true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs/parent/$ref", - "https://www.sourcemeta.com/schema", "/$defs/parent/$ref", - "https://www.sourcemeta.com/schema", "/$defs/parent/$ref", - "/$defs/parent", false, true); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/$defs/child", - "https://www.sourcemeta.com/schema", "/$defs/child", - "https://www.sourcemeta.com/schema", "/$defs/child", "", false, true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs/child/type", - "https://www.sourcemeta.com/schema", "/$defs/child/type", - "https://www.sourcemeta.com/schema", "/$defs/child/type", "/$defs/child", - false, true); - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "https://www.sourcemeta.com/schema#/$defs/parent", - "https://www.sourcemeta.com/schema", "/$defs/parent", "#/$defs/parent"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/parent/$ref", - "https://www.sourcemeta.com/schema#/$defs/child", - "https://www.sourcemeta.com/schema", "/$defs/child", - "#/$defs/child"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/parent", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/child", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/$defs/parent"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/parent", - "https://www.sourcemeta.com/schema#/$defs/parent"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/child", - "https://www.sourcemeta.com/schema#/$defs/parent"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/$defs/child"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/parent", - "https://www.sourcemeta.com/schema#/$defs/child"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/$defs/child", - "https://www.sourcemeta.com/schema#/$defs/child"); -} - -TEST(JSONSchema_frame_2020_12, nested_defs_unreferenced) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$defs": { - "unused": { "type": "string" } - }, - "type": "object" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$defs", - "https://www.sourcemeta.com/schema", "/properties/foo/$defs", - "https://www.sourcemeta.com/schema", "/properties/foo/$defs", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$defs/unused", - "https://www.sourcemeta.com/schema", "/properties/foo/$defs/unused", - "https://www.sourcemeta.com/schema", "/properties/foo/$defs/unused", - "/properties/foo", false, true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, - "https://www.sourcemeta.com/schema#/properties/foo/$defs/unused/type", - "https://www.sourcemeta.com/schema", "/properties/foo/$defs/unused/type", - "https://www.sourcemeta.com/schema", "/properties/foo/$defs/unused/type", - "/properties/foo/$defs/unused", false, true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "/properties/foo", false, false); - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, - "https://www.sourcemeta.com/schema#/properties/foo/$defs/unused", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, - "https://www.sourcemeta.com/schema#/properties/foo/$defs/unused", - "https://www.sourcemeta.com/schema#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo/$defs/unused"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo/$defs/unused"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://www.sourcemeta.com/schema#/properties/foo/$defs/unused", - "https://www.sourcemeta.com/schema#/properties/foo/$defs/unused"); -} - -TEST(JSONSchema_frame_2020_12, circular_ref_through_defs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "a": { "$ref": "#/$defs/b" }, - "b": { "$ref": "#/$defs/a" } - }, - "$ref": "#/$defs/a" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/$defs/a", - "https://www.sourcemeta.com/schema", "/$defs/a", - "https://www.sourcemeta.com/schema", "/$defs/a", "", false, true); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/$defs/b", - "https://www.sourcemeta.com/schema", "/$defs/b", - "https://www.sourcemeta.com/schema", "/$defs/b", "", false, true); - - // JSON Pointers - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs", - "https://www.sourcemeta.com/schema", "/$defs", - "https://www.sourcemeta.com/schema", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$ref", - "https://www.sourcemeta.com/schema", "/$ref", - "https://www.sourcemeta.com/schema", "/$ref", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs/a/$ref", - "https://www.sourcemeta.com/schema", "/$defs/a/$ref", - "https://www.sourcemeta.com/schema", "/$defs/a/$ref", "/$defs/a", false, - true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs/b/$ref", - "https://www.sourcemeta.com/schema", "/$defs/b/$ref", - "https://www.sourcemeta.com/schema", "/$defs/b/$ref", "/$defs/b", false, - true); - - // References - - EXPECT_EQ(frame.references().size(), 4); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "https://www.sourcemeta.com/schema#/$defs/a", - "https://www.sourcemeta.com/schema", "/$defs/a", "#/$defs/a"); - EXPECT_STATIC_REFERENCE( - frame, "/$defs/a/$ref", "https://www.sourcemeta.com/schema#/$defs/b", - "https://www.sourcemeta.com/schema", "/$defs/b", "#/$defs/b"); - EXPECT_STATIC_REFERENCE( - frame, "/$defs/b/$ref", "https://www.sourcemeta.com/schema#/$defs/a", - "https://www.sourcemeta.com/schema", "/$defs/a", "#/$defs/a"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/$defs/a", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/$defs/b", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/$defs/a"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/$defs/a", - "https://www.sourcemeta.com/schema#/$defs/a"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/$defs/b", - "https://www.sourcemeta.com/schema#/$defs/a"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/$defs/b"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/$defs/a", - "https://www.sourcemeta.com/schema#/$defs/b"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/$defs/b", - "https://www.sourcemeta.com/schema#/$defs/b"); -} - -TEST(JSONSchema_frame_2020_12, nested_invalid_schema_keyword) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "nested": { - "$schema": 123 - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$schema"); - EXPECT_EQ(error.value(), "123"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, invalid_id_not_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": 123 - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$id"); - EXPECT_EQ(error.value(), "123"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, invalid_id_not_uri) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "not a valid uri" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$id"); - EXPECT_EQ(error.value(), "not a valid uri"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, nested_invalid_schema_not_uri) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "nested": { - "$schema": "not a valid uri" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$schema"); - EXPECT_EQ(error.value(), "not a valid uri"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, invalid_ref_not_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": 123 - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$ref"); - EXPECT_EQ(error.value(), "123"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, invalid_ref_not_uri) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "not a valid uri" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$ref"); - EXPECT_EQ(error.value(), "not a valid uri"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, invalid_dynamic_ref_not_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicRef": 123 - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$dynamicRef"); - EXPECT_EQ(error.value(), "123"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, invalid_dynamic_ref_not_uri) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicRef": "not a valid uri" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$dynamicRef"); - EXPECT_EQ(error.value(), "not a valid uri"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, ref_to_orphan_chain) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "#/$defs/a" } - }, - "$defs": { - "a": { "$ref": "#/$defs/b" }, - "b": { "$ref": "#/$defs/c" }, - "c": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 12); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/a", "/$defs/a", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/b", "/$defs/b", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/c", "/$defs/c", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$ref", "/properties/foo/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/a/$ref", "/$defs/a/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/a", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/b/$ref", "/$defs/b/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/b", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/c/type", "/$defs/c/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/c", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 4); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", "#/$defs/a", "", - "/$defs/a", "#/$defs/a"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/a/$ref", "#/$defs/b", "", "/$defs/b", - "#/$defs/b"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/b/$ref", "#/$defs/c", "", "/$defs/c", - "#/$defs/c"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/a", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/b", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/c", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/a", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/b", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/c", - "#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/a"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/$defs/a"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/a", "#/$defs/a"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/b", "#/$defs/a"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/c", "#/$defs/a"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/b"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/$defs/b"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/a", "#/$defs/b"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/b", "#/$defs/b"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/c", "#/$defs/b"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/c"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/$defs/c"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/a", "#/$defs/c"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/b", "#/$defs/c"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/c", "#/$defs/c"); -} - -TEST(JSONSchema_frame_2020_12, orphan_chain_unreferenced) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "a": { "$ref": "#/$defs/b" }, - "b": { "$ref": "#/$defs/c" }, - "c": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/a", "/$defs/a", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/b", "/$defs/b", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/c", "/$defs/c", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/a/$ref", "/$defs/a/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/a", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/b/$ref", "/$defs/b/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/b", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/c/type", "/$defs/c/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/c", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/a/$ref", "#/$defs/b", "", "/$defs/b", - "#/$defs/b"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/b/$ref", "#/$defs/c", "", "/$defs/c", - "#/$defs/c"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/a", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/b", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/c", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/a"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/a", "#/$defs/a"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/b", "#/$defs/a"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/c", "#/$defs/a"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/b"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/a", "#/$defs/b"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/b", "#/$defs/b"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/c", "#/$defs/b"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/c"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/a", "#/$defs/c"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/b", "#/$defs/c"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/c", "#/$defs/c"); -} - -TEST(JSONSchema_frame_2020_12, circular_orphan_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "a": { "$ref": "#/$defs/b" }, - "b": { "$ref": "#/$defs/a" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 7); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/a", "/$defs/a", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/b", "/$defs/b", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/a/$ref", "/$defs/a/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/a", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/b/$ref", "/$defs/b/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/b", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/a/$ref", "#/$defs/b", "", "/$defs/b", - "#/$defs/b"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/b/$ref", "#/$defs/a", "", "/$defs/a", - "#/$defs/a"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/a", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/b", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/a"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/a", "#/$defs/a"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/b", "#/$defs/a"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/b"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/a", "#/$defs/b"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/b", "#/$defs/b"); -} - -TEST(JSONSchema_frame_2020_12, ref_from_deep_nesting) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "x": { - "properties": { - "y": { - "properties": { - "z": { "$ref": "#/$defs/string" } - } - } - } - } - }, - "$defs": { - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 12); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/x", "/properties/x", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/x/properties/y", "/properties/x/properties/y", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/x", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/x/properties/y/properties/z", - "/properties/x/properties/y/properties/z", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/x/properties/y", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/string", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/x/properties", "/properties/x/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/x", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/x/properties/y/properties", - "/properties/x/properties/y/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/x/properties/y", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/x/properties/y/properties/z/$ref", - "/properties/x/properties/y/properties/z/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/x/properties/y/properties/z", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/string/type", "/$defs/string/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/x/properties/y/properties/z/$ref", - "#/$defs/string", "", "/$defs/string", - "#/$defs/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/x", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/x/properties/y", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "#/properties/x/properties/y/properties/z", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "", "#/properties/x/properties/y/properties/z"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "#/properties/x", - "#/properties/x/properties/y/properties/z"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "#/properties/x/properties/y", - "#/properties/x/properties/y/properties/z"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "#/properties/x/properties/y/properties/z", - "#/properties/x/properties/y/properties/z"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/properties/x/properties/y/properties/z"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/string"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/x", - "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/$defs/string"); -} - -TEST(JSONSchema_frame_2020_12, orphan_refs_reachable_target) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "#/$defs/string" } - }, - "$defs": { - "string": { "type": "string" }, - "orphan": { "$ref": "#/$defs/string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/string", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/orphan", "/$defs/orphan", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$ref", "/properties/foo/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/string/type", "/$defs/string/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/orphan/$ref", "/$defs/orphan/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/orphan", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 3); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", "#/$defs/string", "", - "/$defs/string", "#/$defs/string"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/orphan/$ref", "#/$defs/string", "", - "/$defs/string", "#/$defs/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/orphan", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/orphan", - "#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/string"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/$defs/string"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/orphan", - "#/$defs/string"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/orphan"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/$defs/orphan"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/$defs/orphan"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/orphan", - "#/$defs/orphan"); -} - -TEST(JSONSchema_frame_2020_12, root_dynamic_anchor) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "root", - "type": "string" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#root", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "#root", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$dynamicAnchor", "/$dynamicAnchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/type", "/type", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#root", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#root", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, dynamic_ref_to_static_anchor) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$dynamicRef": "#target" } - }, - "$defs": { - "string": { - "$anchor": "target", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/string", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#target", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$dynamicRef", "/properties/foo/$dynamicRef", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/string/$anchor", "/$defs/string/$anchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/string/type", "/$defs/string/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$dynamicRef", "#target", "", - "target", "#target"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#target", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/string"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/$defs/string"); -} - -TEST(JSONSchema_frame_2020_12, dynamic_ref_to_pointer) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$dynamicRef": "#/$defs/string" } - }, - "$defs": { - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/string", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$dynamicRef", "/properties/foo/$dynamicRef", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/string/type", "/$defs/string/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$dynamicRef", - "#/$defs/string", "", "/$defs/string", - "#/$defs/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/string"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/$defs/string"); -} - -TEST(JSONSchema_frame_2020_12, dynamic_ref_to_dynamic_anchor) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$dynamicRef": "#target" } - }, - "$defs": { - "string": { - "$dynamicAnchor": "target", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 11); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/string", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#target", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "#target", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$dynamicRef", "/properties/foo/$dynamicRef", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/string/$dynamicAnchor", "/$defs/string/$dynamicAnchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/string/type", "/$defs/string/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$dynamicRef", "#target", "", - "target", "#target"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#target", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#target", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#target", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#target", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/string"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#target", "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#target", "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/$defs/string"); -} - -TEST(JSONSchema_frame_2020_12, static_ref_to_dynamic_anchor) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "#target" } - }, - "$defs": { - "string": { - "$dynamicAnchor": "target", - "additionalProperties": { - "type": "string", - "$defs": { - "nested": { - "type": "string" - } - } - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 15); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/string", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#target", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "#target", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/string/additionalProperties", - "/$defs/string/additionalProperties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/string/additionalProperties/$defs/nested", - "/$defs/string/additionalProperties/$defs/nested", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string/additionalProperties", false, true); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$ref", "/properties/foo/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/string/$dynamicAnchor", "/$defs/string/$dynamicAnchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/string/additionalProperties/type", - "/$defs/string/additionalProperties/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string/additionalProperties", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/string/additionalProperties/$defs", - "/$defs/string/additionalProperties/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string/additionalProperties", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/string/additionalProperties/$defs/nested/type", - "/$defs/string/additionalProperties/$defs/nested/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string/additionalProperties/$defs/nested", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", "#target", "", - "target", "#target"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#target", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#target", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "#/$defs/string/additionalProperties", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "#/$defs/string/additionalProperties/$defs/nested", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#target", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#target", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "#/$defs/string/additionalProperties", "#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "#/$defs/string/additionalProperties/$defs/nested", - "#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/string"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#target", "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#target", "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "#/$defs/string/additionalProperties", "#/$defs/string"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "#/$defs/string/additionalProperties/$defs/nested", - "#/$defs/string"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", - "#/$defs/string/additionalProperties"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/properties/foo", - "#/$defs/string/additionalProperties"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/string", - "#/$defs/string/additionalProperties"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "#/$defs/string/additionalProperties", - "#/$defs/string/additionalProperties"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "#/$defs/string/additionalProperties/$defs/nested", - "#/$defs/string/additionalProperties"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "", "#/$defs/string/additionalProperties/$defs/nested"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "#/properties/foo", - "#/$defs/string/additionalProperties/$defs/nested"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "#/$defs/string", - "#/$defs/string/additionalProperties/$defs/nested"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "#/$defs/string/additionalProperties", - "#/$defs/string/additionalProperties/$defs/nested"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "#/$defs/string/additionalProperties/$defs/nested", - "#/$defs/string/additionalProperties/$defs/nested"); -} - -TEST(JSONSchema_frame_2020_12, unreferenced_dynamic_anchor) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "string": { - "$dynamicAnchor": "unused", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/string", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#unused", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "#unused", "/$defs/string", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/string/$dynamicAnchor", "/$defs/string/$dynamicAnchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/string/type", "/$defs/string/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/string", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#unused", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Dynamic, "#unused", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/string", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#unused", "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, "#unused", "#/$defs/string"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/string", - "#/$defs/string"); -} - -TEST(JSONSchema_frame_2020_12, property_named_defs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/schema", - "$ref": "#/$defs/helper", - "$defs": { - "helper": { - "properties": { - "$defs": { "type": "string" }, - "definitions": { "type": "number" } - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 11); - - // Resources - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://example.com/schema", "https://example.com/schema", "", - "https://example.com/schema", "", std::nullopt, false, false); - - // Subschemas - - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://example.com/schema#/$defs/helper", - "https://example.com/schema", "/$defs/helper", - "https://example.com/schema", "/$defs/helper", "", false, true); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://example.com/schema#/$defs/helper/properties/$defs", - "https://example.com/schema", "/$defs/helper/properties/$defs", - "https://example.com/schema", "/$defs/helper/properties/$defs", - "/$defs/helper", false, true); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://example.com/schema#/$defs/helper/properties/definitions", - "https://example.com/schema", "/$defs/helper/properties/definitions", - "https://example.com/schema", "/$defs/helper/properties/definitions", - "/$defs/helper", false, true); - - // Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/schema#/$id", "https://example.com/schema", - "/$id", "https://example.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/schema#/$schema", - "https://example.com/schema", "/$schema", "https://example.com/schema", - "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/schema#/$ref", "https://example.com/schema", - "/$ref", "https://example.com/schema", "/$ref", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/schema#/$defs", "https://example.com/schema", - "/$defs", "https://example.com/schema", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/schema#/$defs/helper/properties", - "https://example.com/schema", "/$defs/helper/properties", - "https://example.com/schema", "/$defs/helper/properties", "/$defs/helper", - false, true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/schema#/$defs/helper/properties/$defs/type", - "https://example.com/schema", "/$defs/helper/properties/$defs/type", - "https://example.com/schema", "/$defs/helper/properties/$defs/type", - "/$defs/helper/properties/$defs", false, true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, - "https://example.com/schema#/$defs/helper/properties/definitions/type", - "https://example.com/schema", "/$defs/helper/properties/definitions/type", - "https://example.com/schema", "/$defs/helper/properties/definitions/type", - "/$defs/helper/properties/definitions", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "https://example.com/schema#/$defs/helper", - "https://example.com/schema", "/$defs/helper", "#/$defs/helper"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com/schema", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://example.com/schema#/$defs/helper", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://example.com/schema#/$defs/helper/properties/$defs", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://example.com/schema#/$defs/helper/properties/definitions", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://example.com/schema", - "https://example.com/schema#/$defs/helper"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://example.com/schema#/$defs/helper", - "https://example.com/schema#/$defs/helper"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://example.com/schema#/$defs/helper/properties/$defs", - "https://example.com/schema#/$defs/helper"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://example.com/schema#/$defs/helper/properties/definitions", - "https://example.com/schema#/$defs/helper"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://example.com/schema", - "https://example.com/schema#/$defs/helper/properties/$defs"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://example.com/schema#/$defs/helper", - "https://example.com/schema#/$defs/helper/properties/$defs"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://example.com/schema#/$defs/helper/properties/$defs", - "https://example.com/schema#/$defs/helper/properties/$defs"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, - "https://example.com/schema#/$defs/helper/properties/definitions", - "https://example.com/schema#/$defs/helper/properties/$defs"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://example.com/schema", - "https://example.com/schema#/$defs/helper/properties/definitions"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://example.com/schema#/$defs/helper", - "https://example.com/schema#/$defs/helper/properties/definitions"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, - "https://example.com/schema#/$defs/helper/properties/$defs", - "https://example.com/schema#/$defs/helper/properties/definitions"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, - "https://example.com/schema#/$defs/helper/properties/definitions", - "https://example.com/schema#/$defs/helper/properties/definitions"); -} - -TEST(JSONSchema_frame_2020_12, nested_schema_with_dynamic_anchor_and_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "meta", - "$ref": "#/$defs/foo", - "$defs": { - "foo": {}, - "bar": {}, - "baz": { - "$ref": "#/$defs/bar", - "default": 0 - } - }, - "$id": "__sourcemeta-core-wrap__" - } - }, - "$ref": "__sourcemeta-core-wrap__#/$defs/baz" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 28); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/schema", "/$defs/schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "__sourcemeta-core-wrap__", "/$defs/schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "__sourcemeta-core-wrap__#/$defs/foo", "/$defs/schema/$defs/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "__sourcemeta-core-wrap__#/$defs/bar", "/$defs/schema/$defs/bar", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "__sourcemeta-core-wrap__#/$defs/baz", "/$defs/schema/$defs/baz", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/schema/$defs/foo", "/$defs/schema/$defs/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/schema/$defs/bar", "/$defs/schema/$defs/bar", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/schema/$defs/baz", "/$defs/schema/$defs/baz", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - - // Anchors - - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "__sourcemeta-core-wrap__#meta", "/$defs/schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( - frame, "__sourcemeta-core-wrap__#meta", "/$defs/schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "__sourcemeta-core-wrap__#/$schema", "/$defs/schema/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "__sourcemeta-core-wrap__#/$dynamicAnchor", - "/$defs/schema/$dynamicAnchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "__sourcemeta-core-wrap__#/$ref", "/$defs/schema/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "__sourcemeta-core-wrap__#/$defs", "/$defs/schema/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "__sourcemeta-core-wrap__#/$defs/baz/$ref", - "/$defs/schema/$defs/baz/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema/$defs/baz", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "__sourcemeta-core-wrap__#/$defs/baz/default", - "/$defs/schema/$defs/baz/default", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema/$defs/baz", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "__sourcemeta-core-wrap__#/$id", "/$defs/schema/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/schema/$schema", "/$defs/schema/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/schema/$dynamicAnchor", "/$defs/schema/$dynamicAnchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/schema/$ref", "/$defs/schema/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/schema/$defs", "/$defs/schema/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/schema/$defs/baz/$ref", "/$defs/schema/$defs/baz/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema/$defs/baz", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/schema/$defs/baz/default", - "/$defs/schema/$defs/baz/default", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema/$defs/baz", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/schema/$id", "/$defs/schema/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 5); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "__sourcemeta-core-wrap__#/$defs/baz", - "__sourcemeta-core-wrap__", "/$defs/baz", - "__sourcemeta-core-wrap__#/$defs/baz"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/schema/$schema", - "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", - std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/$defs/schema/$ref", "__sourcemeta-core-wrap__#/$defs/foo", - "__sourcemeta-core-wrap__", "/$defs/foo", "#/$defs/foo"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/schema/$defs/baz/$ref", - "__sourcemeta-core-wrap__#/$defs/bar", - "__sourcemeta-core-wrap__", "/$defs/bar", - "#/$defs/bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "__sourcemeta-core-wrap__", - frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "__sourcemeta-core-wrap__#meta", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Dynamic, "__sourcemeta-core-wrap__#meta", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "__sourcemeta-core-wrap__#/$defs/baz", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "__sourcemeta-core-wrap__#/$defs/bar", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "__sourcemeta-core-wrap__#/$defs/foo", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/schema", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/schema/$defs/baz", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/$defs/schema/$defs/bar", - frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/$defs/schema/$defs/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", - "__sourcemeta-core-wrap__"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "__sourcemeta-core-wrap__", - "__sourcemeta-core-wrap__"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "__sourcemeta-core-wrap__#meta", - "__sourcemeta-core-wrap__"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, - "__sourcemeta-core-wrap__#meta", - "__sourcemeta-core-wrap__"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "__sourcemeta-core-wrap__#/$defs/foo", - "__sourcemeta-core-wrap__"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "__sourcemeta-core-wrap__#/$defs/bar", - "__sourcemeta-core-wrap__"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "__sourcemeta-core-wrap__#/$defs/baz", - "__sourcemeta-core-wrap__"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", - "__sourcemeta-core-wrap__#/$defs/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "__sourcemeta-core-wrap__", - "__sourcemeta-core-wrap__#/$defs/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "__sourcemeta-core-wrap__#/$defs/foo", - "__sourcemeta-core-wrap__#/$defs/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "__sourcemeta-core-wrap__#/$defs/bar", - "__sourcemeta-core-wrap__#/$defs/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "__sourcemeta-core-wrap__#/$defs/baz", - "__sourcemeta-core-wrap__#/$defs/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", - "__sourcemeta-core-wrap__#/$defs/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "__sourcemeta-core-wrap__", - "__sourcemeta-core-wrap__#/$defs/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "__sourcemeta-core-wrap__#/$defs/foo", - "__sourcemeta-core-wrap__#/$defs/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "__sourcemeta-core-wrap__#/$defs/bar", - "__sourcemeta-core-wrap__#/$defs/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "__sourcemeta-core-wrap__#/$defs/baz", - "__sourcemeta-core-wrap__#/$defs/bar"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", - "__sourcemeta-core-wrap__#/$defs/baz"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "__sourcemeta-core-wrap__", - "__sourcemeta-core-wrap__#/$defs/baz"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "__sourcemeta-core-wrap__#/$defs/foo", - "__sourcemeta-core-wrap__#/$defs/baz"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "__sourcemeta-core-wrap__#/$defs/bar", - "__sourcemeta-core-wrap__#/$defs/baz"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "__sourcemeta-core-wrap__#/$defs/baz", - "__sourcemeta-core-wrap__#/$defs/baz"); -} - -TEST(JSONSchema_frame_2020_12, - dynamic_ref_with_unreferenced_dynamic_anchor_target) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/root", - "$dynamicRef": "#meta", - "$defs": { - "unreferenced": { - "$id": "unreferenced", - "$dynamicAnchor": "meta" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 13); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://example.com/root", "https://example.com/root", "", - "https://example.com/root", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://example.com/unreferenced", "https://example.com/root", - "/$defs/unreferenced", "https://example.com/unreferenced", "", "", false, - true); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://example.com/root#/$defs/unreferenced", - "https://example.com/root", "/$defs/unreferenced", - "https://example.com/unreferenced", "", "", false, true); - - // Anchors - - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://example.com/unreferenced#meta", - "https://example.com/root", "/$defs/unreferenced", - "https://example.com/unreferenced", "", "", false, true); - EXPECT_FRAME_DYNAMIC_2020_12_ANCHOR( - frame, "https://example.com/unreferenced#meta", - "https://example.com/root", "/$defs/unreferenced", - "https://example.com/unreferenced", "", "", false, true); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/root#/$schema", "https://example.com/root", - "/$schema", "https://example.com/root", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/root#/$id", "https://example.com/root", - "/$id", "https://example.com/root", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/root#/$dynamicRef", - "https://example.com/root", "/$dynamicRef", "https://example.com/root", - "/$dynamicRef", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/root#/$defs", "https://example.com/root", - "/$defs", "https://example.com/root", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/root#/$defs/unreferenced/$id", - "https://example.com/root", "/$defs/unreferenced/$id", - "https://example.com/unreferenced", "/$id", "/$defs/unreferenced", false, - true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/root#/$defs/unreferenced/$dynamicAnchor", - "https://example.com/root", "/$defs/unreferenced/$dynamicAnchor", - "https://example.com/unreferenced", "/$dynamicAnchor", - "/$defs/unreferenced", false, true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/unreferenced#/$id", - "https://example.com/root", "/$defs/unreferenced/$id", - "https://example.com/unreferenced", "/$id", "/$defs/unreferenced", false, - true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/unreferenced#/$dynamicAnchor", - "https://example.com/root", "/$defs/unreferenced/$dynamicAnchor", - "https://example.com/unreferenced", "/$dynamicAnchor", - "/$defs/unreferenced", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_DYNAMIC_REFERENCE(frame, "/$dynamicRef", - "https://example.com/root#meta", - "https://example.com/root", "meta", "#meta"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com/root", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://example.com/unreferenced", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://example.com/unreferenced#meta", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Dynamic, "https://example.com/unreferenced#meta", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "https://example.com/root", - "https://example.com/unreferenced"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://example.com/unreferenced", - "https://example.com/unreferenced"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://example.com/unreferenced#meta", - "https://example.com/unreferenced"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Dynamic, - "https://example.com/unreferenced#meta", - "https://example.com/unreferenced"); -} - -TEST(JSONSchema_frame_2020_12, - dynamic_ref_with_unreferenced_static_anchor_target) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/root", - "$dynamicRef": "#meta", - "$defs": { - "unreferenced": { - "$id": "unreferenced", - "$anchor": "meta" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 12); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://example.com/root", "https://example.com/root", "", - "https://example.com/root", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://example.com/unreferenced", "https://example.com/root", - "/$defs/unreferenced", "https://example.com/unreferenced", "", "", false, - true); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://example.com/root#/$defs/unreferenced", - "https://example.com/root", "/$defs/unreferenced", - "https://example.com/unreferenced", "", "", false, true); - - // Anchors - - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://example.com/unreferenced#meta", - "https://example.com/root", "/$defs/unreferenced", - "https://example.com/unreferenced", "", "", false, true); - - // JSON Pointers - - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/root#/$schema", "https://example.com/root", - "/$schema", "https://example.com/root", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/root#/$id", "https://example.com/root", - "/$id", "https://example.com/root", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/root#/$dynamicRef", - "https://example.com/root", "/$dynamicRef", "https://example.com/root", - "/$dynamicRef", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/root#/$defs", "https://example.com/root", - "/$defs", "https://example.com/root", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/root#/$defs/unreferenced/$id", - "https://example.com/root", "/$defs/unreferenced/$id", - "https://example.com/unreferenced", "/$id", "/$defs/unreferenced", false, - true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/root#/$defs/unreferenced/$anchor", - "https://example.com/root", "/$defs/unreferenced/$anchor", - "https://example.com/unreferenced", "/$anchor", "/$defs/unreferenced", - false, true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/unreferenced#/$id", - "https://example.com/root", "/$defs/unreferenced/$id", - "https://example.com/unreferenced", "/$id", "/$defs/unreferenced", false, - true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://example.com/unreferenced#/$anchor", - "https://example.com/root", "/$defs/unreferenced/$anchor", - "https://example.com/unreferenced", "/$anchor", "/$defs/unreferenced", - false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_DYNAMIC_REFERENCE(frame, "/$dynamicRef", - "https://example.com/root#meta", - "https://example.com/root", "meta", "#meta"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com/root", - frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://example.com/unreferenced", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://example.com/unreferenced#meta", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "https://example.com/root", - "https://example.com/unreferenced"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://example.com/unreferenced", - "https://example.com/unreferenced"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://example.com/unreferenced#meta", - "https://example.com/unreferenced"); -} - -TEST(JSONSchema_frame_2020_12, anchor_with_invalid_format_empty) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": "" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$anchor"); - EXPECT_EQ(error.value(), ""); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, anchor_with_invalid_format_leading_digit) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": "1foo" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$anchor"); - EXPECT_EQ(error.value(), "1foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, anchor_with_invalid_format_leading_hyphen) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": "-foo" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$anchor"); - EXPECT_EQ(error.value(), "-foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, anchor_with_invalid_format_whitespace) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": "foo bar" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$anchor"); - EXPECT_EQ(error.value(), "foo bar"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, anchor_with_invalid_format_punctuation) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": "foo!bar" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$anchor"); - EXPECT_EQ(error.value(), "foo!bar"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, anchor_with_invalid_format_colon) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": "foo:bar" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$anchor"); - EXPECT_EQ(error.value(), "foo:bar"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, anchor_with_valid_leading_underscore) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$anchor": "_foo" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$anchor", - "https://www.sourcemeta.com/schema", "/$anchor", - "https://www.sourcemeta.com/schema", "/$anchor", "", false, false); - - // Anchors - - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#_foo", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#_foo", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, dynamic_anchor_with_invalid_format_empty) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$dynamicAnchor"); - EXPECT_EQ(error.value(), ""); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, - dynamic_anchor_with_invalid_format_leading_digit) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "1foo" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$dynamicAnchor"); - EXPECT_EQ(error.value(), "1foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, dynamic_anchor_with_invalid_format_colon) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "foo:bar" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$dynamicAnchor"); - EXPECT_EQ(error.value(), "foo:bar"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, dynamic_anchor_with_valid_leading_underscore) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$dynamicAnchor": "_foo" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$dynamicAnchor", - "https://www.sourcemeta.com/schema", "/$dynamicAnchor", - "https://www.sourcemeta.com/schema", "/$dynamicAnchor", "", false, false); - - // Anchors - - EXPECT_FRAME_DYNAMIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#_foo", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_ANCHOR( - frame, "https://www.sourcemeta.com/schema#_foo", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#_foo", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, top_level_id_absolute_with_non_empty_fragment) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema#foo", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaFrameError &error) { - EXPECT_EQ(error.identifier(), "https://www.sourcemeta.com/schema#foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, nested_id_absolute_with_non_empty_fragment) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "foo": { - "$id": "https://www.sourcemeta.com/nested#foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaFrameError &error) { - EXPECT_EQ(error.identifier(), "https://www.sourcemeta.com/nested#foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_2020_12, top_level_id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "#", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.root().empty()); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$id", "/$id", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, nested_id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "foo": { - "$id": "#" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.root(), "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs", - "https://www.sourcemeta.com/schema", "/$defs", - "https://www.sourcemeta.com/schema", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/$defs/foo", - "https://www.sourcemeta.com/schema", "/$defs/foo", - "https://www.sourcemeta.com/schema", "/$defs/foo", "", false, true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs/foo/$id", - "https://www.sourcemeta.com/schema", "/$defs/foo/$id", - "https://www.sourcemeta.com/schema", "/$defs/foo/$id", "/$defs/foo", - false, true); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, top_level_id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.root().empty()); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$id", "/$id", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_2020_12, nested_id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "foo": { - "$id": "" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.root(), "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_FRAME_STATIC_2020_12_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs", - "https://www.sourcemeta.com/schema", "/$defs", - "https://www.sourcemeta.com/schema", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_2020_12_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/$defs/foo", - "https://www.sourcemeta.com/schema", "/$defs/foo", - "https://www.sourcemeta.com/schema", "/$defs/foo", "", false, true); - EXPECT_FRAME_STATIC_2020_12_POINTER( - frame, "https://www.sourcemeta.com/schema#/$defs/foo/$id", - "https://www.sourcemeta.com/schema", "/$defs/foo/$id", - "https://www.sourcemeta.com/schema", "/$defs/foo/$id", "/$defs/foo", - false, true); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} diff --git a/test/jsonschema/jsonschema_frame_draft0_test.cc b/test/jsonschema/jsonschema_frame_draft0_test.cc deleted file mode 100644 index 96d164fcd..000000000 --- a/test/jsonschema/jsonschema_frame_draft0_test.cc +++ /dev/null @@ -1,669 +0,0 @@ -#include - -#include -#include -#include - -#include "jsonschema_test_utils.h" - -#define EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_RESOURCE(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-00/schema#", \ - JSON_Schema_Draft_0_Hyper, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT0_POINTER( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_POINTER(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-00/schema#", \ - JSON_Schema_Draft_0_Hyper, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT0_SUBSCHEMA( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_SUBSCHEMA(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-00/schema#", \ - JSON_Schema_Draft_0_Hyper, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -TEST(JSONSchema_frame_draft0, anonymous_with_nested_schema_resource) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#", - "additionalProperties": { "id": "https://example.com" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "/additionalProperties", - "http://json-schema.org/draft-00/schema#", JSON_Schema_Draft_0_Hyper, "", - false, false); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/id", "/additionalProperties/id", - "http://json-schema.org/draft-00/schema#", JSON_Schema_Draft_0_Hyper, - "/additionalProperties", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-00/schema#", - JSON_Schema_Draft_0_Hyper, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-00/schema#", - JSON_Schema_Draft_0_Hyper, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalProperties", "/additionalProperties", - "http://json-schema.org/draft-00/schema#", JSON_Schema_Draft_0_Hyper, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalProperties/id", "/additionalProperties/id", - "http://json-schema.org/draft-00/schema#", JSON_Schema_Draft_0_Hyper, - "/additionalProperties", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-00/schema", - "http://json-schema.org/draft-00/schema", std::nullopt, - "http://json-schema.org/draft-00/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - "https://example.com"); -} - -TEST(JSONSchema_frame_draft0, empty_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-00/schema", - "http://json-schema.org/draft-00/schema", std::nullopt, - "http://json-schema.org/draft-00/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft0, empty_schema_trailing_hash) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema#", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-00/schema", - "http://json-schema.org/draft-00/schema", std::nullopt, - "http://json-schema.org/draft-00/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft0, one_level_applicators_without_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-00/schema#", - "items": { "type": "string" }, - "properties": { - "foo": { "type": "number" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/schema", "/items/type", "/items", false, - false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "/properties/foo", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-00/schema", - "http://json-schema.org/draft-00/schema", std::nullopt, - "http://json-schema.org/draft-00/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema#/items"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); -} - -TEST(JSONSchema_frame_draft0, one_level_applicators_with_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/test/qux", - "$schema": "http://json-schema.org/draft-00/schema#", - "items": { "id": "../foo", "type": "string" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( - frame, "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/test/qux", "", - "https://www.sourcemeta.com/test/qux", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/id", - "https://www.sourcemeta.com/test/qux", "/id", - "https://www.sourcemeta.com/test/qux", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_SUBSCHEMA( - frame, "https://www.sourcemeta.com/test/qux#/items", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/id", - "https://www.sourcemeta.com/test/qux", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/foo#/id", - "https://www.sourcemeta.com/test/qux", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-00/schema", - "http://json-schema.org/draft-00/schema", std::nullopt, - "http://json-schema.org/draft-00/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux#/items", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft0, subschema_absolute_identifier) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-00/schema#", - "items": { - "id": "https://www.sourcemeta.com/foo", - "type": "string" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/id", - "https://www.sourcemeta.com/schema", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/foo#/id", - "https://www.sourcemeta.com/schema", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-00/schema", - "http://json-schema.org/draft-00/schema", std::nullopt, - "http://json-schema.org/draft-00/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft0, id_override) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-00/schema#", - "items": { "id": "schema" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaFrameError); -} - -TEST(JSONSchema_frame_draft0, explicit_argument_id_same) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-00/schema#", - "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-00/schema", - "http://json-schema.org/draft-00/schema", std::nullopt, - "http://json-schema.org/draft-00/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft0, explicit_argument_id_different) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-00/schema#", - "properties": { - "one": { - "id": "test" - }, - "two": { - "id": "https://www.test.com" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-00/schema#", - "https://www.example.com"); - - EXPECT_EQ(frame.locations().size(), 22); - - EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( - frame, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( - frame, "https://www.example.com", "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( - frame, "https://www.example.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.example.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_RESOURCE( - frame, "https://www.test.com", "https://www.sourcemeta.com/schema", - "/properties/two", "https://www.test.com", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/one", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/one/id", - "https://www.sourcemeta.com/schema", "/properties/one/id", - "https://www.sourcemeta.com/test", "/id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT0_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/two", - "https://www.sourcemeta.com/schema", "/properties/two", - "https://www.test.com", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/two/id", - "https://www.sourcemeta.com/schema", "/properties/two/id", - "https://www.test.com", "/id", "/properties/two", false, false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.sourcemeta.com/test#/id", - "https://www.sourcemeta.com/schema", "/properties/one/id", - "https://www.sourcemeta.com/test", "/id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT0_POINTER( - frame, "https://www.test.com#/id", "https://www.sourcemeta.com/schema", - "/properties/two/id", "https://www.test.com", "/id", "/properties/two", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-00/schema", - "http://json-schema.org/draft-00/schema", std::nullopt, - "http://json-schema.org/draft-00/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/one", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/two", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/one", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/two", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.example.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - "https://www.example.com/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.test.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - "https://www.test.com"); -} - -TEST(JSONSchema_frame_draft0, ref_metaschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#", - "$ref": "http://json-schema.org/draft-00/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-00/schema#", - JSON_Schema_Draft_0_Hyper, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-00/schema#", - JSON_Schema_Draft_0_Hyper, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-00/schema#", - JSON_Schema_Draft_0_Hyper, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-00/schema", - "http://json-schema.org/draft-00/schema", std::nullopt, - "http://json-schema.org/draft-00/schema#"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "http://json-schema.org/draft-00/schema", - "http://json-schema.org/draft-00/schema", std::nullopt, - "http://json-schema.org/draft-00/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} diff --git a/test/jsonschema/jsonschema_frame_draft1_test.cc b/test/jsonschema/jsonschema_frame_draft1_test.cc deleted file mode 100644 index 3f092f730..000000000 --- a/test/jsonschema/jsonschema_frame_draft1_test.cc +++ /dev/null @@ -1,669 +0,0 @@ -#include - -#include -#include -#include - -#include "jsonschema_test_utils.h" - -#define EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_RESOURCE(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-01/schema#", \ - JSON_Schema_Draft_1_Hyper, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT1_POINTER( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_POINTER(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-01/schema#", \ - JSON_Schema_Draft_1_Hyper, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT1_SUBSCHEMA( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_SUBSCHEMA(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-01/schema#", \ - JSON_Schema_Draft_1_Hyper, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -TEST(JSONSchema_frame_draft1, anonymous_with_nested_schema_resource) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#", - "additionalProperties": { "id": "https://example.com" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "/additionalProperties", - "http://json-schema.org/draft-01/schema#", JSON_Schema_Draft_1_Hyper, "", - false, false); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/id", "/additionalProperties/id", - "http://json-schema.org/draft-01/schema#", JSON_Schema_Draft_1_Hyper, - "/additionalProperties", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-01/schema#", - JSON_Schema_Draft_1_Hyper, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-01/schema#", - JSON_Schema_Draft_1_Hyper, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalProperties", "/additionalProperties", - "http://json-schema.org/draft-01/schema#", JSON_Schema_Draft_1_Hyper, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalProperties/id", "/additionalProperties/id", - "http://json-schema.org/draft-01/schema#", JSON_Schema_Draft_1_Hyper, - "/additionalProperties", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-01/schema", - "http://json-schema.org/draft-01/schema", std::nullopt, - "http://json-schema.org/draft-01/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - "https://example.com"); -} - -TEST(JSONSchema_frame_draft1, empty_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-01/schema", - "http://json-schema.org/draft-01/schema", std::nullopt, - "http://json-schema.org/draft-01/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft1, empty_schema_trailing_hash) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema#", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-01/schema", - "http://json-schema.org/draft-01/schema", std::nullopt, - "http://json-schema.org/draft-01/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft1, one_level_applicators_without_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-01/schema#", - "items": { "type": "string" }, - "properties": { - "foo": { "type": "number" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/schema", "/items/type", "/items", false, - false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "/properties/foo", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-01/schema", - "http://json-schema.org/draft-01/schema", std::nullopt, - "http://json-schema.org/draft-01/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema#/items"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); -} - -TEST(JSONSchema_frame_draft1, one_level_applicators_with_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/test/qux", - "$schema": "http://json-schema.org/draft-01/schema#", - "items": { "id": "../foo", "type": "string" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( - frame, "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/test/qux", "", - "https://www.sourcemeta.com/test/qux", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/id", - "https://www.sourcemeta.com/test/qux", "/id", - "https://www.sourcemeta.com/test/qux", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_SUBSCHEMA( - frame, "https://www.sourcemeta.com/test/qux#/items", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/id", - "https://www.sourcemeta.com/test/qux", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/foo#/id", - "https://www.sourcemeta.com/test/qux", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-01/schema", - "http://json-schema.org/draft-01/schema", std::nullopt, - "http://json-schema.org/draft-01/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux#/items", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft1, subschema_absolute_identifier) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-01/schema#", - "items": { - "id": "https://www.sourcemeta.com/foo", - "type": "string" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/id", - "https://www.sourcemeta.com/schema", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/foo#/id", - "https://www.sourcemeta.com/schema", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-01/schema", - "http://json-schema.org/draft-01/schema", std::nullopt, - "http://json-schema.org/draft-01/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft1, id_override) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-01/schema#", - "items": { "id": "schema" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaFrameError); -} - -TEST(JSONSchema_frame_draft1, explicit_argument_id_same) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-01/schema#", - "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-01/schema", - "http://json-schema.org/draft-01/schema", std::nullopt, - "http://json-schema.org/draft-01/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft1, explicit_argument_id_different) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-01/schema#", - "properties": { - "one": { - "id": "test" - }, - "two": { - "id": "https://www.test.com" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-01/schema#", - "https://www.example.com"); - - EXPECT_EQ(frame.locations().size(), 22); - - EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( - frame, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( - frame, "https://www.example.com", "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( - frame, "https://www.example.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.example.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_RESOURCE( - frame, "https://www.test.com", "https://www.sourcemeta.com/schema", - "/properties/two", "https://www.test.com", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/one", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/one/id", - "https://www.sourcemeta.com/schema", "/properties/one/id", - "https://www.sourcemeta.com/test", "/id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT1_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/two", - "https://www.sourcemeta.com/schema", "/properties/two", - "https://www.test.com", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/two/id", - "https://www.sourcemeta.com/schema", "/properties/two/id", - "https://www.test.com", "/id", "/properties/two", false, false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.sourcemeta.com/test#/id", - "https://www.sourcemeta.com/schema", "/properties/one/id", - "https://www.sourcemeta.com/test", "/id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT1_POINTER( - frame, "https://www.test.com#/id", "https://www.sourcemeta.com/schema", - "/properties/two/id", "https://www.test.com", "/id", "/properties/two", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-01/schema", - "http://json-schema.org/draft-01/schema", std::nullopt, - "http://json-schema.org/draft-01/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/one", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/two", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/one", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/two", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.example.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - "https://www.example.com/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.test.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - "https://www.test.com"); -} - -TEST(JSONSchema_frame_draft1, ref_metaschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#", - "$ref": "http://json-schema.org/draft-01/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-01/schema#", - JSON_Schema_Draft_1_Hyper, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-01/schema#", - JSON_Schema_Draft_1_Hyper, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-01/schema#", - JSON_Schema_Draft_1_Hyper, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-01/schema", - "http://json-schema.org/draft-01/schema", std::nullopt, - "http://json-schema.org/draft-01/schema#"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "http://json-schema.org/draft-01/schema", - "http://json-schema.org/draft-01/schema", std::nullopt, - "http://json-schema.org/draft-01/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} diff --git a/test/jsonschema/jsonschema_frame_draft2_test.cc b/test/jsonschema/jsonschema_frame_draft2_test.cc deleted file mode 100644 index 006d49dcb..000000000 --- a/test/jsonschema/jsonschema_frame_draft2_test.cc +++ /dev/null @@ -1,669 +0,0 @@ -#include - -#include -#include -#include - -#include "jsonschema_test_utils.h" - -#define EXPECT_FRAME_STATIC_DRAFT2_POINTER( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_POINTER(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-02/schema#", \ - JSON_Schema_Draft_2_Hyper, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_RESOURCE(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-02/schema#", \ - JSON_Schema_Draft_2_Hyper, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT2_SUBSCHEMA( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_SUBSCHEMA(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-02/schema#", \ - JSON_Schema_Draft_2_Hyper, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -TEST(JSONSchema_frame_draft2, anonymous_with_nested_schema_resource) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#", - "additionalProperties": { "id": "https://example.com" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "/additionalProperties", - "http://json-schema.org/draft-02/schema#", JSON_Schema_Draft_2_Hyper, "", - false, false); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/id", "/additionalProperties/id", - "http://json-schema.org/draft-02/schema#", JSON_Schema_Draft_2_Hyper, - "/additionalProperties", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-02/schema#", - JSON_Schema_Draft_2_Hyper, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-02/schema#", - JSON_Schema_Draft_2_Hyper, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalProperties", "/additionalProperties", - "http://json-schema.org/draft-02/schema#", JSON_Schema_Draft_2_Hyper, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalProperties/id", "/additionalProperties/id", - "http://json-schema.org/draft-02/schema#", JSON_Schema_Draft_2_Hyper, - "/additionalProperties", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-02/schema", - "http://json-schema.org/draft-02/schema", std::nullopt, - "http://json-schema.org/draft-02/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - "https://example.com"); -} - -TEST(JSONSchema_frame_draft2, empty_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-02/schema", - "http://json-schema.org/draft-02/schema", std::nullopt, - "http://json-schema.org/draft-02/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft2, empty_schema_trailing_hash) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema#", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-02/schema", - "http://json-schema.org/draft-02/schema", std::nullopt, - "http://json-schema.org/draft-02/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft2, one_level_applicators_without_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-02/schema#", - "items": { "type": "string" }, - "properties": { - "foo": { "type": "number" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/schema", "/items/type", "/items", false, - false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "/properties/foo", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-02/schema", - "http://json-schema.org/draft-02/schema", std::nullopt, - "http://json-schema.org/draft-02/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema#/items"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); -} - -TEST(JSONSchema_frame_draft2, one_level_applicators_with_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/test/qux", - "$schema": "http://json-schema.org/draft-02/schema#", - "items": { "id": "../foo", "type": "string" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( - frame, "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/test/qux", "", - "https://www.sourcemeta.com/test/qux", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/id", - "https://www.sourcemeta.com/test/qux", "/id", - "https://www.sourcemeta.com/test/qux", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_SUBSCHEMA( - frame, "https://www.sourcemeta.com/test/qux#/items", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/id", - "https://www.sourcemeta.com/test/qux", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/foo#/id", - "https://www.sourcemeta.com/test/qux", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-02/schema", - "http://json-schema.org/draft-02/schema", std::nullopt, - "http://json-schema.org/draft-02/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux#/items", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft2, subschema_absolute_identifier) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-02/schema#", - "items": { - "id": "https://www.sourcemeta.com/foo", - "type": "string" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/id", - "https://www.sourcemeta.com/schema", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/foo#/id", - "https://www.sourcemeta.com/schema", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-02/schema", - "http://json-schema.org/draft-02/schema", std::nullopt, - "http://json-schema.org/draft-02/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft2, id_override) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-02/schema#", - "items": { "id": "schema" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaFrameError); -} - -TEST(JSONSchema_frame_draft2, explicit_argument_id_same) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-02/schema#", - "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-02/schema", - "http://json-schema.org/draft-02/schema", std::nullopt, - "http://json-schema.org/draft-02/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft2, explicit_argument_id_different) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-02/schema#", - "properties": { - "one": { - "id": "test" - }, - "two": { - "id": "https://www.test.com" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-02/schema#", - "https://www.example.com"); - - EXPECT_EQ(frame.locations().size(), 22); - - EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( - frame, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( - frame, "https://www.example.com", "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( - frame, "https://www.example.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.example.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_RESOURCE( - frame, "https://www.test.com", "https://www.sourcemeta.com/schema", - "/properties/two", "https://www.test.com", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/one", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/one/id", - "https://www.sourcemeta.com/schema", "/properties/one/id", - "https://www.sourcemeta.com/test", "/id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT2_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/two", - "https://www.sourcemeta.com/schema", "/properties/two", - "https://www.test.com", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/two/id", - "https://www.sourcemeta.com/schema", "/properties/two/id", - "https://www.test.com", "/id", "/properties/two", false, false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.sourcemeta.com/test#/id", - "https://www.sourcemeta.com/schema", "/properties/one/id", - "https://www.sourcemeta.com/test", "/id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT2_POINTER( - frame, "https://www.test.com#/id", "https://www.sourcemeta.com/schema", - "/properties/two/id", "https://www.test.com", "/id", "/properties/two", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-02/schema", - "http://json-schema.org/draft-02/schema", std::nullopt, - "http://json-schema.org/draft-02/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/one", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/two", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/one", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/two", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.example.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - "https://www.example.com/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.test.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - "https://www.test.com"); -} - -TEST(JSONSchema_frame_draft2, ref_metaschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#", - "$ref": "http://json-schema.org/draft-02/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-02/schema#", - JSON_Schema_Draft_2_Hyper, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-02/schema#", - JSON_Schema_Draft_2_Hyper, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-02/schema#", - JSON_Schema_Draft_2_Hyper, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-02/schema", - "http://json-schema.org/draft-02/schema", std::nullopt, - "http://json-schema.org/draft-02/schema#"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "http://json-schema.org/draft-02/schema", - "http://json-schema.org/draft-02/schema", std::nullopt, - "http://json-schema.org/draft-02/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} diff --git a/test/jsonschema/jsonschema_frame_draft3_test.cc b/test/jsonschema/jsonschema_frame_draft3_test.cc deleted file mode 100644 index 08d8c8fec..000000000 --- a/test/jsonschema/jsonschema_frame_draft3_test.cc +++ /dev/null @@ -1,1057 +0,0 @@ -#include - -#include -#include -#include - -#include "jsonschema_test_utils.h" - -#define EXPECT_FRAME_STATIC_DRAFT3_POINTER( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_POINTER(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-03/schema#", \ - JSON_Schema_Draft_3, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_RESOURCE(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-03/schema#", \ - JSON_Schema_Draft_3, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT3_SUBSCHEMA( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_SUBSCHEMA(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-03/schema#", \ - JSON_Schema_Draft_3, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -TEST(JSONSchema_frame_draft3, anonymous_with_nested_schema_resource) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "additionalProperties": { "id": "https://example.com" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "/additionalProperties", - "http://json-schema.org/draft-03/schema#", JSON_Schema_Draft_3, "", false, - false); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/id", "/additionalProperties/id", - "http://json-schema.org/draft-03/schema#", JSON_Schema_Draft_3, - "/additionalProperties", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalProperties", "/additionalProperties", - "http://json-schema.org/draft-03/schema#", JSON_Schema_Draft_3, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalProperties/id", "/additionalProperties/id", - "http://json-schema.org/draft-03/schema#", JSON_Schema_Draft_3, - "/additionalProperties", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - "https://example.com"); -} - -TEST(JSONSchema_frame_draft3, empty_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft3, empty_schema_trailing_slash) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema#", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft3, one_level_applicators_without_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-03/schema#", - "items": { "type": "string" }, - "properties": { - "foo": { "type": "number" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/schema", "/items/type", "/items", false, - false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "/properties/foo", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema#/items"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); -} - -TEST(JSONSchema_frame_draft3, one_level_applicators_with_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/test/qux", - "$schema": "http://json-schema.org/draft-03/schema#", - "items": { "id": "../foo", "type": "string" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/test/qux", "", - "https://www.sourcemeta.com/test/qux", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/id", - "https://www.sourcemeta.com/test/qux", "/id", - "https://www.sourcemeta.com/test/qux", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_SUBSCHEMA( - frame, "https://www.sourcemeta.com/test/qux#/items", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/id", - "https://www.sourcemeta.com/test/qux", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/foo#/id", - "https://www.sourcemeta.com/test/qux", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux#/items", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft3, subschema_absolute_identifier) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-03/schema#", - "items": { - "id": "https://www.sourcemeta.com/foo", - "type": "string" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/id", - "https://www.sourcemeta.com/schema", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/foo#/id", - "https://www.sourcemeta.com/schema", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft3, id_override) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-03/schema#", - "items": { "id": "schema" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaFrameError); -} - -TEST(JSONSchema_frame_draft3, explicit_argument_id_same) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-03/schema#", - "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft3, explicit_argument_id_different) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "one": { - "id": "test" - }, - "two": { - "id": "https://www.test.com" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-03/schema#", - "https://www.example.com"); - - EXPECT_EQ(frame.locations().size(), 22); - - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://www.example.com", "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://www.example.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.example.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://www.test.com", "https://www.sourcemeta.com/schema", - "/properties/two", "https://www.test.com", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/one", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/one/id", - "https://www.sourcemeta.com/schema", "/properties/one/id", - "https://www.sourcemeta.com/test", "/id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT3_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/two", - "https://www.sourcemeta.com/schema", "/properties/two", - "https://www.test.com", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/two/id", - "https://www.sourcemeta.com/schema", "/properties/two/id", - "https://www.test.com", "/id", "/properties/two", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.sourcemeta.com/test#/id", - "https://www.sourcemeta.com/schema", "/properties/one/id", - "https://www.sourcemeta.com/test", "/id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://www.test.com#/id", "https://www.sourcemeta.com/schema", - "/properties/two/id", "https://www.test.com", "/id", "/properties/two", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/one", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/two", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/one", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/two", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.example.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - "https://www.example.com/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.test.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - "https://www.test.com"); -} - -TEST(JSONSchema_frame_draft3, ref_metaschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "$ref": "http://json-schema.org/draft-03/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft3, ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-03/schema#", - "$ref": "#/definitions/string" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 4); - - // Note that `$ref` MUST override EVERY sibling keyword, so the `id` - // here is not considered at all - // - // However, note that we DO respect `$schema` at the top. This is because - // we START by checking `$schema` to figure out that `$ref` overrides, - // so we do know about the dialect anyway - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, std::nullopt, false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/id", "/id", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "#/definitions/string", "", - "/definitions/string", "#/definitions/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft3, top_level_relative_ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://example.com/foo", - "$ref": "bar" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 4); - - // Note that `id` is IGNORED given the sibling `$ref` - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/id", "/id", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "bar", "bar", std::nullopt, "bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft3, nested_relative_ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "id": "https://example.com", - "additionalProperties": { - "id": "https://nested.com", - "$ref": "bar" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_FRAME_STATIC_DRAFT3_RESOURCE( - frame, "https://example.com", "https://example.com", "", - "https://example.com", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://example.com#/id", "https://example.com", "/id", - "https://example.com", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://example.com#/$schema", "https://example.com", "/$schema", - "https://example.com", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_SUBSCHEMA( - frame, "https://example.com#/additionalProperties", "https://example.com", - "/additionalProperties", "https://example.com", "/additionalProperties", - "", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://example.com#/additionalProperties/id", - "https://example.com", "/additionalProperties/id", "https://example.com", - "/additionalProperties/id", "/additionalProperties", false, false); - EXPECT_FRAME_STATIC_DRAFT3_POINTER( - frame, "https://example.com#/additionalProperties/$ref", - "https://example.com", "/additionalProperties/$ref", - "https://example.com", "/additionalProperties/$ref", - "/additionalProperties", false, false); - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/additionalProperties/$ref", - "https://example.com/bar", "https://example.com/bar", - std::nullopt, "bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://example.com#/additionalProperties", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://example.com", - "https://example.com#/additionalProperties"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://example.com#/additionalProperties", - "https://example.com#/additionalProperties"); -} - -TEST(JSONSchema_frame_draft3, top_level_id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "#", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.root().empty()); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/id", "/id", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft3, top_level_id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.root().empty()); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/id", "/id", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft3, id_fragment_rejected) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "#foo", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaFrameError &error) { - EXPECT_EQ(error.identifier(), "#foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_draft3, id_fragment_invalid_whitespace) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "#foo bar", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "id"); - EXPECT_EQ(error.value(), "#foo bar"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_draft3, definitions_subschemas) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "definitions": { - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions", "/definitions", - "http://json-schema.org/draft-03/schema#", JSON_Schema_Draft_3, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/definitions/string", "/definitions/string", - "http://json-schema.org/draft-03/schema#", JSON_Schema_Draft_3, "", false, - true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/string/type", "/definitions/string/type", - "http://json-schema.org/draft-03/schema#", JSON_Schema_Draft_3, - "/definitions/string", false, true); - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/definitions/string", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/definitions/string", - "#/definitions/string"); -} - -TEST(JSONSchema_frame_draft3, ref_into_definitions) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "foo": { "$ref": "#/definitions/string" } - }, - "definitions": { - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-03/schema#", - JSON_Schema_Draft_3, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "http://json-schema.org/draft-03/schema#", JSON_Schema_Draft_3, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "http://json-schema.org/draft-03/schema#", JSON_Schema_Draft_3, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$ref", "/properties/foo/$ref", - "http://json-schema.org/draft-03/schema#", JSON_Schema_Draft_3, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions", "/definitions", - "http://json-schema.org/draft-03/schema#", JSON_Schema_Draft_3, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/definitions/string", "/definitions/string", - "http://json-schema.org/draft-03/schema#", JSON_Schema_Draft_3, "", false, - true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/string/type", "/definitions/string/type", - "http://json-schema.org/draft-03/schema#", JSON_Schema_Draft_3, - "/definitions/string", false, true); - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-03/schema", - "http://json-schema.org/draft-03/schema", std::nullopt, - "http://json-schema.org/draft-03/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", "#/definitions/string", - "", "/definitions/string", "#/definitions/string"); - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/definitions/string", - frame.root()); -} diff --git a/test/jsonschema/jsonschema_frame_draft4_test.cc b/test/jsonschema/jsonschema_frame_draft4_test.cc deleted file mode 100644 index ea9091426..000000000 --- a/test/jsonschema/jsonschema_frame_draft4_test.cc +++ /dev/null @@ -1,1430 +0,0 @@ -#include - -#include -#include -#include - -#include "jsonschema_test_utils.h" - -#define EXPECT_FRAME_STATIC_DRAFT4_POINTER( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_POINTER(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-04/schema#", \ - JSON_Schema_Draft_4, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_RESOURCE(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-04/schema#", \ - JSON_Schema_Draft_4, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT4_ANCHOR( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_ANCHOR(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-04/schema#", \ - JSON_Schema_Draft_4, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT4_SUBSCHEMA( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_SUBSCHEMA(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-04/schema#", \ - JSON_Schema_Draft_4, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -TEST(JSONSchema_frame_draft4, anonymous_with_nested_schema_resource) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "additionalProperties": { "id": "https://example.com" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "/additionalProperties", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, "", false, - false); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/id", "/additionalProperties/id", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "/additionalProperties", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalProperties", "/additionalProperties", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalProperties/id", "/additionalProperties/id", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "/additionalProperties", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - "https://example.com"); -} - -TEST(JSONSchema_frame_draft4, empty_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft4, empty_schema_trailing_hash) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema#", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft4, one_level_applicators_without_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-04/schema#", - "items": { "type": "string" }, - "properties": { - "foo": { "type": "number" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/schema", "/items/type", "/items", false, - false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "/properties/foo", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema#/items"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); -} - -TEST(JSONSchema_frame_draft4, one_level_applicators_with_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/test/qux", - "$schema": "http://json-schema.org/draft-04/schema#", - "items": { "id": "../foo", "type": "string" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/test/qux", "", - "https://www.sourcemeta.com/test/qux", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/id", - "https://www.sourcemeta.com/test/qux", "/id", - "https://www.sourcemeta.com/test/qux", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_SUBSCHEMA( - frame, "https://www.sourcemeta.com/test/qux#/items", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/id", - "https://www.sourcemeta.com/test/qux", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/foo#/id", - "https://www.sourcemeta.com/test/qux", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux#/items", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft4, subschema_absolute_identifier) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-04/schema#", - "items": { - "id": "https://www.sourcemeta.com/foo", - "type": "string" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/id", - "https://www.sourcemeta.com/schema", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/foo#/id", - "https://www.sourcemeta.com/schema", "/items/id", - "https://www.sourcemeta.com/foo", "/id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft4, id_override) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-04/schema#", - "items": { "id": "schema" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaFrameError); -} - -TEST(JSONSchema_frame_draft4, explicit_argument_id_same) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-04/schema#", - "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft4, explicit_argument_id_different) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "one": { - "id": "test" - }, - "two": { - "id": "https://www.test.com" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-04/schema#", - "https://www.example.com"); - - EXPECT_EQ(frame.locations().size(), 22); - - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.example.com", "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.example.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.example.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.test.com", "https://www.sourcemeta.com/schema", - "/properties/two", "https://www.test.com", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/one", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/one/id", - "https://www.sourcemeta.com/schema", "/properties/one/id", - "https://www.sourcemeta.com/test", "/id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT4_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/two", - "https://www.sourcemeta.com/schema", "/properties/two", - "https://www.test.com", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/two/id", - "https://www.sourcemeta.com/schema", "/properties/two/id", - "https://www.test.com", "/id", "/properties/two", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/test#/id", - "https://www.sourcemeta.com/schema", "/properties/one/id", - "https://www.sourcemeta.com/test", "/id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.test.com#/id", "https://www.sourcemeta.com/schema", - "/properties/two/id", "https://www.test.com", "/id", "/properties/two", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/one", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/two", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/one", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/two", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.example.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - "https://www.example.com/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.test.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - "https://www.test.com"); -} - -TEST(JSONSchema_frame_draft4, ref_metaschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "http://json-schema.org/draft-04/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft4, location_independent_identifier_anonymous) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "definitions": { - "foo": { - "id": "#foo" - }, - "bar": { - "$ref": "#foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - - // Pointers - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions", "/definitions", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, "", false, - false); - - // Foo - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/definitions/foo", "/definitions/foo", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, "", false, - true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/foo/id", "/definitions/foo/id", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "/definitions/foo", false, true); - - // Bar - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/definitions/bar", "/definitions/bar", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, "", false, - true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/bar/$ref", "/definitions/bar/$ref", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "/definitions/bar", false, true); - - // Anchors - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#foo", "/definitions/foo", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, "", false, - true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/definitions/bar/$ref", "#foo", "", "foo", - "#foo"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/definitions/foo", - frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/definitions/bar", - frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#foo", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/definitions/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/definitions/foo", - "#/definitions/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/definitions/bar", - "#/definitions/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/definitions/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/definitions/bar", - "#/definitions/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/definitions/foo", - "#/definitions/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#foo", "#/definitions/bar"); -} - -TEST(JSONSchema_frame_draft4, ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "#/definitions/string", - "definitions": { - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 7); - - // Note that `$ref` MUST override EVERY sibling keyword, so the `id` - // here is not considered at all - // - // However, note that we DO respect `$schema` at the top. This is because - // we START by checking `$schema` to figure out that `$ref` overrides, - // so we do know about the dialect anyway - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, std::nullopt, false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/id", "/id", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions", "/definitions", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/string", "/definitions/string", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/string/type", "/definitions/string/type", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, "", false, - false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "#/definitions/string", "", - "/definitions/string", "#/definitions/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft4, - id_with_trailing_hash_and_ref_and_same_default_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://www.sourcemeta.com/schema#", - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "foo": { "$ref": "#/properties/bar" }, - "bar": {} - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, "", - // Note that this is intentionally non-canonical - "https://www.sourcemeta.com/schema#"); - - EXPECT_EQ(frame.locations().size(), 7); - - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/id", - "https://www.sourcemeta.com/schema", "/id", - "https://www.sourcemeta.com/schema", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/$ref", - "https://www.sourcemeta.com/schema", "/properties/foo/$ref", - "https://www.sourcemeta.com/schema", "/properties/foo/$ref", - "/properties/foo", false, false); - EXPECT_FRAME_STATIC_DRAFT4_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", - "https://www.sourcemeta.com/schema", "/properties/bar", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", - "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema", - "/properties/bar", "#/properties/bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/bar"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/bar", - "https://www.sourcemeta.com/schema#/properties/bar"); -} - -TEST(JSONSchema_frame_draft4, relative_base_uri_without_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "common" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE(frame, "common", "common", "", "common", - "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT4_POINTER(frame, "common#/$schema", "common", - "/$schema", "common", "/$schema", "", - false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER(frame, "common#/id", "common", "/id", - "common", "/id", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common", frame.root()); -} - -TEST(JSONSchema_frame_draft4, relative_base_uri_with_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "common", - "allOf": [ { "$ref": "#foo" } ], - "definitions": { - "foo": { - "id": "#foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE(frame, "common", "common", "", "common", - "", std::nullopt, false, false); - - // Anchors - EXPECT_FRAME_STATIC_DRAFT4_ANCHOR(frame, "common#foo", "common", - "/definitions/foo", "common", - "/definitions/foo", "", false, true); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT4_POINTER(frame, "common#/$schema", "common", - "/$schema", "common", "/$schema", "", - false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER(frame, "common#/id", "common", "/id", - "common", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER(frame, "common#/allOf", "common", "/allOf", - "common", "/allOf", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_SUBSCHEMA(frame, "common#/allOf/0", "common", - "/allOf/0", "common", "/allOf/0", "", - false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER(frame, "common#/allOf/0/$ref", "common", - "/allOf/0/$ref", "common", "/allOf/0/$ref", - "/allOf/0", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER(frame, "common#/definitions", "common", - "/definitions", "common", "/definitions", - "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_SUBSCHEMA(frame, "common#/definitions/foo", - "common", "/definitions/foo", "common", - "/definitions/foo", "", false, true); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "common#/definitions/foo/id", "common", "/definitions/foo/id", - "common", "/definitions/foo/id", "/definitions/foo", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/allOf/0/$ref", "common#foo", "common", "foo", - "#foo"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/allOf/0", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/definitions/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "common", - "common#/allOf/0"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/allOf/0", - "common#/allOf/0"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#foo", - "common#/allOf/0"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/definitions/foo", - "common#/allOf/0"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "common", - "common#/definitions/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "common#/allOf/0", - "common#/definitions/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/definitions/foo", - "common#/definitions/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#foo", - "common#/definitions/foo"); -} - -TEST(JSONSchema_frame_draft4, ref_with_invalid_type) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": 123 - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$ref"); - EXPECT_EQ(error.value(), "123"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_draft4, ref_invalidates_sibling_subschemas_and_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "properties": { - "foo": { - "$ref": "#/definitions/enabled", - "properties": { - "bar": { - "$ref": "#/definitions/config", - "additionalProperties": { - "$ref": "#/definitions/threshold" - } - } - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$ref", "/properties/foo/$ref", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties", "/properties/foo/properties", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar", - "/properties/foo/properties/bar", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar/$ref", - "/properties/foo/properties/bar/$ref", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar/additionalProperties", - "/properties/foo/properties/bar/additionalProperties", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar/additionalProperties/$ref", - "/properties/foo/properties/bar/additionalProperties/$ref", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "/properties/foo", false, false); - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", - "#/definitions/enabled", "", "/definitions/enabled", - "#/definitions/enabled"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/foo"); -} - -TEST(JSONSchema_frame_draft4, top_level_relative_ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com/foo", - "$ref": "bar" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 4); - - // Note that `id` is IGNORED given the sibling `$ref` - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/id", "/id", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "bar", "bar", std::nullopt, "bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft4, nested_relative_ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com", - "additionalProperties": { - "id": "https://nested.com", - "$ref": "bar" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_FRAME_STATIC_DRAFT4_RESOURCE( - frame, "https://example.com", "https://example.com", "", - "https://example.com", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://example.com#/id", "https://example.com", "/id", - "https://example.com", "/id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://example.com#/$schema", "https://example.com", "/$schema", - "https://example.com", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_SUBSCHEMA( - frame, "https://example.com#/additionalProperties", "https://example.com", - "/additionalProperties", "https://example.com", "/additionalProperties", - "", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://example.com#/additionalProperties/id", - "https://example.com", "/additionalProperties/id", "https://example.com", - "/additionalProperties/id", "/additionalProperties", false, false); - EXPECT_FRAME_STATIC_DRAFT4_POINTER( - frame, "https://example.com#/additionalProperties/$ref", - "https://example.com", "/additionalProperties/$ref", - "https://example.com", "/additionalProperties/$ref", - "/additionalProperties", false, false); - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/additionalProperties/$ref", - "https://example.com/bar", "https://example.com/bar", - std::nullopt, "bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://example.com#/additionalProperties", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://example.com", - "https://example.com#/additionalProperties"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://example.com#/additionalProperties", - "https://example.com#/additionalProperties"); -} - -TEST(JSONSchema_frame_draft4, invalid_id_not_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema", - "id": 123 - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "id"); - EXPECT_EQ(error.value(), "123"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_draft4, top_level_id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "#", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.root().empty()); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/id", "/id", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft4, top_level_id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.root().empty()); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/id", "/id", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft4, id_fragment_invalid_whitespace) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "definitions": { - "foo": { - "id": "#foo bar" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "id"); - EXPECT_EQ(error.value(), "#foo bar"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_draft4, id_fragment_invalid_angle_bracket) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "definitions": { - "foo": { - "id": "#foo - -#include -#include -#include - -#include "jsonschema_test_utils.h" - -#define EXPECT_FRAME_STATIC_DRAFT6_POINTER( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_POINTER(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-06/schema#", \ - JSON_Schema_Draft_6, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_RESOURCE(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-06/schema#", \ - JSON_Schema_Draft_6, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT6_ANCHOR( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_ANCHOR(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-06/schema#", \ - JSON_Schema_Draft_6, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT6_SUBSCHEMA( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_SUBSCHEMA(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-06/schema#", \ - JSON_Schema_Draft_6, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -TEST(JSONSchema_frame_draft6, anonymous_with_nested_schema_resource) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "additionalProperties": { "$id": "https://example.com" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "/additionalProperties", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$id", "/additionalProperties/$id", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/additionalProperties", false, false); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalProperties", "/additionalProperties", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalProperties/$id", "/additionalProperties/$id", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/additionalProperties", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - "https://example.com"); -} - -TEST(JSONSchema_frame_draft6, empty_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft6, empty_schema_trailing_hash) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema#", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft6, one_level_applicators_without_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-06/schema#", - "items": { "type": "string" }, - "properties": { - "foo": { "type": "number" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/schema", "/items/type", "/items", false, - false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "/properties/foo", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema#/items"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); -} - -TEST(JSONSchema_frame_draft6, one_level_applicators_with_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/test/qux", - "$schema": "http://json-schema.org/draft-06/schema#", - "items": { "$id": "../foo", "type": "string" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/test/qux", "", - "https://www.sourcemeta.com/test/qux", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/$id", - "https://www.sourcemeta.com/test/qux", "/$id", - "https://www.sourcemeta.com/test/qux", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_SUBSCHEMA( - frame, "https://www.sourcemeta.com/test/qux#/items", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/$id", - "https://www.sourcemeta.com/test/qux", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/foo#/$id", - "https://www.sourcemeta.com/test/qux", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux#/items", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux#/items", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft6, subschema_absolute_identifier) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-06/schema#", - "items": { - "$id": "https://www.sourcemeta.com/foo", - "type": "string" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/$id", - "https://www.sourcemeta.com/schema", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/foo#/$id", - "https://www.sourcemeta.com/schema", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft6, id_override) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-06/schema#", - "items": { "$id": "schema" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaFrameError); -} - -TEST(JSONSchema_frame_draft6, explicit_argument_id_same) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-06/schema#", - "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft6, explicit_argument_id_different) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "one": { - "$id": "test" - }, - "two": { - "$id": "https://www.test.com" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-06/schema#", - "https://www.example.com"); - - EXPECT_EQ(frame.locations().size(), 22); - - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://www.example.com", "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://www.example.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.example.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://www.test.com", "https://www.sourcemeta.com/schema", - "/properties/two", "https://www.test.com", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/one", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/one/$id", - "https://www.sourcemeta.com/schema", "/properties/one/$id", - "https://www.sourcemeta.com/test", "/$id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT6_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/two", - "https://www.sourcemeta.com/schema", "/properties/two", - "https://www.test.com", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/two/$id", - "https://www.sourcemeta.com/schema", "/properties/two/$id", - "https://www.test.com", "/$id", "/properties/two", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.sourcemeta.com/test#/$id", - "https://www.sourcemeta.com/schema", "/properties/one/$id", - "https://www.sourcemeta.com/test", "/$id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://www.test.com#/$id", "https://www.sourcemeta.com/schema", - "/properties/two/$id", "https://www.test.com", "/$id", "/properties/two", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/one", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/two", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/one", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/two", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/test"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "https://www.test.com", - "https://www.sourcemeta.com/test"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.test.com"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", "https://www.test.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - "https://www.test.com"); -} - -TEST(JSONSchema_frame_draft6, ref_metaschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$ref": "http://json-schema.org/draft-06/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft6, location_independent_identifier_anonymous) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "definitions": { - "foo": { - "$id": "#foo" - }, - "bar": { - "$ref": "#foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - - // Pointers - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions", "/definitions", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, "", false, - false); - - // Foo - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/definitions/foo", "/definitions/foo", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, "", false, - true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/foo/$id", "/definitions/foo/$id", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/definitions/foo", false, true); - - // Bar - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/definitions/bar", "/definitions/bar", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, "", false, - true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/bar/$ref", "/definitions/bar/$ref", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/definitions/bar", false, true); - - // Anchors - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#foo", "/definitions/foo", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, "", false, - true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/definitions/bar/$ref", "#foo", "", "foo", - "#foo"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/definitions/foo", - frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/definitions/bar", - frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#foo", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/definitions/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/definitions/foo", - "#/definitions/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/definitions/bar", - "#/definitions/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#foo", "#/definitions/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/definitions/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/definitions/foo", - "#/definitions/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/definitions/bar", - "#/definitions/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#foo", "#/definitions/bar"); -} - -TEST(JSONSchema_frame_draft6, ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-06/schema#", - "$ref": "#/definitions/string", - "definitions": { - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 7); - - // Note that `$ref` MUST override EVERY sibling keyword, so the `$id` - // here is not considered at all - // - // However, note that we DO respect `$schema` at the top. This is because - // we START by checking `$schema` to figure out that `$ref` overrides, - // so we do know about the dialect anyway - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, std::nullopt, false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$id", "/$id", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions", "/definitions", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/string", "/definitions/string", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/string/type", "/definitions/string/type", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, "", false, - false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "#/definitions/string", "", - "/definitions/string", "#/definitions/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft6, relative_base_uri_without_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "common" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE(frame, "common", "common", "", "common", - "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT6_POINTER(frame, "common#/$schema", "common", - "/$schema", "common", "/$schema", "", - false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER(frame, "common#/$id", "common", "/$id", - "common", "/$id", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common", frame.root()); -} - -TEST(JSONSchema_frame_draft6, relative_base_uri_with_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "common", - "allOf": [ { "$ref": "#foo" } ], - "definitions": { - "foo": { - "$id": "#foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE(frame, "common", "common", "", "common", - "", std::nullopt, false, false); - - // Anchors - EXPECT_FRAME_STATIC_DRAFT6_ANCHOR(frame, "common#foo", "common", - "/definitions/foo", "common", - "/definitions/foo", "", false, true); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT6_POINTER(frame, "common#/$schema", "common", - "/$schema", "common", "/$schema", "", - false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER(frame, "common#/$id", "common", "/$id", - "common", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER(frame, "common#/allOf", "common", "/allOf", - "common", "/allOf", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_SUBSCHEMA(frame, "common#/allOf/0", "common", - "/allOf/0", "common", "/allOf/0", "", - false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER(frame, "common#/allOf/0/$ref", "common", - "/allOf/0/$ref", "common", "/allOf/0/$ref", - "/allOf/0", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER(frame, "common#/definitions", "common", - "/definitions", "common", "/definitions", - "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_SUBSCHEMA(frame, "common#/definitions/foo", - "common", "/definitions/foo", "common", - "/definitions/foo", "", false, true); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "common#/definitions/foo/$id", "common", "/definitions/foo/$id", - "common", "/definitions/foo/$id", "/definitions/foo", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/allOf/0/$ref", "common#foo", "common", "foo", - "#foo"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/allOf/0", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/definitions/foo", - frame.root()); -} - -TEST(JSONSchema_frame_draft6, ref_invalidates_sibling_subschemas_and_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "properties": { - "foo": { - "$ref": "#/definitions/enabled", - "properties": { - "bar": { - "$ref": "#/definitions/config", - "additionalProperties": { - "$ref": "#/definitions/threshold" - } - } - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$ref", "/properties/foo/$ref", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties", "/properties/foo/properties", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar", - "/properties/foo/properties/bar", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar/$ref", - "/properties/foo/properties/bar/$ref", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar/additionalProperties", - "/properties/foo/properties/bar/additionalProperties", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar/additionalProperties/$ref", - "/properties/foo/properties/bar/additionalProperties/$ref", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/properties/foo", false, false); - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", - "#/definitions/enabled", "", "/definitions/enabled", - "#/definitions/enabled"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/foo"); -} - -TEST(JSONSchema_frame_draft6, top_level_relative_ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://example.com/foo", - "$ref": "bar" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 4); - - // Note that `$id` is IGNORED given the sibling `$ref` - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$id", "/$id", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "bar", "bar", std::nullopt, "bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft6, nested_relative_ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://example.com", - "additionalProperties": { - "$id": "https://nested.com", - "$ref": "bar" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_FRAME_STATIC_DRAFT6_RESOURCE( - frame, "https://example.com", "https://example.com", "", - "https://example.com", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://example.com#/$id", "https://example.com", "/$id", - "https://example.com", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://example.com#/$schema", "https://example.com", "/$schema", - "https://example.com", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_SUBSCHEMA( - frame, "https://example.com#/additionalProperties", "https://example.com", - "/additionalProperties", "https://example.com", "/additionalProperties", - "", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://example.com#/additionalProperties/$id", - "https://example.com", "/additionalProperties/$id", "https://example.com", - "/additionalProperties/$id", "/additionalProperties", false, false); - EXPECT_FRAME_STATIC_DRAFT6_POINTER( - frame, "https://example.com#/additionalProperties/$ref", - "https://example.com", "/additionalProperties/$ref", - "https://example.com", "/additionalProperties/$ref", - "/additionalProperties", false, false); - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/additionalProperties/$ref", - "https://example.com/bar", "https://example.com/bar", - std::nullopt, "bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://example.com#/additionalProperties", frame.root()); -} - -TEST(JSONSchema_frame_draft6, propertyNames_with_nested_applicators) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "propertyNames": { - "anyOf": [ - { "minLength": 1 }, - { "maxLength": 10 } - ], - "additionalProperties": { - "type": "boolean" - }, - "definitions": { - "test": { - "type": "string" - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 13); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/propertyNames", "/propertyNames", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, "", true, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/propertyNames/anyOf/0", "/propertyNames/anyOf/0", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/propertyNames", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/propertyNames/anyOf/1", "/propertyNames/anyOf/1", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/propertyNames", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/propertyNames/additionalProperties", - "/propertyNames/additionalProperties", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/propertyNames", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/propertyNames/definitions/test", - "/propertyNames/definitions/test", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/propertyNames", false, true); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/anyOf", "/propertyNames/anyOf", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/propertyNames", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/anyOf/0/minLength", - "/propertyNames/anyOf/0/minLength", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/propertyNames/anyOf/0", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/anyOf/1/maxLength", - "/propertyNames/anyOf/1/maxLength", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/propertyNames/anyOf/1", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/additionalProperties/type", - "/propertyNames/additionalProperties/type", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/propertyNames/additionalProperties", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/definitions", "/propertyNames/definitions", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/propertyNames", true, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/propertyNames/definitions/test/type", - "/propertyNames/definitions/test/type", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "/propertyNames/definitions/test", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/propertyNames", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/propertyNames/anyOf/0", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/propertyNames/anyOf/1", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "#/propertyNames/additionalProperties", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "#/propertyNames/definitions/test", frame.root()); -} - -TEST(JSONSchema_frame_draft6, top_level_id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "#", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.root().empty()); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$id", "/$id", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft6, top_level_id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.root().empty()); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$id", "/$id", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-06/schema", - "http://json-schema.org/draft-06/schema", std::nullopt, - "http://json-schema.org/draft-06/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft6, id_fragment_invalid_leading_digit) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "definitions": { - "foo": { - "$id": "#1foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$id"); - EXPECT_EQ(error.value(), "#1foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_draft6, id_fragment_invalid_punctuation) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "definitions": { - "foo": { - "$id": "#foo!" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$id"); - EXPECT_EQ(error.value(), "#foo!"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_draft6, id_fragment_invalid_leading_underscore) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "definitions": { - "foo": { - "$id": "#_foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$id"); - EXPECT_EQ(error.value(), "#_foo"); - } catch (...) { - FAIL(); - } -} diff --git a/test/jsonschema/jsonschema_frame_draft7_test.cc b/test/jsonschema/jsonschema_frame_draft7_test.cc deleted file mode 100644 index 425340cd3..000000000 --- a/test/jsonschema/jsonschema_frame_draft7_test.cc +++ /dev/null @@ -1,1424 +0,0 @@ -#include - -#include -#include -#include - -#include "jsonschema_test_utils.h" - -#define EXPECT_FRAME_STATIC_DRAFT7_POINTER( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_POINTER(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-07/schema#", \ - JSON_Schema_Draft_7, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_RESOURCE(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-07/schema#", \ - JSON_Schema_Draft_7, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT7_ANCHOR( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_ANCHOR(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-07/schema#", \ - JSON_Schema_Draft_7, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -#define EXPECT_FRAME_STATIC_DRAFT7_SUBSCHEMA( \ - frame, reference, root_id, expected_pointer, expected_base, \ - expected_relative_pointer, expected_parent, expected_property_name, \ - expected_orphan) \ - EXPECT_FRAME_STATIC_SUBSCHEMA(frame, reference, root_id, expected_pointer, \ - "http://json-schema.org/draft-07/schema#", \ - JSON_Schema_Draft_7, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan); - -TEST(JSONSchema_frame_draft7, anonymous_with_nested_schema_resource) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": { "$id": "https://example.com" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "/additionalProperties", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$id", "/additionalProperties/$id", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/additionalProperties", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/additionalProperties", "/additionalProperties", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/additionalProperties/$id", "/additionalProperties/$id", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/additionalProperties", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - "https://example.com"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/additionalProperties", - "https://example.com"); -} - -TEST(JSONSchema_frame_draft7, empty_schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft7, empty_schema_trailing_hash) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema#", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft7, one_level_applicators_without_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-07/schema#", - "items": { "type": "string" }, - "properties": { - "foo": { "type": "number" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/schema", "/items/type", "/items", false, - false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", - "https://www.sourcemeta.com/schema", "/properties/foo", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "https://www.sourcemeta.com/schema", "/properties/foo/type", - "/properties/foo", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema#/items"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/items"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/foo", - "https://www.sourcemeta.com/schema#/properties/foo"); -} - -TEST(JSONSchema_frame_draft7, one_level_applicators_with_identifiers) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/test/qux", - "$schema": "http://json-schema.org/draft-07/schema#", - "items": { "$id": "../foo", "type": "string" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/test/qux", "", - "https://www.sourcemeta.com/test/qux", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/$id", - "https://www.sourcemeta.com/test/qux", "/$id", - "https://www.sourcemeta.com/test/qux", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", - "https://www.sourcemeta.com/test/qux", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_SUBSCHEMA( - frame, "https://www.sourcemeta.com/test/qux#/items", - "https://www.sourcemeta.com/test/qux", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/$id", - "https://www.sourcemeta.com/test/qux", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/test/qux#/items/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/foo#/$id", - "https://www.sourcemeta.com/test/qux", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/test/qux", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test/qux", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux#/items", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/test/qux#/items", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft7, subschema_absolute_identifier) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-07/schema#", - "items": { - "$id": "https://www.sourcemeta.com/foo", - "type": "string" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://www.sourcemeta.com/foo", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/$id", - "https://www.sourcemeta.com/schema", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/foo#/$id", - "https://www.sourcemeta.com/schema", "/items/$id", - "https://www.sourcemeta.com/foo", "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/foo#/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://www.sourcemeta.com/foo", "/type", "/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/items", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, - "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_frame_draft7, id_override) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-07/schema#", - "items": { "$id": "schema" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaFrameError); -} - -TEST(JSONSchema_frame_draft7, explicit_argument_id_same) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-07/schema#", - "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 3); - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); -} - -TEST(JSONSchema_frame_draft7, explicit_argument_id_different) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "one": { - "$id": "test" - }, - "two": { - "$id": "https://www.test.com" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-07/schema#", - "https://www.example.com"); - - EXPECT_EQ(frame.locations().size(), 22); - - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://www.example.com", "https://www.sourcemeta.com/schema", "", - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://www.example.com/test", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.example.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://www.test.com", "https://www.sourcemeta.com/schema", - "/properties/two", "https://www.test.com", "", "", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/$id", - "https://www.sourcemeta.com/schema", "/$id", - "https://www.sourcemeta.com/schema", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties", - "https://www.sourcemeta.com/schema", "/properties", - "https://www.sourcemeta.com/schema", "/properties", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/one", - "https://www.sourcemeta.com/schema", "/properties/one", - "https://www.sourcemeta.com/test", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/one/$id", - "https://www.sourcemeta.com/schema", "/properties/one/$id", - "https://www.sourcemeta.com/test", "/$id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT7_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/properties/two", - "https://www.sourcemeta.com/schema", "/properties/two", - "https://www.test.com", "", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/schema#/properties/two/$id", - "https://www.sourcemeta.com/schema", "/properties/two/$id", - "https://www.test.com", "/$id", "/properties/two", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.sourcemeta.com/test#/$id", - "https://www.sourcemeta.com/schema", "/properties/one/$id", - "https://www.sourcemeta.com/test", "/$id", "/properties/one", false, - false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://www.test.com#/$id", "https://www.sourcemeta.com/schema", - "/properties/two/$id", "https://www.test.com", "/$id", "/properties/two", - false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/test", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.example.com/test", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://www.test.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/one", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.sourcemeta.com/schema#/properties/two", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/one", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://www.example.com#/properties/two", frame.root()); -} - -TEST(JSONSchema_frame_draft7, ref_metaschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "http://json-schema.org/draft-07/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - EXPECT_STATIC_REFERENCE( - frame, "/$ref", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft7, location_independent_identifier_anonymous) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "foo": { - "$id": "#foo" - }, - "bar": { - "$ref": "#foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 8); - - // Pointers - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions", "/definitions", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - - // Foo - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/definitions/foo", "/definitions/foo", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/foo/$id", "/definitions/foo/$id", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/definitions/foo", false, true); - - // Bar - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/definitions/bar", "/definitions/bar", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/bar/$ref", "/definitions/bar/$ref", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/definitions/bar", false, true); - - // Anchors - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#foo", "/definitions/foo", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/definitions/bar/$ref", "#foo", "", "foo", - "#foo"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/definitions/foo", - frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/definitions/bar", - frame.root()); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#foo", frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/definitions/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/definitions/foo", - "#/definitions/foo"); - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "#/definitions/bar", - "#/definitions/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#foo", "#/definitions/foo"); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/definitions/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/definitions/foo", - "#/definitions/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/definitions/bar", - "#/definitions/bar"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#foo", "#/definitions/bar"); -} - -TEST(JSONSchema_frame_draft7, ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "#/definitions/string", - "definitions": { - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 7); - - // Note that `$ref` MUST override EVERY sibling keyword, so the `$id` - // here is not considered at all - // - // However, note that we DO respect `$schema` at the top. This is because - // we START by checking `$schema` to figure out that `$ref` overrides, - // so we do know about the dialect anyway - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, std::nullopt, false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$id", "/$id", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions", "/definitions", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/string", "/definitions/string", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/string/type", "/definitions/string/type", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "#/definitions/string", "", - "/definitions/string", "#/definitions/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft7, ref_with_definitions) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "#/definitions/string", - "definitions": { - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions", "/definitions", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - - // Note that this is NOT considered to be a subschema, as `$ref` overrides it - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/string", "/definitions/string", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/string/type", "/definitions/string/type", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "#/definitions/string", "", - "/definitions/string", "#/definitions/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft7, ref_with_properties) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "#/properties/string", - "properties": { - "string": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/string", "/properties/string", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/string/type", "/properties/string/type", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "#/properties/string", "", - "/properties/string", "#/properties/string"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft7, relative_base_uri_without_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "common" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE(frame, "common", "common", "", "common", - "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT7_POINTER(frame, "common#/$schema", "common", - "/$schema", "common", "/$schema", "", - false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER(frame, "common#/$id", "common", "/$id", - "common", "/$id", "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common", frame.root()); -} - -TEST(JSONSchema_frame_draft7, relative_base_uri_with_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "common", - "allOf": [ { "$ref": "#foo" } ], - "definitions": { - "foo": { - "$id": "#foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE(frame, "common", "common", "", "common", - "", std::nullopt, false, false); - - // Anchors - EXPECT_FRAME_STATIC_DRAFT7_ANCHOR(frame, "common#foo", "common", - "/definitions/foo", "common", - "/definitions/foo", "", false, true); - - // JSON Pointers - - EXPECT_FRAME_STATIC_DRAFT7_POINTER(frame, "common#/$schema", "common", - "/$schema", "common", "/$schema", "", - false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER(frame, "common#/$id", "common", "/$id", - "common", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER(frame, "common#/allOf", "common", "/allOf", - "common", "/allOf", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_SUBSCHEMA(frame, "common#/allOf/0", "common", - "/allOf/0", "common", "/allOf/0", "", - false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER(frame, "common#/allOf/0/$ref", "common", - "/allOf/0/$ref", "common", "/allOf/0/$ref", - "/allOf/0", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER(frame, "common#/definitions", "common", - "/definitions", "common", "/definitions", - "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_SUBSCHEMA(frame, "common#/definitions/foo", - "common", "/definitions/foo", "common", - "/definitions/foo", "", false, true); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "common#/definitions/foo/$id", "common", "/definitions/foo/$id", - "common", "/definitions/foo/$id", "/definitions/foo", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/allOf/0/$ref", "common#foo", "common", "foo", - "#foo"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#foo", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/allOf/0", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "common#/definitions/foo", - frame.root()); -} - -TEST(JSONSchema_frame_draft7, ref_invalidates_sibling_subschemas_and_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "properties": { - "foo": { - "$ref": "#/definitions/enabled", - "properties": { - "bar": { - "$ref": "#/definitions/config", - "additionalProperties": { - "$ref": "#/definitions/threshold" - } - } - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$ref", "/properties/foo/$ref", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties", "/properties/foo/properties", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar", - "/properties/foo/properties/bar", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar/$ref", - "/properties/foo/properties/bar/$ref", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar/additionalProperties", - "/properties/foo/properties/bar/additionalProperties", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/properties/bar/additionalProperties/$ref", - "/properties/foo/properties/bar/additionalProperties/$ref", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/properties/foo", false, false); - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", - "#/definitions/enabled", "", "/definitions/enabled", - "#/definitions/enabled"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - frame.root()); - - EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, Static, "", "#/properties/foo"); - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "#/properties/foo", - "#/properties/foo"); -} - -TEST(JSONSchema_frame_draft7, top_level_relative_ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/foo", - "$ref": "bar" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 4); - - // Note that `$id` is IGNORED given the sibling `$ref` - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$id", "/$id", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$ref", "/$ref", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "bar", "bar", std::nullopt, "bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft7, nested_relative_ref_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com", - "additionalProperties": { - "$id": "https://nested.com", - "$ref": "bar" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 6); - - EXPECT_FRAME_STATIC_DRAFT7_RESOURCE( - frame, "https://example.com", "https://example.com", "", - "https://example.com", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://example.com#/$id", "https://example.com", "/$id", - "https://example.com", "/$id", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://example.com#/$schema", "https://example.com", "/$schema", - "https://example.com", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_SUBSCHEMA( - frame, "https://example.com#/additionalProperties", "https://example.com", - "/additionalProperties", "https://example.com", "/additionalProperties", - "", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://example.com#/additionalProperties/$id", - "https://example.com", "/additionalProperties/$id", "https://example.com", - "/additionalProperties/$id", "/additionalProperties", false, false); - EXPECT_FRAME_STATIC_DRAFT7_POINTER( - frame, "https://example.com#/additionalProperties/$ref", - "https://example.com", "/additionalProperties/$ref", - "https://example.com", "/additionalProperties/$ref", - "/additionalProperties", false, false); - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/additionalProperties/$ref", - "https://example.com/bar", "https://example.com/bar", - std::nullopt, "bar"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "https://example.com", - frame.root()); - EXPECT_FRAME_LOCATION_REACHABLE( - frame, Static, "https://example.com#/additionalProperties", frame.root()); -} - -TEST(JSONSchema_frame_draft7, top_level_id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "#", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.root().empty()); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$id", "/$id", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft7, top_level_id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.root().empty()); - - EXPECT_EQ(frame.locations().size(), 3); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$id", "/$id", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - - // Reachability - - EXPECT_FRAME_LOCATION_REACHABLE(frame, Static, "", frame.root()); -} - -TEST(JSONSchema_frame_draft7, id_fragment_invalid_leading_digit) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "foo": { - "$id": "#1foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$id"); - EXPECT_EQ(error.value(), "#1foo"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_draft7, id_fragment_invalid_punctuation) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "foo": { - "$id": "#foo!" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$id"); - EXPECT_EQ(error.value(), "#foo!"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_draft7, id_fragment_invalid_at_sign) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "foo": { - "$id": "#foo@bar" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$id"); - EXPECT_EQ(error.value(), "#foo@bar"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame_draft7, id_fragment_invalid_leading_underscore) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "foo": { - "$id": "#_foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$id"); - EXPECT_EQ(error.value(), "#_foo"); - } catch (...) { - FAIL(); - } -} diff --git a/test/jsonschema/jsonschema_frame_test.cc b/test/jsonschema/jsonschema_frame_test.cc deleted file mode 100644 index 4473e9b8b..000000000 --- a/test/jsonschema/jsonschema_frame_test.cc +++ /dev/null @@ -1,3362 +0,0 @@ -#include - -#include -#include -#include - -#include -#include - -#include "jsonschema_test_utils.h" - -TEST(JSONSchema_frame, nested_schemas_mixing_dialects) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/test", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "foo": { - "id": "foo", - "$schema": "http://json-schema.org/draft-04/schema#", - "definitions": { - "bar": { - "id": "bar", - "type": "string" - } - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 21); - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/test", "", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.sourcemeta.com/test", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://www.sourcemeta.com/foo", - "https://www.sourcemeta.com/test", "/$defs/foo", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/foo", "", "", false, true); - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://www.sourcemeta.com/bar", - "https://www.sourcemeta.com/test", "/$defs/foo/definitions/bar", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/bar", "", "/$defs/foo", false, true); - - // JSON Pointers - - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/test#/$id", - "https://www.sourcemeta.com/test", "/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.sourcemeta.com/test", "/$id", "", false, false); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/test#/$schema", - "https://www.sourcemeta.com/test", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.sourcemeta.com/test", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/test#/$defs", - "https://www.sourcemeta.com/test", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.sourcemeta.com/test", "/$defs", "", false, false); - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://www.sourcemeta.com/test#/$defs/foo", - "https://www.sourcemeta.com/test", "/$defs/foo", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/foo", "", "", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/test#/$defs/foo/id", - "https://www.sourcemeta.com/test", "/$defs/foo/id", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/foo", "/id", "/$defs/foo", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/test#/$defs/foo/$schema", - "https://www.sourcemeta.com/test", "/$defs/foo/$schema", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/foo", "/$schema", "/$defs/foo", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/test#/$defs/foo/definitions", - "https://www.sourcemeta.com/test", "/$defs/foo/definitions", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/foo", "/definitions", "/$defs/foo", false, - true); - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://www.sourcemeta.com/test#/$defs/foo/definitions/bar", - "https://www.sourcemeta.com/test", "/$defs/foo/definitions/bar", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/bar", "", "/$defs/foo", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/test#/$defs/foo/definitions/bar/id", - "https://www.sourcemeta.com/test", "/$defs/foo/definitions/bar/id", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/bar", "/id", "/$defs/foo/definitions/bar", - false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/test#/$defs/foo/definitions/bar/type", - "https://www.sourcemeta.com/test", "/$defs/foo/definitions/bar/type", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/bar", "/type", "/$defs/foo/definitions/bar", - false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/foo#/id", - "https://www.sourcemeta.com/test", "/$defs/foo/id", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/foo", "/id", "/$defs/foo", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/foo#/$schema", - "https://www.sourcemeta.com/test", "/$defs/foo/$schema", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/foo", "/$schema", "/$defs/foo", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/foo#/definitions", - "https://www.sourcemeta.com/test", "/$defs/foo/definitions", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/foo", "/definitions", "/$defs/foo", false, - true); - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://www.sourcemeta.com/foo#/definitions/bar", - "https://www.sourcemeta.com/test", "/$defs/foo/definitions/bar", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/bar", "", "/$defs/foo", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/foo#/definitions/bar/id", - "https://www.sourcemeta.com/test", "/$defs/foo/definitions/bar/id", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/bar", "/id", "/$defs/foo/definitions/bar", - false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/foo#/definitions/bar/type", - "https://www.sourcemeta.com/test", "/$defs/foo/definitions/bar/type", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/bar", "/type", "/$defs/foo/definitions/bar", - false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/bar#/id", - "https://www.sourcemeta.com/test", "/$defs/foo/definitions/bar/id", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/bar", "/id", "/$defs/foo/definitions/bar", - false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/bar#/type", - "https://www.sourcemeta.com/test", "/$defs/foo/definitions/bar/type", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://www.sourcemeta.com/bar", "/type", "/$defs/foo/definitions/bar", - false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/$defs/foo/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); -} - -TEST(JSONSchema_frame, nested_schemas_sibling_ref_nested_2020_12_draft7) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/main", - "$ref": "embedded", - "$defs": { - "embedded": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "embedded", - "$ref": "#/definitions/foo", - "definitions": { - "foo": { "type": "number" } - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 19); - - // Resources - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://example.com/main", "https://example.com/main", "", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/main", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/main#/$schema", - "https://example.com/main", "/$schema", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/main", - "/$schema", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/main#/$id", - "https://example.com/main", "/$id", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/main", - "/$id", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/main#/$ref", - "https://example.com/main", "/$ref", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/main", - "/$ref", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/main#/$defs", - "https://example.com/main", "/$defs", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/main", - "/$defs", "", false, false); - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://example.com/embedded", "https://example.com/main", - "/$defs/embedded", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/embedded", "", "", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/embedded#/$schema", - "https://example.com/main", "/$defs/embedded/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/embedded", "/$schema", "/$defs/embedded", false, - true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/embedded#/$id", "https://example.com/main", - "/$defs/embedded/$id", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/embedded", "/$id", - "/$defs/embedded", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/embedded#/$ref", "https://example.com/main", - "/$defs/embedded/$ref", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/embedded", "/$ref", - "/$defs/embedded", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/embedded#/definitions", - "https://example.com/main", "/$defs/embedded/definitions", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/embedded", "/definitions", "/$defs/embedded", false, - true); - - // Note that this is still considered to be a subschema, but a 2020-12 one. - // The logic is that we try to interpret it as Draft 7, given `$schema`, but - // the `$ref` there overrides the `$id`, therefore it is not a schema - // resource, and thus `$schema` gets ignored. - - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com/embedded#/definitions/foo", - "https://example.com/main", "/$defs/embedded/definitions/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/embedded", "/definitions/foo", "/$defs/embedded", - false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/embedded#/definitions/foo/type", - "https://example.com/main", "/$defs/embedded/definitions/foo/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/embedded", "/definitions/foo/type", - "/$defs/embedded/definitions/foo", false, true); - - // From the root - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com/main#/$defs/embedded", - "https://example.com/main", "/$defs/embedded", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/embedded", "", "", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/$schema", - "https://example.com/main", "/$defs/embedded/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/embedded", "/$schema", "/$defs/embedded", false, - true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/$id", - "https://example.com/main", "/$defs/embedded/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/embedded", "/$id", "/$defs/embedded", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/$ref", - "https://example.com/main", "/$defs/embedded/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/embedded", "/$ref", "/$defs/embedded", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/definitions", - "https://example.com/main", "/$defs/embedded/definitions", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/embedded", "/definitions", "/$defs/embedded", false, - true); - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com/main#/$defs/embedded/definitions/foo", - "https://example.com/main", "/$defs/embedded/definitions/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/embedded", "/definitions/foo", "/$defs/embedded", - false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/definitions/foo/type", - "https://example.com/main", "/$defs/embedded/definitions/foo/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/embedded", "/definitions/foo/type", - "/$defs/embedded/definitions/foo", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 4); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "https://example.com/embedded", - "https://example.com/embedded", std::nullopt, - "embedded"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/embedded/$schema", - "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", - std::nullopt, - "http://json-schema.org/draft-07/schema#"); - - // Note that the reference keep its base URI because we end up interpreting - // the embedded schema as 2020-12 - EXPECT_STATIC_REFERENCE(frame, "/$defs/embedded/$ref", - "https://example.com/embedded#/definitions/foo", - "https://example.com/embedded", "/definitions/foo", - "#/definitions/foo"); -} - -TEST(JSONSchema_frame, - nested_schemas_sibling_ref_nested_2020_12_draft7_with_allof) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/main", - "$ref": "embedded", - "$defs": { - "embedded": { - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "embedded", - "allOf": [ { "$ref": "#/definitions/foo" } ], - "definitions": { - "foo": { "type": "number" } - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 23); - - // Resources - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://example.com/main", "https://example.com/main", "", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/main", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/main#/$schema", - "https://example.com/main", "/$schema", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/main", - "/$schema", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/main#/$id", - "https://example.com/main", "/$id", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/main", - "/$id", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/main#/$ref", - "https://example.com/main", "/$ref", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/main", - "/$ref", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/main#/$defs", - "https://example.com/main", "/$defs", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/main", - "/$defs", "", false, false); - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://example.com/embedded", "https://example.com/main", - "/$defs/embedded", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "https://example.com/embedded", "", "", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/embedded#/$schema", - "https://example.com/main", "/$defs/embedded/$schema", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/$schema", "/$defs/embedded", false, - true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/embedded#/$id", "https://example.com/main", - "/$defs/embedded/$id", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "https://example.com/embedded", "/$id", - "/$defs/embedded", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/embedded#/allOf", "https://example.com/main", - "/$defs/embedded/allOf", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "https://example.com/embedded", "/allOf", - "/$defs/embedded", false, true); - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com/embedded#/allOf/0", - "https://example.com/main", "/$defs/embedded/allOf/0", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/allOf/0", "/$defs/embedded", false, - true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/embedded#/allOf/0/$ref", - "https://example.com/main", "/$defs/embedded/allOf/0/$ref", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/allOf/0/$ref", - "/$defs/embedded/allOf/0", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/embedded#/definitions", - "https://example.com/main", "/$defs/embedded/definitions", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/definitions", "/$defs/embedded", false, - true); - - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com/embedded#/definitions/foo", - "https://example.com/main", "/$defs/embedded/definitions/foo", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/definitions/foo", "/$defs/embedded", - false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/embedded#/definitions/foo/type", - "https://example.com/main", "/$defs/embedded/definitions/foo/type", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/definitions/foo/type", - "/$defs/embedded/definitions/foo", false, true); - - // From the root - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com/main#/$defs/embedded", - "https://example.com/main", "/$defs/embedded", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "", "", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/$schema", - "https://example.com/main", "/$defs/embedded/$schema", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/$schema", "/$defs/embedded", false, - true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/$id", - "https://example.com/main", "/$defs/embedded/$id", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/$id", "/$defs/embedded", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/allOf", - "https://example.com/main", "/$defs/embedded/allOf", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/allOf", "/$defs/embedded", false, true); - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com/main#/$defs/embedded/allOf/0", - "https://example.com/main", "/$defs/embedded/allOf/0", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/allOf/0", "/$defs/embedded", false, - true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/allOf/0/$ref", - "https://example.com/main", "/$defs/embedded/allOf/0/$ref", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/allOf/0/$ref", - "/$defs/embedded/allOf/0", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/definitions", - "https://example.com/main", "/$defs/embedded/definitions", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/definitions", "/$defs/embedded", false, - true); - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com/main#/$defs/embedded/definitions/foo", - "https://example.com/main", "/$defs/embedded/definitions/foo", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/definitions/foo", "/$defs/embedded", - false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/definitions/foo/type", - "https://example.com/main", "/$defs/embedded/definitions/foo/type", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/embedded", "/definitions/foo/type", - "/$defs/embedded/definitions/foo", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 4); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "https://example.com/embedded", - "https://example.com/embedded", std::nullopt, - "embedded"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/embedded/$schema", - "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", - std::nullopt, - "http://json-schema.org/draft-07/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/embedded/allOf/0/$ref", - "https://example.com/embedded#/definitions/foo", - "https://example.com/embedded", "/definitions/foo", - "#/definitions/foo"); -} - -TEST(JSONSchema_frame, nested_schemas_sibling_ref_nested_2020_12_draft4) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/main", - "$ref": "embedded", - "$defs": { - "embedded": { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "embedded", - "$ref": "#/definitions/foo", - "definitions": { - "foo": { "type": "number" } - } - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 12); - - // Resources - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://example.com/main", "https://example.com/main", "", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/main", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/main#/$schema", - "https://example.com/main", "/$schema", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/main", - "/$schema", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/main#/$id", - "https://example.com/main", "/$id", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/main", - "/$id", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/main#/$ref", - "https://example.com/main", "/$ref", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/main", - "/$ref", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/main#/$defs", - "https://example.com/main", "/$defs", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/main", - "/$defs", "", false, false); - - // Note that in this case, we DO NOT consider this to be a resource, as we end - // up interpreting it as 2020-12, where `id` is not a valid keyword - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com/main#/$defs/embedded", - "https://example.com/main", "/$defs/embedded", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/main", "/$defs/embedded", "", false, true); - - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/$schema", - "https://example.com/main", "/$defs/embedded/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/main", "/$defs/embedded/$schema", "/$defs/embedded", - false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/id", - "https://example.com/main", "/$defs/embedded/id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/main", "/$defs/embedded/id", "/$defs/embedded", - false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/$ref", - "https://example.com/main", "/$defs/embedded/$ref", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/main", "/$defs/embedded/$ref", "/$defs/embedded", - false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/definitions", - "https://example.com/main", "/$defs/embedded/definitions", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/main", "/$defs/embedded/definitions", - "/$defs/embedded", false, true); - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com/main#/$defs/embedded/definitions/foo", - "https://example.com/main", "/$defs/embedded/definitions/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/main", "/$defs/embedded/definitions/foo", - "/$defs/embedded", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/main#/$defs/embedded/definitions/foo/type", - "https://example.com/main", "/$defs/embedded/definitions/foo/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/main", "/$defs/embedded/definitions/foo/type", - "/$defs/embedded/definitions/foo", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 4); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/$ref", "https://example.com/embedded", - "https://example.com/embedded", std::nullopt, - "embedded"); - EXPECT_STATIC_REFERENCE(frame, "/$defs/embedded/$schema", - "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", - std::nullopt, - "http://json-schema.org/draft-04/schema#"); - - // Note that this reference is interpreted from the root, as we end up trying - // to match `id` against 2020-12, which does not exist - EXPECT_STATIC_REFERENCE(frame, "/$defs/embedded/$ref", - "https://example.com/main#/definitions/foo", - "https://example.com/main", "/definitions/foo", - "#/definitions/foo"); -} - -TEST(JSONSchema_frame, no_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$anchor": "foo", - "type": "string" - }, - "bar": { - "$id": "https://example.com", - "$anchor": "bar" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 14); - - // Top level - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - // Foo - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$anchor", "/properties/foo/$anchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/type", "/properties/foo/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "#foo", "/properties/foo", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - // Bar - - EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "/properties/bar", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( - frame, "https://example.com#bar", "/properties/bar", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$id", "/properties/bar/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/bar", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "https://example.com#/$anchor", "/properties/bar/$anchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/bar", false, false); - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/bar", "/properties/bar", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/bar/$id", "/properties/bar/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/bar", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/bar/$anchor", "/properties/bar/$anchor", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/properties/bar", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_frame, no_id_with_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { "type": "string" } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema", - "https://www.sourcemeta.com/schema"); - - EXPECT_EQ(frame.locations().size(), 4); - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", "", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.sourcemeta.com/schema", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/schema#/$schema", - "https://www.sourcemeta.com/schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.sourcemeta.com/schema", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://www.sourcemeta.com/schema#/items", - "https://www.sourcemeta.com/schema", "/items", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.sourcemeta.com/schema", "/items", "", false, false); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.sourcemeta.com/schema#/items/type", - "https://www.sourcemeta.com/schema", "/items/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.sourcemeta.com/schema", "/items/type", "/items", false, - false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_frame, id_with_default_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": { - "type": "string" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, "", "https://other.com"); - - EXPECT_EQ(frame.locations().size(), 10); - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://example.com", "https://example.com", "", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com#/$id", "https://example.com", "/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com", "/$id", "", false, false); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com#/$schema", "https://example.com", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com#/additionalProperties", "https://example.com", - "/additionalProperties", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com", "/additionalProperties", "", - false, false); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com#/additionalProperties/type", - "https://example.com", "/additionalProperties/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com", "/additionalProperties/type", - "/additionalProperties", false, false); - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://other.com", "https://example.com", "", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://other.com#/$id", "https://example.com", "/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com", "/$id", "", false, false); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://other.com#/$schema", "https://example.com", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com", "/$schema", "", false, false); - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://other.com#/additionalProperties", "https://example.com", - "/additionalProperties", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com", "/additionalProperties", "", - false, false); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://other.com#/additionalProperties/type", - "https://example.com", "/additionalProperties/type", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com", "/additionalProperties/type", - "/additionalProperties", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_frame, cross_2020_12_to_2019_09_without_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - // Top level - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - // Subschema - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/schema", "/$defs/schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/schema/$schema", "/$defs/schema/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); -} - -TEST(JSONSchema_frame, cross_2020_12_to_draft7_without_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "schema": { - "$schema": "http://json-schema.org/draft-07/schema#" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - // Top level - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - // Note that `$schema` without an identifier is NOT allowed - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/schema", "/$defs/schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/schema/$schema", "/$defs/schema/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); -} - -TEST(JSONSchema_frame, cross_2020_12_to_draft6_without_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "schema": { - "$schema": "http://json-schema.org/draft-06/schema#" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - // Top level - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - // Note that `$schema` without an identifier is NOT allowed - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/schema", "/$defs/schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/schema/$schema", "/$defs/schema/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); -} - -TEST(JSONSchema_frame, cross_2020_12_to_draft4_without_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "schema": { - "$schema": "http://json-schema.org/draft-04/schema#" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - // Top level - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs", "/$defs", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, false); - - // Note that `$schema` without an identifier is NOT allowed - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/$defs/schema", "/$defs/schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, "", - false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$defs/schema/$schema", "/$defs/schema/$schema", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "/$defs/schema", false, true); -} - -TEST(JSONSchema_frame, cross_draft7_to_draft4_without_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "schema": { - "$schema": "http://json-schema.org/draft-04/schema#" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - // Top level - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions", "/definitions", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - - // Note that `$schema` without an identifier is NOT allowed - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/definitions/schema", "/definitions/schema", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/schema/$schema", "/definitions/schema/$schema", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/definitions/schema", false, true); -} - -TEST(JSONSchema_frame, cross_draft7_to_2020_12_without_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 5); - - // Top level - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions", "/definitions", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - - // Subschema - - // Note that `$schema` without an identifier is NOT allowed - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/definitions/schema", "/definitions/schema", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/schema/$schema", "/definitions/schema/$schema", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/definitions/schema", false, true); -} - -TEST(JSONSchema_frame, anchor_on_absolute_subid) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { - "$id": "https://www.example.org", - "items": { - "$anchor": "foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 12); - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://www.example.com", "https://www.example.com", "", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.example.com", "", std::nullopt, false, false); - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://www.example.org", "https://www.example.com", "/items", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.example.org", "", "", false, false); - EXPECT_FRAME_STATIC_ANCHOR(frame, "https://www.example.org#foo", - "https://www.example.com", "/items/items", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.org", - "/items", "/items", false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.example.com#/$id", "https://www.example.com", "/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.example.com", "/$id", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://www.example.com#/$schema", - "https://www.example.com", "/$schema", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/$schema", "", false, false); - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://www.example.com#/items", "https://www.example.com", - "/items", "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.org", "", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://www.example.com#/items/$id", - "https://www.example.com", "/items/$id", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.org", - "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_SUBSCHEMA(frame, "https://www.example.com#/items/items", - "https://www.example.com", "/items/items", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.org", - "/items", "/items", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, - "https://www.example.com#/items/items/$anchor", - "https://www.example.com", "/items/items/$anchor", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.org", - "/items/$anchor", "/items/items", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://www.example.org#/$id", - "https://www.example.com", "/items/$id", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.org", - "/$id", "/items", false, false); - EXPECT_FRAME_STATIC_SUBSCHEMA(frame, "https://www.example.org#/items", - "https://www.example.com", "/items/items", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.org", - "/items", "/items", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://www.example.org#/items/$anchor", - "https://www.example.com", "/items/items/$anchor", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.org", - "/items/$anchor", "/items/items", false, false); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_frame, uri_iterators) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { - "$id": "test", - "$anchor": "foo", - "type": "string" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - std::set uris; - for (const auto &entry : frame.locations()) { - uris.insert(entry.first.second); - } - - EXPECT_EQ(frame.locations().size(), 12); - EXPECT_EQ(uris.size(), 12); - - EXPECT_TRUE(uris.contains("https://www.sourcemeta.com/schema")); - EXPECT_TRUE(uris.contains("https://www.sourcemeta.com/test")); - EXPECT_TRUE(uris.contains("https://www.sourcemeta.com/test#foo")); - EXPECT_TRUE(uris.contains("https://www.sourcemeta.com/schema#/$id")); - EXPECT_TRUE(uris.contains("https://www.sourcemeta.com/schema#/$schema")); - EXPECT_TRUE(uris.contains("https://www.sourcemeta.com/schema#/items")); - EXPECT_TRUE(uris.contains("https://www.sourcemeta.com/schema#/items/$id")); - EXPECT_TRUE( - uris.contains("https://www.sourcemeta.com/schema#/items/$anchor")); - EXPECT_TRUE(uris.contains("https://www.sourcemeta.com/schema#/items/type")); - EXPECT_TRUE(uris.contains("https://www.sourcemeta.com/test#/$id")); - EXPECT_TRUE(uris.contains("https://www.sourcemeta.com/test#/$anchor")); - EXPECT_TRUE(uris.contains("https://www.sourcemeta.com/test#/type")); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_frame, no_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "type": "string" }, - "bar": { "type": "number" }, - "baz": { "type": "array" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_frame, refs_with_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "#" }, - "bar": { "$ref": "#/properties/baz" }, - "baz": { - "$anchor": "baz", - "type": "string" - }, - "qux": { - "$id": "test", - "$ref": "#" - }, - "anchor": { - "$ref": "#baz" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.references().size(), 5); - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/properties/foo/$ref", "https://www.sourcemeta.com/schema", - "https://www.sourcemeta.com/schema", std::nullopt, "#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/bar/$ref", - "https://www.sourcemeta.com/schema#/properties/baz", - "https://www.sourcemeta.com/schema", - "/properties/baz", "#/properties/baz"); - EXPECT_STATIC_REFERENCE(frame, "/properties/qux/$ref", - "https://www.sourcemeta.com/test", - "https://www.sourcemeta.com/test", std::nullopt, "#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/anchor/$ref", - "https://www.sourcemeta.com/schema#baz", - "https://www.sourcemeta.com/schema", "baz", "#baz"); -} - -TEST(JSONSchema_frame, refs_with_no_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "#" }, - "bar": { "$ref": "#/properties/baz" }, - "baz": { - "$anchor": "baz", - "type": "string" - }, - "qux": { - "$id": "https://www.example.com", - "$ref": "#" - }, - "anchor": { - "$ref": "#baz" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.references().size(), 5); - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", "", "", std::nullopt, - "#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/bar/$ref", "#/properties/baz", "", - "/properties/baz", "#/properties/baz"); - EXPECT_STATIC_REFERENCE(frame, "/properties/qux/$ref", - "https://www.example.com", "https://www.example.com", - std::nullopt, "#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/anchor/$ref", "#baz", "", "baz", - "#baz"); -} - -TEST(JSONSchema_frame, no_dynamic_ref_on_old_drafts) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { "$dynamicRef": "#" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); -} - -TEST(JSONSchema_frame, remote_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://www.example.com" }, - "bar": { "$ref": "https://www.example.com/test#foo" }, - "baz": { "$ref": "https://www.example.com/x/y#/foo/bar" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.references().size(), 4); - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", - "https://www.example.com", "https://www.example.com", - std::nullopt, "https://www.example.com"); - EXPECT_STATIC_REFERENCE(frame, "/properties/bar/$ref", - "https://www.example.com/test#foo", - "https://www.example.com/test", "foo", - "https://www.example.com/test#foo"); - EXPECT_STATIC_REFERENCE(frame, "/properties/baz/$ref", - "https://www.example.com/x/y#/foo/bar", - "https://www.example.com/x/y", "/foo/bar", - "https://www.example.com/x/y#/foo/bar"); -} - -TEST(JSONSchema_frame, standalone_with_external_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://www.example.com" }, - "bar": { "$ref": "#/properties/foo" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_FALSE(frame.standalone()); -} - -TEST(JSONSchema_frame, standalone_with_embedded_external_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "$ref": "https://www.example.com" }, - "bar": { "$ref": "#/properties/foo" } - }, - "$defs": { - "https://www.example.com": { - "$id": "https://www.example.com" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.standalone()); -} - -TEST(JSONSchema_frame, standalone_with_internal_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "type": "string" }, - "bar": { "$ref": "#/properties/foo" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.standalone()); -} - -TEST(JSONSchema_frame, standalone_without_refs) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "type": "string" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_TRUE(frame.standalone()); -} - -TEST(JSONSchema_frame, standalone_with_draft3_external_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com", - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "test": { "$ref": "https://www.sourcemeta.com/test-1" } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_FALSE(frame.standalone()); -} - -TEST(JSONSchema_frame, no_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "type": "string" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_frame, mode_references) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { - "$anchor": "helper", - "$ref": "#/$defs/helper" - }, - "$defs": { - "helper": true - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.mode(), sourcemeta::core::SchemaFrame::Mode::References); - - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://www.example.com", "https://www.example.com", "", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.example.com", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.example.com#/$id", "https://www.example.com", "/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.example.com", "/$id", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://www.example.com#/$schema", - "https://www.example.com", "/$schema", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/$schema", "", false, false); - - EXPECT_FRAME_STATIC_SUBSCHEMA(frame, "https://www.example.com#/items", - "https://www.example.com", "/items", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/items", "", false, false); - EXPECT_FRAME_STATIC_ANCHOR(frame, "https://www.example.com#helper", - "https://www.example.com", "/items", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/items", "", false, false); - - EXPECT_FRAME_STATIC_POINTER(frame, "https://www.example.com#/items/$anchor", - "https://www.example.com", "/items/$anchor", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/items/$anchor", "/items", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://www.example.com#/items/$ref", - "https://www.example.com", "/items/$ref", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/items/$ref", "/items", false, false); - - EXPECT_FRAME_STATIC_POINTER(frame, "https://www.example.com#/$defs", - "https://www.example.com", "/$defs", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/$defs", "", false, false); - EXPECT_FRAME_STATIC_SUBSCHEMA(frame, "https://www.example.com#/$defs/helper", - "https://www.example.com", "/$defs/helper", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/$defs/helper", "", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_STATIC_REFERENCE( - frame, "/items/$ref", "https://www.example.com#/$defs/helper", - "https://www.example.com", "/$defs/helper", "#/$defs/helper"); -} - -TEST(JSONSchema_frame, mode_locations) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { - "$anchor": "helper", - "$ref": "#/$defs/helper" - }, - "$defs": { - "helper": true - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.mode(), sourcemeta::core::SchemaFrame::Mode::Locations); - EXPECT_EQ(frame.locations().size(), 9); - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://www.example.com", "https://www.example.com", "", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.example.com", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_POINTER( - frame, "https://www.example.com#/$id", "https://www.example.com", "/$id", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://www.example.com", "/$id", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://www.example.com#/$schema", - "https://www.example.com", "/$schema", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/$schema", "", false, false); - - EXPECT_FRAME_STATIC_SUBSCHEMA(frame, "https://www.example.com#/items", - "https://www.example.com", "/items", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/items", "", false, false); - EXPECT_FRAME_STATIC_ANCHOR(frame, "https://www.example.com#helper", - "https://www.example.com", "/items", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/items", "", false, false); - - EXPECT_FRAME_STATIC_POINTER(frame, "https://www.example.com#/items/$anchor", - "https://www.example.com", "/items/$anchor", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/items/$anchor", "/items", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://www.example.com#/items/$ref", - "https://www.example.com", "/items/$ref", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/items/$ref", "/items", false, false); - - EXPECT_FRAME_STATIC_POINTER(frame, "https://www.example.com#/$defs", - "https://www.example.com", "/$defs", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/$defs", "", false, false); - EXPECT_FRAME_STATIC_SUBSCHEMA(frame, "https://www.example.com#/$defs/helper", - "https://www.example.com", "/$defs/helper", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://www.example.com", - "/$defs/helper", "", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 0); -} - -TEST(JSONSchema_frame, has_references_to_2020_12) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$id": "foo", - "$dynamicAnchor": "test" - }, - "bar": { - "$id": "bar", - "$dynamicAnchor": "test" - }, - "baz": { - "$id": "baz", - "$anchor": "test" - } - }, - "$defs": { - "bookending": { - "$dynamicAnchor": "test" - }, - "static": { - "$ref": "#test" - }, - "dynamic": { - "$dynamicRef": "#test" - }, - "dynamic-non-anchor": { - "$dynamicRef": "baz" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - const sourcemeta::core::Pointer properties_foo{"properties", "foo"}; - const sourcemeta::core::Pointer properties_bar{"properties", "bar"}; - const sourcemeta::core::Pointer properties_baz{"properties", "baz"}; - const sourcemeta::core::Pointer defs_bookending{"$defs", "bookending"}; - const sourcemeta::core::Pointer defs_static{"$defs", "static"}; - const sourcemeta::core::Pointer defs_dynamic{"$defs", "dynamic"}; - const sourcemeta::core::Pointer defs_dynamic_non_anchor{"$defs", - "dynamic-non-anchor"}; - - EXPECT_TRUE(frame.has_references_to( - sourcemeta::core::to_weak_pointer(properties_foo))); - EXPECT_TRUE(frame.has_references_to( - sourcemeta::core::to_weak_pointer(properties_bar))); - EXPECT_TRUE(frame.has_references_to( - sourcemeta::core::to_weak_pointer(properties_baz))); - EXPECT_TRUE(frame.has_references_to( - sourcemeta::core::to_weak_pointer(defs_bookending))); - EXPECT_FALSE( - frame.has_references_to(sourcemeta::core::to_weak_pointer(defs_static))); - EXPECT_FALSE( - frame.has_references_to(sourcemeta::core::to_weak_pointer(defs_dynamic))); - EXPECT_FALSE(frame.has_references_to( - sourcemeta::core::to_weak_pointer(defs_dynamic_non_anchor))); -} - -TEST(JSONSchema_frame, has_references_to_2019_09) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "properties": { - "foo": { - "$id": "foo", - "$recursiveAnchor": true - }, - "bar": { - "$id": "bar", - "$recursiveAnchor": true - }, - "baz": { - "$id": "baz", - "$anchor": "test" - }, - "qux": { - "$id": "qux", - "$recursiveAnchor": false - } - }, - "$defs": { - "bookending": { - "$recursiveAnchor": true - }, - "static": { - "$ref": "#test" - }, - "dynamic": { - "$recursiveRef": "#" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - const sourcemeta::core::Pointer properties_foo{"properties", "foo"}; - const sourcemeta::core::Pointer properties_bar{"properties", "bar"}; - const sourcemeta::core::Pointer properties_baz{"properties", "baz"}; - const sourcemeta::core::Pointer properties_qux{"properties", "qux"}; - const sourcemeta::core::Pointer defs_bookending{"$defs", "bookending"}; - - EXPECT_TRUE(frame.has_references_to( - sourcemeta::core::to_weak_pointer(properties_foo))); - EXPECT_TRUE(frame.has_references_to( - sourcemeta::core::to_weak_pointer(properties_bar))); - EXPECT_FALSE(frame.has_references_to( - sourcemeta::core::to_weak_pointer(properties_baz))); - EXPECT_FALSE(frame.has_references_to( - sourcemeta::core::to_weak_pointer(properties_qux))); - EXPECT_TRUE(frame.has_references_to( - sourcemeta::core::to_weak_pointer(defs_bookending))); -} - -TEST(JSONSchema_frame, has_references_through) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "type": "string" - } - }, - "$defs": { - "test": { - "$ref": "#/properties/foo" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - const sourcemeta::core::Pointer properties_foo{"properties", "foo"}; - const sourcemeta::core::Pointer properties{"properties"}; - const sourcemeta::core::Pointer defs{"$defs"}; - - EXPECT_TRUE(frame.has_references_to( - sourcemeta::core::to_weak_pointer(properties_foo))); - EXPECT_TRUE(frame.has_references_through( - sourcemeta::core::to_weak_pointer(properties_foo))); - EXPECT_TRUE(frame.has_references_through( - sourcemeta::core::to_weak_pointer(properties))); - EXPECT_FALSE( - frame.has_references_to(sourcemeta::core::to_weak_pointer(properties))); - EXPECT_FALSE( - frame.has_references_to(sourcemeta::core::to_weak_pointer(defs))); - EXPECT_FALSE( - frame.has_references_through(sourcemeta::core::to_weak_pointer(defs))); -} - -TEST(JSONSchema_frame, has_references_through_without_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "contentSchema": true, - "items": { - "$ref": "#/contentSchema" - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - const sourcemeta::core::Pointer content_schema{"contentSchema"}; - - EXPECT_TRUE(frame.has_references_to( - sourcemeta::core::to_weak_pointer(content_schema))); - EXPECT_TRUE(frame.has_references_through( - sourcemeta::core::to_weak_pointer(content_schema))); -} - -TEST(JSONSchema_frame, to_json_empty) { - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - const auto result{frame.to_json()}; - const auto expected = sourcemeta::core::parse_json(R"JSON({ - "locations": { - "static": {}, - "dynamic": {} - }, - "references": [] - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_frame, to_json_mode_references) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/test", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$ref": "bar" - }, - "bar": { - "id": "bar", - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - const auto result{frame.to_json()}; - - const auto expected = sourcemeta::core::parse_json(R"JSON({ - "locations": { - "static": { - "https://www.sourcemeta.com/bar": { - "parent": "", - "type": "resource", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar", - "position": null, - "relativePointer": "", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/bar#/$schema": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/$schema", - "position": null, - "relativePointer": "/$schema", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/bar#/id": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/id", - "position": null, - "relativePointer": "/id", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/bar#/type": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/type", - "position": null, - "relativePointer": "/type", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test": { - "parent": null, - "type": "resource", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "", - "position": null, - "relativePointer": "", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/$id": { - "parent": "", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/$id", - "position": null, - "relativePointer": "/$id", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/$schema": { - "parent": "", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/$schema", - "position": null, - "relativePointer": "/$schema", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties": { - "parent": "", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/properties", - "position": null, - "relativePointer": "/properties", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar": { - "parent": "", - "type": "subschema", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar", - "position": null, - "relativePointer": "", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar/$schema": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/$schema", - "position": null, - "relativePointer": "/$schema", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar/id": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/id", - "position": null, - "relativePointer": "/id", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar/type": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/type", - "position": null, - "relativePointer": "/type", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/foo": { - "parent": "", - "type": "subschema", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/properties/foo", - "position": null, - "relativePointer": "/properties/foo", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/foo/$ref": { - "parent": "/properties/foo", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/properties/foo/$ref", - "position": null, - "relativePointer": "/properties/foo/$ref", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - } - }, - "dynamic": {} - }, - "references": [ - { - "type": "static", - "origin": "/$schema", - "position": null, - "destination": "https://json-schema.org/draft/2020-12/schema", - "base": "https://json-schema.org/draft/2020-12/schema", - "fragment": null - }, - { - "type": "static", - "origin": "/properties/bar/$schema", - "position": null, - "destination": "http://json-schema.org/draft-04/schema", - "base": "http://json-schema.org/draft-04/schema", - "fragment": null - }, - { - "type": "static", - "origin": "/properties/foo/$ref", - "position": null, - "destination": "https://www.sourcemeta.com/bar", - "base": "https://www.sourcemeta.com/bar", - "fragment": null - } - ] - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_frame, to_json_mode_locations) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/test", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$ref": "bar" - }, - "bar": { - "id": "bar", - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - const auto result{frame.to_json()}; - - const auto expected = sourcemeta::core::parse_json(R"JSON({ - "locations": { - "static": { - "https://www.sourcemeta.com/bar": { - "parent": "", - "type": "resource", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar", - "position": null, - "relativePointer": "", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/bar#/$schema": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/$schema", - "position": null, - "relativePointer": "/$schema", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/bar#/id": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/id", - "position": null, - "relativePointer": "/id", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/bar#/type": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/type", - "position": null, - "relativePointer": "/type", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test": { - "parent": null, - "type": "resource", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "", - "position": null, - "relativePointer": "", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/$id": { - "parent": "", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/$id", - "position": null, - "relativePointer": "/$id", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/$schema": { - "parent": "", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/$schema", - "position": null, - "relativePointer": "/$schema", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties": { - "parent": "", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/properties", - "position": null, - "relativePointer": "/properties", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar": { - "parent": "", - "type": "subschema", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar", - "position": null, - "relativePointer": "", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar/$schema": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/$schema", - "position": null, - "relativePointer": "/$schema", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar/id": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/id", - "position": null, - "relativePointer": "/id", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar/type": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/type", - "position": null, - "relativePointer": "/type", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/foo": { - "parent": "", - "type": "subschema", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/properties/foo", - "position": null, - "relativePointer": "/properties/foo", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/foo/$ref": { - "parent": "/properties/foo", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/properties/foo/$ref", - "position": null, - "relativePointer": "/properties/foo/$ref", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - } - }, - "dynamic": {} - }, - "references": [] - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_frame, to_json_mode_references_with_tracking) { - sourcemeta::core::PointerPositionTracker tracker; - sourcemeta::core::JSON document{nullptr}; - sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/test", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$ref": "bar" - }, - "bar": { - "id": "bar", - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "string" - } - } - })JSON", - document, std::ref(tracker)); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - const auto result{frame.to_json(tracker)}; - - const auto expected = sourcemeta::core::parse_json(R"JSON({ - "locations": { - "static": { - "https://www.sourcemeta.com/bar": { - "parent": "", - "type": "resource", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar", - "position": [ 8, 7, 12, 7 ], - "relativePointer": "", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/bar#/$schema": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/$schema", - "position": [ 10, 9, 10, 60 ], - "relativePointer": "/$schema", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/bar#/id": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/id", - "position": [ 9, 9, 9, 19 ], - "relativePointer": "/id", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/bar#/type": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/type", - "position": [ 11, 9, 11, 24 ], - "relativePointer": "/type", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test": { - "parent": null, - "type": "resource", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "", - "position": [ 1, 1, 14, 3 ], - "relativePointer": "", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/$id": { - "parent": "", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/$id", - "position": [ 2, 5, 2, 44 ], - "relativePointer": "/$id", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/$schema": { - "parent": "", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/$schema", - "position": [ 3, 5, 3, 61 ], - "relativePointer": "/$schema", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties": { - "parent": "", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/properties", - "position": [ 4, 5, 13, 5 ], - "relativePointer": "/properties", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar": { - "parent": "", - "type": "subschema", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar", - "position": [ 8, 7, 12, 7 ], - "relativePointer": "", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar/$schema": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/$schema", - "position": [ 10, 9, 10, 60 ], - "relativePointer": "/$schema", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar/id": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/id", - "position": [ 9, 9, 9, 19 ], - "relativePointer": "/id", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar/type": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/type", - "position": [ 11, 9, 11, 24 ], - "relativePointer": "/type", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/foo": { - "parent": "", - "type": "subschema", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/properties/foo", - "position": [ 5, 7, 7, 7 ], - "relativePointer": "/properties/foo", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/foo/$ref": { - "parent": "/properties/foo", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/properties/foo/$ref", - "position": [ 6, 9, 6, 21 ], - "relativePointer": "/properties/foo/$ref", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - } - }, - "dynamic": {} - }, - "references": [ - { - "type": "static", - "origin": "/$schema", - "position": [ 3, 5, 3, 61 ], - "destination": "https://json-schema.org/draft/2020-12/schema", - "base": "https://json-schema.org/draft/2020-12/schema", - "fragment": null - }, - { - "type": "static", - "origin": "/properties/bar/$schema", - "position": [ 10, 9, 10, 60 ], - "destination": "http://json-schema.org/draft-04/schema", - "base": "http://json-schema.org/draft-04/schema", - "fragment": null - }, - { - "type": "static", - "origin": "/properties/foo/$ref", - "position": [ 6, 9, 6, 21 ], - "destination": "https://www.sourcemeta.com/bar", - "base": "https://www.sourcemeta.com/bar", - "fragment": null - } - ] - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_frame, to_json_mode_references_with_tracking_empty) { - sourcemeta::core::PointerPositionTracker tracker; - - // Note we purposely don't pass the tracker to the document - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.sourcemeta.com/test", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "$ref": "bar" - }, - "bar": { - "id": "bar", - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "string" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - const auto result{frame.to_json(tracker)}; - - const auto expected = sourcemeta::core::parse_json(R"JSON({ - "locations": { - "static": { - "https://www.sourcemeta.com/bar": { - "parent": "", - "type": "resource", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar", - "position": null, - "relativePointer": "", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/bar#/$schema": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/$schema", - "position": null, - "relativePointer": "/$schema", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/bar#/id": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/id", - "position": null, - "relativePointer": "/id", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/bar#/type": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/type", - "position": null, - "relativePointer": "/type", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test": { - "parent": null, - "type": "resource", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "", - "position": null, - "relativePointer": "", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/$id": { - "parent": "", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/$id", - "position": null, - "relativePointer": "/$id", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/$schema": { - "parent": "", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/$schema", - "position": null, - "relativePointer": "/$schema", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties": { - "parent": "", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/properties", - "position": null, - "relativePointer": "/properties", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar": { - "parent": "", - "type": "subschema", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar", - "position": null, - "relativePointer": "", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar/$schema": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/$schema", - "position": null, - "relativePointer": "/$schema", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar/id": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/id", - "position": null, - "relativePointer": "/id", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/bar/type": { - "parent": "/properties/bar", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/bar", - "pointer": "/properties/bar/type", - "position": null, - "relativePointer": "/type", - "dialect": "http://json-schema.org/draft-04/schema#", - "baseDialect": "http://json-schema.org/draft-04/schema#", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/foo": { - "parent": "", - "type": "subschema", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/properties/foo", - "position": null, - "relativePointer": "/properties/foo", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - }, - "https://www.sourcemeta.com/test#/properties/foo/$ref": { - "parent": "/properties/foo", - "type": "pointer", - "root": "https://www.sourcemeta.com/test", - "base": "https://www.sourcemeta.com/test", - "pointer": "/properties/foo/$ref", - "position": null, - "relativePointer": "/properties/foo/$ref", - "dialect": "https://json-schema.org/draft/2020-12/schema", - "baseDialect": "https://json-schema.org/draft/2020-12/schema", - "propertyName": false, - "orphan": false - } - }, - "dynamic": {} - }, - "references": [ - { - "type": "static", - "origin": "/$schema", - "position": null, - "destination": "https://json-schema.org/draft/2020-12/schema", - "base": "https://json-schema.org/draft/2020-12/schema", - "fragment": null - }, - { - "type": "static", - "origin": "/properties/bar/$schema", - "position": null, - "destination": "http://json-schema.org/draft-04/schema", - "base": "http://json-schema.org/draft-04/schema", - "fragment": null - }, - { - "type": "static", - "origin": "/properties/foo/$ref", - "position": null, - "destination": "https://www.sourcemeta.com/bar", - "base": "https://www.sourcemeta.com/bar", - "fragment": null - } - ] - })JSON"); - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_frame, invalid_schema_not_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": 123 - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$schema"); - EXPECT_EQ(error.value(), "123"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame, invalid_schema_not_uri) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "not a valid uri" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - - try { - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - FAIL(); - } catch (const sourcemeta::core::SchemaKeywordError &error) { - EXPECT_EQ(error.keyword(), "$schema"); - EXPECT_EQ(error.value(), "not a valid uri"); - } catch (...) { - FAIL(); - } -} - -TEST(JSONSchema_frame, override_induces_resource_boundary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://example.com/parent", - "definitions": { - "child": { - "$id": "http://example.com/child", - "x-sourcemeta-dialect-override-subschema": - "http://json-schema.org/draft-06/schema#" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 10); - - // Resources - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "http://example.com/parent", "http://example.com/parent", "", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "http://example.com/parent", "", std::nullopt, false, false); - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "http://example.com/child", "http://example.com/parent", - "/definitions/child", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "http://example.com/child", "", "", false, true); - - // JSON Pointers - - EXPECT_FRAME_STATIC_POINTER( - frame, "http://example.com/parent#/id", "http://example.com/parent", - "/id", "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "http://example.com/parent", "/id", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "http://example.com/parent#/$schema", - "http://example.com/parent", "/$schema", - "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "http://example.com/parent", - "/$schema", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "http://example.com/parent#/definitions", - "http://example.com/parent", "/definitions", - "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "http://example.com/parent", - "/definitions", "", false, false); - EXPECT_FRAME_STATIC_POINTER( - frame, "http://example.com/parent#/definitions/child/$id", - "http://example.com/parent", "/definitions/child/$id", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "http://example.com/child", "/$id", "/definitions/child", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, - "http://example.com/parent#/definitions/child/" - "x-sourcemeta-dialect-override-subschema", - "http://example.com/parent", - "/definitions/child/x-sourcemeta-dialect-override-subschema", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "http://example.com/child", "/x-sourcemeta-dialect-override-subschema", - "/definitions/child", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "http://example.com/child#/$id", "http://example.com/parent", - "/definitions/child/$id", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "http://example.com/child", "/$id", - "/definitions/child", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, - "http://example.com/child#/x-sourcemeta-dialect-override-subschema", - "http://example.com/parent", - "/definitions/child/x-sourcemeta-dialect-override-subschema", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "http://example.com/child", "/x-sourcemeta-dialect-override-subschema", - "/definitions/child", false, true); - - // Subschemas - - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "http://example.com/parent#/definitions/child", - "http://example.com/parent", "/definitions/child", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "http://example.com/child", "", "", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); -} - -TEST(JSONSchema_frame, override_destroys_resource_boundary_id_discarded) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com/parent", - "$defs": { - "child": { - "$id": "https://example.com/child", - "x-sourcemeta-dialect-override-subschema": - "http://json-schema.org/draft-04/schema#" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 7); - - // Resources - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://example.com/parent", "https://example.com/parent", "", - "https://json-schema.org/draft/2020-12/schema", JSON_Schema_2020_12, - "https://example.com/parent", "", std::nullopt, false, false); - - // JSON Pointers - - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/parent#/$id", - "https://example.com/parent", "/$id", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/parent", - "/$id", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/parent#/$schema", - "https://example.com/parent", "/$schema", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/parent", - "/$schema", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/parent#/$defs", - "https://example.com/parent", "/$defs", - "https://json-schema.org/draft/2020-12/schema", - JSON_Schema_2020_12, "https://example.com/parent", - "/$defs", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, - "https://example.com/parent#/$defs/child/$id", - "https://example.com/parent", "/$defs/child/$id", - "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "https://example.com/parent", - "/$defs/child/$id", "/$defs/child", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, - "https://example.com/parent#/$defs/child/" - "x-sourcemeta-dialect-override-subschema", - "https://example.com/parent", - "/$defs/child/x-sourcemeta-dialect-override-subschema", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://example.com/parent", - "/$defs/child/x-sourcemeta-dialect-override-subschema", "/$defs/child", - false, true); - - // Subschemas - - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com/parent#/$defs/child", - "https://example.com/parent", "/$defs/child", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "https://example.com/parent", "/$defs/child", "", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2020-12/schema", - "https://json-schema.org/draft/2020-12/schema", std::nullopt, - "https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_frame, override_unresolvable_throws) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "x-sourcemeta-dialect-override-subschema": - "https://example.com/does-not-exist" - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_frame, override_inert_under_draft7_ref_siblings) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "bar": { "type": "string" } - }, - "properties": { - "foo": { - "$ref": "#/definitions/bar", - "x-sourcemeta-dialect-override-subschema": - "https://example.com/does-not-exist" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 9); - - // JSON Pointers - - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/$schema", "/$schema", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions", "/definitions", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/definitions/bar/type", "/definitions/bar/type", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/definitions/bar", false, true); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties", "/properties", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/$ref", "/properties/foo/$ref", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/properties/foo", false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( - frame, "#/properties/foo/x-sourcemeta-dialect-override-subschema", - "/properties/foo/x-sourcemeta-dialect-override-subschema", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "/properties/foo", false, false); - - // Subschemas - - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "", "", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, std::nullopt, false, false); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/definitions/bar", "/definitions/bar", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - true); - EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( - frame, "#/properties/foo", "/properties/foo", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, "", false, - false); - - // References - - EXPECT_EQ(frame.references().size(), 2); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-07/schema", - "http://json-schema.org/draft-07/schema", std::nullopt, - "http://json-schema.org/draft-07/schema#"); - EXPECT_STATIC_REFERENCE(frame, "/properties/foo/$ref", "#/definitions/bar", - "", "/definitions/bar", "#/definitions/bar"); -} - -TEST(JSONSchema_frame, override_surfaces_after_2019_09_upgrade) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "bar": { "type": "string" } - }, - "properties": { - "foo": { - "$ref": "#/$defs/bar", - "x-sourcemeta-dialect-override-subschema": - "https://example.com/does-not-exist" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::Locations}; - EXPECT_THROW(frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_frame, override_picks_dollarid_under_draft6) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://example.com/parent", - "definitions": { - "child": { - "id": "http://example.com/via-id", - "$id": "http://example.com/via-dollarid", - "x-sourcemeta-dialect-override-subschema": - "http://json-schema.org/draft-06/schema#" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 12); - - // Resources - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "http://example.com/parent", "http://example.com/parent", "", - "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "http://example.com/parent", "", std::nullopt, false, false); - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "http://example.com/via-dollarid", "http://example.com/parent", - "/definitions/child", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "http://example.com/via-dollarid", "", "", false, - true); - - // JSON Pointers - - EXPECT_FRAME_STATIC_POINTER( - frame, "http://example.com/parent#/id", "http://example.com/parent", - "/id", "http://json-schema.org/draft-04/schema#", JSON_Schema_Draft_4, - "http://example.com/parent", "/id", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "http://example.com/parent#/$schema", - "http://example.com/parent", "/$schema", - "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "http://example.com/parent", - "/$schema", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "http://example.com/parent#/definitions", - "http://example.com/parent", "/definitions", - "http://json-schema.org/draft-04/schema#", - JSON_Schema_Draft_4, "http://example.com/parent", - "/definitions", "", false, false); - EXPECT_FRAME_STATIC_POINTER( - frame, "http://example.com/parent#/definitions/child/id", - "http://example.com/parent", "/definitions/child/id", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "http://example.com/via-dollarid", "/id", "/definitions/child", false, - true); - EXPECT_FRAME_STATIC_POINTER( - frame, "http://example.com/parent#/definitions/child/$id", - "http://example.com/parent", "/definitions/child/$id", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "http://example.com/via-dollarid", "/$id", "/definitions/child", false, - true); - EXPECT_FRAME_STATIC_POINTER( - frame, - "http://example.com/parent#/definitions/child/" - "x-sourcemeta-dialect-override-subschema", - "http://example.com/parent", - "/definitions/child/x-sourcemeta-dialect-override-subschema", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "http://example.com/via-dollarid", - "/x-sourcemeta-dialect-override-subschema", "/definitions/child", false, - true); - EXPECT_FRAME_STATIC_POINTER( - frame, "http://example.com/via-dollarid#/id", "http://example.com/parent", - "/definitions/child/id", "http://json-schema.org/draft-06/schema#", - JSON_Schema_Draft_6, "http://example.com/via-dollarid", "/id", - "/definitions/child", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "http://example.com/via-dollarid#/$id", - "http://example.com/parent", "/definitions/child/$id", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "http://example.com/via-dollarid", "/$id", "/definitions/child", false, - true); - EXPECT_FRAME_STATIC_POINTER( - frame, - "http://example.com/via-dollarid#/" - "x-sourcemeta-dialect-override-subschema", - "http://example.com/parent", - "/definitions/child/x-sourcemeta-dialect-override-subschema", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "http://example.com/via-dollarid", - "/x-sourcemeta-dialect-override-subschema", "/definitions/child", false, - true); - - // Subschemas - - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "http://example.com/parent#/definitions/child", - "http://example.com/parent", "/definitions/child", - "http://json-schema.org/draft-06/schema#", JSON_Schema_Draft_6, - "http://example.com/via-dollarid", "", "", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "http://json-schema.org/draft-04/schema", - "http://json-schema.org/draft-04/schema", std::nullopt, - "http://json-schema.org/draft-04/schema#"); -} - -TEST(JSONSchema_frame, override_hides_anchor_under_draft7) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com/parent", - "$defs": { - "child": { - "$id": "https://example.com/child", - "$anchor": "x", - "x-sourcemeta-dialect-override-subschema": - "http://json-schema.org/draft-07/schema#" - } - } - })JSON"); - - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver); - - EXPECT_EQ(frame.locations().size(), 12); - - EXPECT_FALSE( - frame.locations().contains({sourcemeta::core::SchemaReferenceType::Static, - "https://example.com/child#x"})); - - // Resources - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://example.com/parent", "https://example.com/parent", "", - "https://json-schema.org/draft/2019-09/schema", JSON_Schema_2019_09, - "https://example.com/parent", "", std::nullopt, false, false); - - EXPECT_FRAME_STATIC_RESOURCE( - frame, "https://example.com/child", "https://example.com/parent", - "/$defs/child", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "https://example.com/child", "", "", false, true); - - // JSON Pointers - - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/parent#/$schema", - "https://example.com/parent", "/$schema", - "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, "https://example.com/parent", - "/$schema", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/parent#/$id", - "https://example.com/parent", "/$id", - "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, "https://example.com/parent", - "/$id", "", false, false); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/parent#/$defs", - "https://example.com/parent", "/$defs", - "https://json-schema.org/draft/2019-09/schema", - JSON_Schema_2019_09, "https://example.com/parent", - "/$defs", "", false, false); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/parent#/$defs/child/$id", - "https://example.com/parent", "/$defs/child/$id", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/child", "/$id", "/$defs/child", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/parent#/$defs/child/$anchor", - "https://example.com/parent", "/$defs/child/$anchor", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/child", "/$anchor", "/$defs/child", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, - "https://example.com/parent#/$defs/child/" - "x-sourcemeta-dialect-override-subschema", - "https://example.com/parent", - "/$defs/child/x-sourcemeta-dialect-override-subschema", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/child", "/x-sourcemeta-dialect-override-subschema", - "/$defs/child", false, true); - EXPECT_FRAME_STATIC_POINTER(frame, "https://example.com/child#/$id", - "https://example.com/parent", "/$defs/child/$id", - "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "https://example.com/child", - "/$id", "/$defs/child", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, "https://example.com/child#/$anchor", "https://example.com/parent", - "/$defs/child/$anchor", "http://json-schema.org/draft-07/schema#", - JSON_Schema_Draft_7, "https://example.com/child", "/$anchor", - "/$defs/child", false, true); - EXPECT_FRAME_STATIC_POINTER( - frame, - "https://example.com/child#/x-sourcemeta-dialect-override-subschema", - "https://example.com/parent", - "/$defs/child/x-sourcemeta-dialect-override-subschema", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/child", "/x-sourcemeta-dialect-override-subschema", - "/$defs/child", false, true); - - // Subschemas - - EXPECT_FRAME_STATIC_SUBSCHEMA( - frame, "https://example.com/parent#/$defs/child", - "https://example.com/parent", "/$defs/child", - "http://json-schema.org/draft-07/schema#", JSON_Schema_Draft_7, - "https://example.com/child", "", "", false, true); - - // References - - EXPECT_EQ(frame.references().size(), 1); - - EXPECT_STATIC_REFERENCE( - frame, "/$schema", "https://json-schema.org/draft/2019-09/schema", - "https://json-schema.org/draft/2019-09/schema", std::nullopt, - "https://json-schema.org/draft/2019-09/schema"); -} diff --git a/test/jsonschema/jsonschema_identify_2019_09_test.cc b/test/jsonschema/jsonschema_identify_2019_09_test.cc deleted file mode 100644 index 0bd8aa195..000000000 --- a/test/jsonschema/jsonschema_identify_2019_09_test.cc +++ /dev/null @@ -1,286 +0,0 @@ -#include - -#include -#include - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/metaschema") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/metaschema", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_identify_2019_09, valid_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_2019_09, old_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2019_09, id_boolean_default_dialect) { - const sourcemeta::core::JSON document{true}; - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2019-09/schema")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2019_09, empty_object_default_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2019-09/schema")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2019_09, valid_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_2019_09, old_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2019_09, default_dialect_precedence) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-04/schema#")}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_2019_09, base_dialect_shortcut) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_2019_09, anonymize_with_base_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2019_09, anonymize_with_base_dialect_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2019_09, sibling_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "#" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_2019_09, reidentify_replace) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2019_09, reidentify_set) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2019_09, reidentify_replace_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2019-09/schema"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2019_09, reidentify_replace_base_dialect_shortcut) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2019_09, reidentify_set_with_top_level_ref) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "https://example.com/schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "https://example.com/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2019_09, id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "#", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2019_09, id_empty_fragment_only_with_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "#", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - const auto id{sourcemeta::core::identify(document, - sourcemeta::core::schema_resolver, - "", "https://example.com/fallback")}; - EXPECT_EQ(id, "https://example.com/fallback"); -} - -TEST(JSONSchema_identify_2019_09, id_empty_fragment_only_base_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "#", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2019_09, id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2019_09, id_empty_string_with_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - const auto id{sourcemeta::core::identify(document, - sourcemeta::core::schema_resolver, - "", "https://example.com/fallback")}; - EXPECT_EQ(id, "https://example.com/fallback"); -} - -TEST(JSONSchema_identify_2019_09, id_empty_string_base_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09)}; - EXPECT_TRUE(id.empty()); -} diff --git a/test/jsonschema/jsonschema_identify_2020_12_test.cc b/test/jsonschema/jsonschema_identify_2020_12_test.cc deleted file mode 100644 index e4294fd1c..000000000 --- a/test/jsonschema/jsonschema_identify_2020_12_test.cc +++ /dev/null @@ -1,286 +0,0 @@ -#include - -#include -#include - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/metaschema") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/metaschema", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_identify_2020_12, valid_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_2020_12, old_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2020_12, id_boolean_default_dialect) { - const sourcemeta::core::JSON document{true}; - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2020_12, empty_object_default_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2020_12, valid_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_2020_12, old_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2020_12, default_dialect_precedence) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-04/schema#")}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_2020_12, base_dialect_shortcut) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_2020_12, anonymize_with_base_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2020_12, anonymize_with_base_dialect_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2020_12, sibling_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "#" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_2020_12, reidentify_replace) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2020_12, reidentify_set) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2020_12, reidentify_replace_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2020_12, reidentify_replace_base_dialect_shortcut) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2020_12, reidentify_set_with_top_level_ref) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://example.com/schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://example.com/schema" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_2020_12, id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "#", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2020_12, id_empty_fragment_only_with_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "#", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto id{sourcemeta::core::identify(document, - sourcemeta::core::schema_resolver, - "", "https://example.com/fallback")}; - EXPECT_EQ(id, "https://example.com/fallback"); -} - -TEST(JSONSchema_identify_2020_12, id_empty_fragment_only_base_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "#", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2020_12, id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_2020_12, id_empty_string_with_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto id{sourcemeta::core::identify(document, - sourcemeta::core::schema_resolver, - "", "https://example.com/fallback")}; - EXPECT_EQ(id, "https://example.com/fallback"); -} - -TEST(JSONSchema_identify_2020_12, id_empty_string_base_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12)}; - EXPECT_TRUE(id.empty()); -} diff --git a/test/jsonschema/jsonschema_identify_draft0_test.cc b/test/jsonschema/jsonschema_identify_draft0_test.cc deleted file mode 100644 index 12f1f654d..000000000 --- a/test/jsonschema/jsonschema_identify_draft0_test.cc +++ /dev/null @@ -1,207 +0,0 @@ -#include - -#include -#include - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/metaschema") { - return sourcemeta::core::parse_json(R"JSON({ - "id": "https://sourcemeta.com/metaschema", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_identify_draft0, valid_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft0, new_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft0, id_boolean_default_dialect) { - const sourcemeta::core::JSON document{true}; - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-00/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft0, empty_object_default_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-00/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft0, valid_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft0, new_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft0, default_dialect_precedence) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft0, base_dialect_shortcut) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - const auto id{sourcemeta::core::identify( - document, - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_0_Hyper)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft0, anonymize_with_base_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft0, anonymize_with_base_dialect_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft0, sibling_unknown_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-00/schema#", - "$ref": "#" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft0, reidentify_replace) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft0, reidentify_set) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft0, reidentify_replace_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-00/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft0, reidentify_replace_base_dialect_shortcut) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} diff --git a/test/jsonschema/jsonschema_identify_draft1_test.cc b/test/jsonschema/jsonschema_identify_draft1_test.cc deleted file mode 100644 index efc8705b4..000000000 --- a/test/jsonschema/jsonschema_identify_draft1_test.cc +++ /dev/null @@ -1,207 +0,0 @@ -#include - -#include -#include - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/metaschema") { - return sourcemeta::core::parse_json(R"JSON({ - "id": "https://sourcemeta.com/metaschema", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_identify_draft1, valid_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft1, new_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft1, id_boolean_default_dialect) { - const sourcemeta::core::JSON document{true}; - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-01/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft1, empty_object_default_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-01/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft1, valid_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft1, new_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft1, default_dialect_precedence) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft1, base_dialect_shortcut) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - const auto id{sourcemeta::core::identify( - document, - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_1_Hyper)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft1, anonymize_with_base_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft1, anonymize_with_base_dialect_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft1, sibling_unknown_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-01/schema#", - "$ref": "#" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft1, reidentify_replace) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft1, reidentify_set) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft1, reidentify_replace_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-01/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft1, reidentify_replace_base_dialect_shortcut) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} diff --git a/test/jsonschema/jsonschema_identify_draft2_test.cc b/test/jsonschema/jsonschema_identify_draft2_test.cc deleted file mode 100644 index 237f0c025..000000000 --- a/test/jsonschema/jsonschema_identify_draft2_test.cc +++ /dev/null @@ -1,207 +0,0 @@ -#include - -#include -#include - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/metaschema") { - return sourcemeta::core::parse_json(R"JSON({ - "id": "https://sourcemeta.com/metaschema", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_identify_draft2, valid_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft2, new_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft2, id_boolean_default_dialect) { - const sourcemeta::core::JSON document{true}; - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-02/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft2, empty_object_default_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-02/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft2, valid_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft2, new_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft2, default_dialect_precedence) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft2, base_dialect_shortcut) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - const auto id{sourcemeta::core::identify( - document, - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_2_Hyper)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft2, anonymize_with_base_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft2, anonymize_with_base_dialect_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft2, sibling_unknown_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-02/schema#", - "$ref": "#" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft2, reidentify_replace) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft2, reidentify_set) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft2, reidentify_replace_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-02/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft2, reidentify_replace_base_dialect_shortcut) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} diff --git a/test/jsonschema/jsonschema_identify_draft3_test.cc b/test/jsonschema/jsonschema_identify_draft3_test.cc deleted file mode 100644 index b96f5214f..000000000 --- a/test/jsonschema/jsonschema_identify_draft3_test.cc +++ /dev/null @@ -1,252 +0,0 @@ -#include - -#include -#include - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/metaschema") { - return sourcemeta::core::parse_json(R"JSON({ - "id": "https://sourcemeta.com/metaschema", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_identify_draft3, valid_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft3, new_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft3, id_boolean_default_dialect) { - const sourcemeta::core::JSON document{true}; - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-03/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft3, empty_object_default_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-03/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft3, valid_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft3, new_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft3, default_dialect_precedence) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft3, base_dialect_shortcut) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_3)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft3, anonymize_with_base_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft3, anonymize_with_base_dialect_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft3, sibling_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-03/schema#", - "$ref": "#" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft3, reidentify_replace) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft3, reidentify_set) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft3, reidentify_replace_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-03/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft3, reidentify_replace_base_dialect_shortcut) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft3, reidentify_set_with_top_level_ref) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "$ref": "https://example.com/schema" - })JSON"); - - EXPECT_THROW(sourcemeta::core::reidentify(document, - "https://example.com/my-new-id", - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaReferenceObjectResourceError); -} - -TEST(JSONSchema_identify_draft3, - reidentify_set_with_top_level_ref_and_extends) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "$ref": "https://example.com/schema", - "extends": { "type": "string" } - })JSON"); - - EXPECT_THROW(sourcemeta::core::reidentify(document, - "https://example.com/my-new-id", - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaReferenceObjectResourceError); -} - -TEST(JSONSchema_identify_draft3, id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "#", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft3, id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} diff --git a/test/jsonschema/jsonschema_identify_draft4_test.cc b/test/jsonschema/jsonschema_identify_draft4_test.cc deleted file mode 100644 index ff3342311..000000000 --- a/test/jsonschema/jsonschema_identify_draft4_test.cc +++ /dev/null @@ -1,251 +0,0 @@ -#include - -#include -#include - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/metaschema") { - return sourcemeta::core::parse_json(R"JSON({ - "id": "https://sourcemeta.com/metaschema", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_identify_draft4, valid_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft4, new_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft4, id_boolean_default_dialect) { - const sourcemeta::core::JSON document{true}; - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-04/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft4, empty_object_default_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-04/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft4, valid_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft4, new_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft4, default_dialect_precedence) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft4, base_dialect_shortcut) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft4, anonymize_with_base_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft4, anonymize_with_base_dialect_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft4, sibling_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "#" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft4, reidentify_replace) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft4, reidentify_set) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft4, reidentify_replace_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-04/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft4, reidentify_replace_base_dialect_shortcut) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft4, reidentify_set_with_top_level_ref) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "https://example.com/schema" - })JSON"); - - EXPECT_THROW(sourcemeta::core::reidentify(document, - "https://example.com/my-new-id", - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaReferenceObjectResourceError); -} - -TEST(JSONSchema_identify_draft4, reidentify_set_with_top_level_ref_and_allof) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "https://example.com/schema", - "allOf": [ { "type": "string" } ] - })JSON"); - - EXPECT_THROW(sourcemeta::core::reidentify(document, - "https://example.com/my-new-id", - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaReferenceObjectResourceError); -} - -TEST(JSONSchema_identify_draft4, id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "#", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft4, id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} diff --git a/test/jsonschema/jsonschema_identify_draft6_test.cc b/test/jsonschema/jsonschema_identify_draft6_test.cc deleted file mode 100644 index d7e563a5d..000000000 --- a/test/jsonschema/jsonschema_identify_draft6_test.cc +++ /dev/null @@ -1,251 +0,0 @@ -#include - -#include -#include - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/metaschema") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/metaschema", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_identify_draft6, valid_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft6, old_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft6, id_boolean_default_dialect) { - const sourcemeta::core::JSON document{true}; - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-06/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft6, empty_object_default_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-06/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft6, valid_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft6, old_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft6, default_dialect_precedence) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-04/schema#")}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft6, base_dialect_shortcut) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_6)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft6, anonymize_with_base_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft6, anonymize_with_base_dialect_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft6, sibling_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-06/schema#", - "$ref": "#" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft6, reidentify_replace) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft6, reidentify_set) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft6, reidentify_replace_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-06/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft6, reidentify_replace_base_dialect_shortcut) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft6, reidentify_set_with_top_level_ref) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$ref": "https://example.com/schema" - })JSON"); - - EXPECT_THROW(sourcemeta::core::reidentify(document, - "https://example.com/my-new-id", - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaReferenceObjectResourceError); -} - -TEST(JSONSchema_identify_draft6, reidentify_set_with_top_level_ref_and_allof) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$ref": "https://example.com/schema", - "allOf": [ { "type": "string" } ] - })JSON"); - - EXPECT_THROW(sourcemeta::core::reidentify(document, - "https://example.com/my-new-id", - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaReferenceObjectResourceError); -} - -TEST(JSONSchema_identify_draft6, id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "#", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft6, id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} diff --git a/test/jsonschema/jsonschema_identify_draft7_test.cc b/test/jsonschema/jsonschema_identify_draft7_test.cc deleted file mode 100644 index 3f409d1ee..000000000 --- a/test/jsonschema/jsonschema_identify_draft7_test.cc +++ /dev/null @@ -1,251 +0,0 @@ -#include - -#include -#include - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/metaschema") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/metaschema", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_identify_draft7, valid_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft7, old_one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "https://sourcemeta.com/metaschema" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft7, id_boolean_default_dialect) { - const sourcemeta::core::JSON document{true}; - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-07/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft7, empty_object_default_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-07/schema#")}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft7, valid_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft7, old_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft7, default_dialect_precedence) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-04/schema#")}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft7, base_dialect_shortcut) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7)}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify_draft7, anonymize_with_base_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft7, anonymize_with_base_dialect_no_id) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - sourcemeta::core::anonymize(document, base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft7, sibling_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "#" - })JSON"); - const auto id{sourcemeta::core::identify(document, test_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft7, reidentify_replace) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft7, reidentify_set) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft7, reidentify_replace_default_dialect) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema" - })JSON"); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-07/schema#"); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft7, reidentify_replace_base_dialect_shortcut) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - const auto base_dialect{sourcemeta::core::base_dialect( - document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(base_dialect.has_value()); - - sourcemeta::core::reidentify(document, "https://example.com/my-new-id", - base_dialect.value()); - - const sourcemeta::core::JSON expected = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-new-id", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - - EXPECT_EQ(document, expected); -} - -TEST(JSONSchema_identify_draft7, reidentify_set_with_top_level_ref) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "https://example.com/schema" - })JSON"); - - EXPECT_THROW(sourcemeta::core::reidentify(document, - "https://example.com/my-new-id", - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaReferenceObjectResourceError); -} - -TEST(JSONSchema_identify_draft7, reidentify_set_with_top_level_ref_and_allof) { - sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "https://example.com/schema", - "allOf": [ { "type": "string" } ] - })JSON"); - - EXPECT_THROW(sourcemeta::core::reidentify(document, - "https://example.com/my-new-id", - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaReferenceObjectResourceError); -} - -TEST(JSONSchema_identify_draft7, id_empty_fragment_only) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "#", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify_draft7, id_empty_string) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} diff --git a/test/jsonschema/jsonschema_identify_test.cc b/test/jsonschema/jsonschema_identify_test.cc deleted file mode 100644 index 4007c514e..000000000 --- a/test/jsonschema/jsonschema_identify_test.cc +++ /dev/null @@ -1,281 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_identify, boolean_no_dialect) { - const sourcemeta::core::JSON document{true}; - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, boolean_no_dialect_with_default_id) { - const sourcemeta::core::JSON document{true}; - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "", "https://www.sourcemeta.com/foo")}; - EXPECT_EQ(id, "https://www.sourcemeta.com/foo"); -} - -TEST(JSONSchema_identify, empty_old_no_dollar_sign_id_with_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "http://json-schema.org/draft-00/schema#", - "https://example.com/my-schema")}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify, empty_dollar_sign_id_with_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema", - "https://example.com/my-schema")}; - EXPECT_EQ(id, "https://example.com/my-schema"); -} - -TEST(JSONSchema_identify, boolean_unknown_dialect) { - const sourcemeta::core::JSON document{true}; - EXPECT_THROW( - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "https://www.sourcemeta.com/invalid-dialect"), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_identify, empty_object_no_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, empty_object_unknown_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - EXPECT_THROW( - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver, - "https://www.sourcemeta.com/invalid-dialect"), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_identify, object_with_dollar_id_with_no_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, object_with_id_with_no_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, loose_boolean) { - const sourcemeta::core::JSON document{true}; - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, loose_with_valid_dollar_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, loose_with_invalid_dollar_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": false - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, loose_with_valid_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, loose_with_invalid_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": false - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, loose_with_valid_dollar_id_and_invalid_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "id": false - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, loose_with_valid_id_and_invalid_dollar_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "id": "https://example.com/my-schema", - "$id": false - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, loose_with_invalid_id_and_invalid_dollar_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": 1, - "id": false - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, loose_with_matching_id_and_dollar_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "id": "https://example.com/my-schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, loose_with_non_matching_id_and_dollar_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "http://example.com/my-schema", - "id": "https://example.com/my-schema" - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, loose_with_resolvable_default_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "http://example.com/my-schema", - "id": "https://example.com/my-schema" - })JSON"); - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_EQ(id, "http://example.com/my-schema"); -} - -TEST(JSONSchema_identify, strict_draft4_top_level_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://example.com/my-schema", - "$ref": "#/definitions/foo", - "definitions": { - "foo": { - "type": "string" - } - } - })JSON"); - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, loose_with_unresolvable_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$id": "https://example.com/my-schema", - "$schema": "https://www.sourcemeta.com/invalid-dialect" - })JSON"); - EXPECT_THROW( - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_identify, reidentify_boolean) { - sourcemeta::core::JSON document{true}; - EXPECT_THROW(sourcemeta::core::reidentify(document, - "https://example.com/my-new-id", - sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_identify, draft7_top_level_id_and_ref_strict) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com/schema", - "$ref": "foo" - })JSON"); - - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, draft7_ref_with_wrong_id_keyword_strict) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "id": "https://example.com/schema", - "$ref": "foo" - })JSON"); - - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7)}; - EXPECT_TRUE(id.empty()); -} - -TEST(JSONSchema_identify, override_allowed_picks_dollarid) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://example.com/via-id", - "$id": "http://example.com/via-dollarid", - "x-sourcemeta-dialect-override-subschema": - "http://json-schema.org/draft-06/schema#" - })JSON"); - - const auto id{ - sourcemeta::core::identify(document, sourcemeta::core::schema_resolver)}; - EXPECT_EQ(id, "http://example.com/via-dollarid"); -} - -TEST(JSONSchema_identify, override_disallowed_picks_id) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://example.com/via-id", - "$id": "http://example.com/via-dollarid", - "x-sourcemeta-dialect-override-subschema": - "http://json-schema.org/draft-06/schema#" - })JSON"); - - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::schema_resolver, "", "", false)}; - EXPECT_EQ(id, "http://example.com/via-id"); -} - -TEST(JSONSchema_identify, override_disallowed_with_unresolvable_uri) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://example.com/foo", - "x-sourcemeta-dialect-override-subschema": - "https://example.com/does-not-exist" - })JSON"); - - const auto id{sourcemeta::core::identify( - document, sourcemeta::core::schema_resolver, "", "", false)}; - EXPECT_EQ(id, "http://example.com/foo"); -} diff --git a/test/jsonschema/jsonschema_is_empty_schema_test.cc b/test/jsonschema/jsonschema_is_empty_schema_test.cc deleted file mode 100644 index 0950c8e94..000000000 --- a/test/jsonschema/jsonschema_is_empty_schema_test.cc +++ /dev/null @@ -1,57 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema, is_empty_schema_true) { - const sourcemeta::core::JSON document{true}; - EXPECT_TRUE(sourcemeta::core::is_empty_schema(document)); -} - -TEST(JSONSchema, is_empty_schema_false) { - const sourcemeta::core::JSON document{false}; - EXPECT_FALSE(sourcemeta::core::is_empty_schema(document)); -} - -TEST(JSONSchema, is_empty_schema_int) { - const sourcemeta::core::JSON document{5}; - EXPECT_FALSE(sourcemeta::core::is_empty_schema(document)); -} - -TEST(JSONSchema, is_empty_schema_real) { - const sourcemeta::core::JSON document{5.3}; - EXPECT_FALSE(sourcemeta::core::is_empty_schema(document)); -} - -TEST(JSONSchema, is_empty_schema_null) { - const sourcemeta::core::JSON document{nullptr}; - EXPECT_FALSE(sourcemeta::core::is_empty_schema(document)); -} - -TEST(JSONSchema, is_empty_schema_string) { - const sourcemeta::core::JSON document{"foo"}; - EXPECT_FALSE(sourcemeta::core::is_empty_schema(document)); -} - -TEST(JSONSchema, is_empty_schema_array) { - const sourcemeta::core::JSON document = - sourcemeta::core::parse_json("[ 1, 2, 3 ]"); - EXPECT_FALSE(sourcemeta::core::is_empty_schema(document)); -} - -TEST(JSONSchema, is_empty_schema_empty_object) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - EXPECT_TRUE(sourcemeta::core::is_empty_schema(document)); -} - -TEST(JSONSchema, is_empty_schema_non_empty_object) { - const sourcemeta::core::JSON document = - sourcemeta::core::parse_json("{ \"type\": true }"); - EXPECT_FALSE(sourcemeta::core::is_empty_schema(document)); -} - -TEST(JSONSchema, is_empty_schema_unknown_keyword) { - const sourcemeta::core::JSON document = - sourcemeta::core::parse_json("{ \"x-foo\": true }"); - EXPECT_FALSE(sourcemeta::core::is_empty_schema(document)); -} diff --git a/test/jsonschema/jsonschema_is_schema_test.cc b/test/jsonschema/jsonschema_is_schema_test.cc deleted file mode 100644 index 8757dbee5..000000000 --- a/test/jsonschema/jsonschema_is_schema_test.cc +++ /dev/null @@ -1,45 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema, is_schema_true) { - const sourcemeta::core::JSON document{true}; - EXPECT_TRUE(sourcemeta::core::is_schema(document)); -} - -TEST(JSONSchema, is_schema_false) { - const sourcemeta::core::JSON document{false}; - EXPECT_TRUE(sourcemeta::core::is_schema(document)); -} - -TEST(JSONSchema, is_schema_int) { - const sourcemeta::core::JSON document{5}; - EXPECT_FALSE(sourcemeta::core::is_schema(document)); -} - -TEST(JSONSchema, is_schema_real) { - const sourcemeta::core::JSON document{5.3}; - EXPECT_FALSE(sourcemeta::core::is_schema(document)); -} - -TEST(JSONSchema, is_schema_null) { - const sourcemeta::core::JSON document{nullptr}; - EXPECT_FALSE(sourcemeta::core::is_schema(document)); -} - -TEST(JSONSchema, is_schema_string) { - const sourcemeta::core::JSON document{"foo"}; - EXPECT_FALSE(sourcemeta::core::is_schema(document)); -} - -TEST(JSONSchema, is_schema_array) { - const sourcemeta::core::JSON document = - sourcemeta::core::parse_json("[ 1, 2, 3 ]"); - EXPECT_FALSE(sourcemeta::core::is_schema(document)); -} - -TEST(JSONSchema, is_schema_empty_object) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json("{}"); - EXPECT_TRUE(sourcemeta::core::is_schema(document)); -} diff --git a/test/jsonschema/jsonschema_json_auto_test.cc b/test/jsonschema/jsonschema_json_auto_test.cc deleted file mode 100644 index 9997b9860..000000000 --- a/test/jsonschema/jsonschema_json_auto_test.cc +++ /dev/null @@ -1,106 +0,0 @@ -#include - -#include - -TEST(JSONSchema_json_auto, vocabularies_known_2020_12_core) { - const auto vocabulary{ - sourcemeta::core::Vocabularies::Known::JSON_Schema_2020_12_Core}; - const auto result{sourcemeta::core::to_json(vocabulary)}; - EXPECT_TRUE(result.is_integer()); - EXPECT_EQ(result.to_integer(), 21); - const auto back{ - sourcemeta::core::from_json( - result)}; - EXPECT_TRUE(back.has_value()); - EXPECT_EQ(vocabulary, back.value()); -} - -TEST(JSONSchema_json_auto, vocabularies_known_2020_12_applicator) { - const auto vocabulary{ - sourcemeta::core::Vocabularies::Known::JSON_Schema_2020_12_Applicator}; - const auto result{sourcemeta::core::to_json(vocabulary)}; - EXPECT_TRUE(result.is_integer()); - EXPECT_EQ(result.to_integer(), 22); - const auto back{ - sourcemeta::core::from_json( - result)}; - EXPECT_TRUE(back.has_value()); - EXPECT_EQ(vocabulary, back.value()); -} - -TEST(JSONSchema_json_auto, vocabularies_known_draft_0) { - const auto vocabulary{ - sourcemeta::core::Vocabularies::Known::JSON_Schema_Draft_0}; - const auto result{sourcemeta::core::to_json(vocabulary)}; - EXPECT_TRUE(result.is_integer()); - EXPECT_EQ(result.to_integer(), 0); - const auto back{ - sourcemeta::core::from_json( - result)}; - EXPECT_TRUE(back.has_value()); - EXPECT_EQ(vocabulary, back.value()); -} - -TEST(JSONSchema_json_auto, vocabularies_known_from_json_invalid_type) { - const sourcemeta::core::JSON input{"not-an-integer"}; - const auto result{ - sourcemeta::core::from_json( - input)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_json_auto, vocabularies_uri_with_known) { - const sourcemeta::core::Vocabularies::URI uri{ - sourcemeta::core::Vocabularies::Known::JSON_Schema_2020_12_Core}; - const auto result{sourcemeta::core::to_json(uri)}; - EXPECT_TRUE(result.is_array()); - EXPECT_EQ(result.size(), 2); - EXPECT_TRUE(result.at(0).is_integer()); - EXPECT_EQ(result.at(0).to_integer(), 0); - EXPECT_TRUE(result.at(1).is_integer()); - EXPECT_EQ(result.at(1).to_integer(), 21); - const auto back{ - sourcemeta::core::from_json(result)}; - EXPECT_TRUE(back.has_value()); - EXPECT_EQ(uri, back.value()); -} - -TEST(JSONSchema_json_auto, vocabularies_uri_with_custom_string) { - const sourcemeta::core::Vocabularies::URI uri{ - sourcemeta::core::JSON::String{"https://example.com/my-custom-vocab"}}; - const auto result{sourcemeta::core::to_json(uri)}; - EXPECT_TRUE(result.is_array()); - EXPECT_EQ(result.size(), 2); - EXPECT_TRUE(result.at(0).is_integer()); - EXPECT_EQ(result.at(0).to_integer(), 1); - EXPECT_TRUE(result.at(1).is_string()); - EXPECT_EQ(result.at(1).to_string(), "https://example.com/my-custom-vocab"); - const auto back{ - sourcemeta::core::from_json(result)}; - EXPECT_TRUE(back.has_value()); - EXPECT_EQ(uri, back.value()); -} - -TEST(JSONSchema_json_auto, vocabularies_uri_from_json_invalid_type) { - const sourcemeta::core::JSON input{"not-an-array"}; - const auto result{ - sourcemeta::core::from_json(input)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_json_auto, vocabularies_uri_from_json_invalid_size) { - auto input{sourcemeta::core::JSON::make_array()}; - input.push_back(sourcemeta::core::JSON{0}); - const auto result{ - sourcemeta::core::from_json(input)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_json_auto, vocabularies_uri_from_json_invalid_index) { - auto input{sourcemeta::core::JSON::make_array()}; - input.push_back(sourcemeta::core::JSON{99}); - input.push_back(sourcemeta::core::JSON{0}); - const auto result{ - sourcemeta::core::from_json(input)}; - EXPECT_FALSE(result.has_value()); -} diff --git a/test/jsonschema/jsonschema_keyword_iterator_test.cc b/test/jsonschema/jsonschema_keyword_iterator_test.cc deleted file mode 100644 index ed2e713fc..000000000 --- a/test/jsonschema/jsonschema_keyword_iterator_test.cc +++ /dev/null @@ -1,677 +0,0 @@ -#include - -#include -#include -#include - -#include - -TEST(JSONSchema_keyword_iterator, draft_2020_12) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string", - "properties": {}, - "patternProperties": {}, - "additionalProperties": true, - "unevaluatedProperties": true, - "prefixItems": [], - "items": true, - "minContains": 0, - "maxContains": 1, - "required": [ "foo" ], - "contains": true, - "unevaluatedItems": true, - "if": true, - "then": true, - "else": true - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - - // The same for all entries - EXPECT_EQ(entry.dialect, "https://json-schema.org/draft/2020-12/schema"); - EXPECT_TRUE(entry.base_dialect.has_value()); - EXPECT_EQ(entry.base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - EXPECT_EQ(entry.vocabularies.size(), 7); - } - - EXPECT_EQ(entries.size(), 16); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), "/$schema"); - EXPECT_EQ( - entries.at(0).subschema.get(), - sourcemeta::core::JSON{"https://json-schema.org/draft/2020-12/schema"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/if"); - EXPECT_EQ(entries.at(1).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), "/maxContains"); - EXPECT_EQ(entries.at(2).subschema.get(), sourcemeta::core::JSON{1}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(3).pointer), "/minContains"); - EXPECT_EQ(entries.at(3).subschema.get(), sourcemeta::core::JSON{0}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(4).pointer), - "/patternProperties"); - EXPECT_EQ(entries.at(4).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(5).pointer), "/prefixItems"); - EXPECT_EQ(entries.at(5).subschema.get(), sourcemeta::core::parse_json("[]")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(6).pointer), "/required"); - EXPECT_EQ(entries.at(6).subschema.get(), - sourcemeta::core::parse_json("[ \"foo\" ]")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(7).pointer), "/contains"); - EXPECT_EQ(entries.at(7).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(8).pointer), "/else"); - EXPECT_EQ(entries.at(8).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(9).pointer), "/items"); - EXPECT_EQ(entries.at(9).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(10).pointer), "/properties"); - EXPECT_EQ(entries.at(10).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(11).pointer), "/then"); - EXPECT_EQ(entries.at(11).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(12).pointer), - "/additionalProperties"); - EXPECT_EQ(entries.at(12).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(13).pointer), "/type"); - EXPECT_EQ(entries.at(13).subschema.get(), sourcemeta::core::JSON{"string"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(14).pointer), - "/unevaluatedItems"); - EXPECT_EQ(entries.at(14).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(15).pointer), - "/unevaluatedProperties"); - EXPECT_EQ(entries.at(15).subschema.get(), sourcemeta::core::JSON{true}); -} - -TEST(JSONSchema_keyword_iterator, draft_2019_09) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string", - "properties": {}, - "patternProperties": {}, - "additionalProperties": true, - "unevaluatedProperties": true, - "additionalItems": true, - "items": [], - "minContains": 0, - "maxContains": 1, - "required": [ "foo" ], - "contains": true, - "unevaluatedItems": true, - "if": true, - "then": true, - "else": true - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - - // The same for all entries - EXPECT_EQ(entry.dialect, "https://json-schema.org/draft/2019-09/schema"); - EXPECT_TRUE(entry.base_dialect.has_value()); - EXPECT_EQ(entry.base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); - EXPECT_EQ(entry.vocabularies.size(), 6); - } - - EXPECT_EQ(entries.size(), 16); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), "/$schema"); - EXPECT_EQ( - entries.at(0).subschema.get(), - sourcemeta::core::JSON{"https://json-schema.org/draft/2019-09/schema"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/if"); - EXPECT_EQ(entries.at(1).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), "/items"); - EXPECT_EQ(entries.at(2).subschema.get(), sourcemeta::core::parse_json("[]")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(3).pointer), "/maxContains"); - EXPECT_EQ(entries.at(3).subschema.get(), sourcemeta::core::JSON{1}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(4).pointer), "/minContains"); - EXPECT_EQ(entries.at(4).subschema.get(), sourcemeta::core::JSON{0}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(5).pointer), - "/patternProperties"); - EXPECT_EQ(entries.at(5).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(6).pointer), "/required"); - EXPECT_EQ(entries.at(6).subschema.get(), - sourcemeta::core::parse_json("[ \"foo\" ]")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(7).pointer), - "/additionalItems"); - EXPECT_EQ(entries.at(7).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(8).pointer), "/contains"); - EXPECT_EQ(entries.at(8).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(9).pointer), "/else"); - EXPECT_EQ(entries.at(9).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(10).pointer), "/properties"); - EXPECT_EQ(entries.at(10).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(11).pointer), "/then"); - EXPECT_EQ(entries.at(11).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(12).pointer), - "/additionalProperties"); - EXPECT_EQ(entries.at(12).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(13).pointer), "/type"); - EXPECT_EQ(entries.at(13).subschema.get(), sourcemeta::core::JSON{"string"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(14).pointer), - "/unevaluatedItems"); - EXPECT_EQ(entries.at(14).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(15).pointer), - "/unevaluatedProperties"); - EXPECT_EQ(entries.at(15).subschema.get(), sourcemeta::core::JSON{true}); -} - -TEST(JSONSchema_keyword_iterator, draft7) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "string", - "properties": {}, - "patternProperties": {}, - "additionalProperties": true, - "additionalItems": true, - "required": [ "foo" ], - "items": [], - "if": true, - "then": true, - "else": true - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - - // The same for all entries - EXPECT_EQ(entry.dialect, "http://json-schema.org/draft-07/schema#"); - EXPECT_TRUE(entry.base_dialect.has_value()); - EXPECT_EQ(entry.base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7); - EXPECT_EQ(entry.vocabularies.size(), 1); - } - - EXPECT_EQ(entries.size(), 11); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), "/$schema"); - EXPECT_EQ(entries.at(0).subschema.get(), - sourcemeta::core::JSON{"http://json-schema.org/draft-07/schema#"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/if"); - EXPECT_EQ(entries.at(1).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), "/items"); - EXPECT_EQ(entries.at(2).subschema.get(), sourcemeta::core::parse_json("[]")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(3).pointer), - "/patternProperties"); - EXPECT_EQ(entries.at(3).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(4).pointer), "/required"); - EXPECT_EQ(entries.at(4).subschema.get(), - sourcemeta::core::parse_json("[ \"foo\" ]")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(5).pointer), - "/additionalItems"); - EXPECT_EQ(entries.at(5).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(6).pointer), "/else"); - EXPECT_EQ(entries.at(6).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(7).pointer), "/properties"); - EXPECT_EQ(entries.at(7).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(8).pointer), "/then"); - EXPECT_EQ(entries.at(8).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(9).pointer), - "/additionalProperties"); - EXPECT_EQ(entries.at(9).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(10).pointer), "/type"); - EXPECT_EQ(entries.at(10).subschema.get(), sourcemeta::core::JSON{"string"}); -} - -TEST(JSONSchema_keyword_iterator, draft6) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "type": "string", - "properties": {}, - "patternProperties": {}, - "required": [ "foo" ], - "additionalProperties": true, - "additionalItems": true, - "items": [] - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - - // The same for all entries - EXPECT_EQ(entry.dialect, "http://json-schema.org/draft-06/schema#"); - EXPECT_TRUE(entry.base_dialect.has_value()); - EXPECT_EQ(entry.base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_6); - EXPECT_EQ(entry.vocabularies.size(), 1); - } - - EXPECT_EQ(entries.size(), 8); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), "/$schema"); - EXPECT_EQ(entries.at(0).subschema.get(), - sourcemeta::core::JSON{"http://json-schema.org/draft-06/schema#"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/items"); - EXPECT_EQ(entries.at(1).subschema.get(), sourcemeta::core::parse_json("[]")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), - "/patternProperties"); - EXPECT_EQ(entries.at(2).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(3).pointer), "/required"); - EXPECT_EQ(entries.at(3).subschema.get(), - sourcemeta::core::parse_json("[ \"foo\" ]")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(4).pointer), - "/additionalItems"); - EXPECT_EQ(entries.at(4).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(5).pointer), "/properties"); - EXPECT_EQ(entries.at(5).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(6).pointer), - "/additionalProperties"); - EXPECT_EQ(entries.at(6).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(7).pointer), "/type"); - EXPECT_EQ(entries.at(7).subschema.get(), sourcemeta::core::JSON{"string"}); -} - -TEST(JSONSchema_keyword_iterator, draft4) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "string", - "properties": {}, - "patternProperties": {}, - "required": [ "foo" ], - "additionalProperties": true, - "additionalItems": true, - "items": [] - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - - // The same for all entries - EXPECT_EQ(entry.dialect, "http://json-schema.org/draft-04/schema#"); - EXPECT_TRUE(entry.base_dialect.has_value()); - EXPECT_EQ(entry.base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4); - EXPECT_EQ(entry.vocabularies.size(), 1); - } - - EXPECT_EQ(entries.size(), 8); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), "/$schema"); - EXPECT_EQ(entries.at(0).subschema.get(), - sourcemeta::core::JSON{"http://json-schema.org/draft-04/schema#"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/items"); - EXPECT_EQ(entries.at(1).subschema.get(), sourcemeta::core::parse_json("[]")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), - "/patternProperties"); - EXPECT_EQ(entries.at(2).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(3).pointer), "/required"); - EXPECT_EQ(entries.at(3).subschema.get(), - sourcemeta::core::parse_json("[ \"foo\" ]")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(4).pointer), - "/additionalItems"); - EXPECT_EQ(entries.at(4).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(5).pointer), "/properties"); - EXPECT_EQ(entries.at(5).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(6).pointer), - "/additionalProperties"); - EXPECT_EQ(entries.at(6).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(7).pointer), "/type"); - EXPECT_EQ(entries.at(7).subschema.get(), sourcemeta::core::JSON{"string"}); -} - -TEST(JSONSchema_keyword_iterator, draft3) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "type": "string", - "properties": {}, - "patternProperties": {}, - "additionalProperties": true, - "additionalItems": true, - "items": [] - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - - // The same for all entries - EXPECT_EQ(entry.dialect, "http://json-schema.org/draft-03/schema#"); - EXPECT_TRUE(entry.base_dialect.has_value()); - EXPECT_EQ(entry.base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_3); - EXPECT_EQ(entry.vocabularies.size(), 1); - } - - EXPECT_EQ(entries.size(), 7); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), "/$schema"); - EXPECT_EQ(entries.at(0).subschema.get(), - sourcemeta::core::JSON{"http://json-schema.org/draft-03/schema#"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/items"); - EXPECT_EQ(entries.at(1).subschema.get(), sourcemeta::core::parse_json("[]")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), - "/patternProperties"); - EXPECT_EQ(entries.at(2).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(3).pointer), "/properties"); - EXPECT_EQ(entries.at(3).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(4).pointer), "/type"); - EXPECT_EQ(entries.at(4).subschema.get(), sourcemeta::core::JSON{"string"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(5).pointer), - "/additionalItems"); - EXPECT_EQ(entries.at(5).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(6).pointer), - "/additionalProperties"); - EXPECT_EQ(entries.at(6).subschema.get(), sourcemeta::core::JSON{true}); -} - -TEST(JSONSchema_keyword_iterator, draft2) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#", - "type": "string", - "properties": {}, - "additionalProperties": true - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - - // The same for all entries - EXPECT_EQ(entry.dialect, "http://json-schema.org/draft-02/schema#"); - EXPECT_TRUE(entry.base_dialect.has_value()); - EXPECT_EQ(entry.base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_2_Hyper); - EXPECT_EQ(entry.vocabularies.size(), 1); - } - - EXPECT_EQ(entries.size(), 4); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), "/$schema"); - EXPECT_EQ(entries.at(0).subschema.get(), - sourcemeta::core::JSON{"http://json-schema.org/draft-02/schema#"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/properties"); - EXPECT_EQ(entries.at(1).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), "/type"); - EXPECT_EQ(entries.at(2).subschema.get(), sourcemeta::core::JSON{"string"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(3).pointer), - "/additionalProperties"); - EXPECT_EQ(entries.at(3).subschema.get(), sourcemeta::core::JSON{true}); -} - -TEST(JSONSchema_keyword_iterator, draft1) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#", - "type": "string", - "properties": {}, - "additionalProperties": true - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - - // The same for all entries - EXPECT_EQ(entry.dialect, "http://json-schema.org/draft-01/schema#"); - EXPECT_TRUE(entry.base_dialect.has_value()); - EXPECT_EQ(entry.base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_1_Hyper); - EXPECT_EQ(entry.vocabularies.size(), 1); - } - - EXPECT_EQ(entries.size(), 4); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), "/$schema"); - EXPECT_EQ(entries.at(0).subschema.get(), - sourcemeta::core::JSON{"http://json-schema.org/draft-01/schema#"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/properties"); - EXPECT_EQ(entries.at(1).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), "/type"); - EXPECT_EQ(entries.at(2).subschema.get(), sourcemeta::core::JSON{"string"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(3).pointer), - "/additionalProperties"); - EXPECT_EQ(entries.at(3).subschema.get(), sourcemeta::core::JSON{true}); -} - -TEST(JSONSchema_keyword_iterator, draft0) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#", - "type": "string", - "properties": {}, - "additionalProperties": true - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - - // The same for all entries - EXPECT_EQ(entry.dialect, "http://json-schema.org/draft-00/schema#"); - EXPECT_TRUE(entry.base_dialect.has_value()); - EXPECT_EQ(entry.base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_0_Hyper); - EXPECT_EQ(entry.vocabularies.size(), 1); - } - - EXPECT_EQ(entries.size(), 4); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), "/$schema"); - EXPECT_EQ(entries.at(0).subschema.get(), - sourcemeta::core::JSON{"http://json-schema.org/draft-00/schema#"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/properties"); - EXPECT_EQ(entries.at(1).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), "/type"); - EXPECT_EQ(entries.at(2).subschema.get(), sourcemeta::core::JSON{"string"}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(3).pointer), - "/additionalProperties"); - EXPECT_EQ(entries.at(3).subschema.get(), sourcemeta::core::JSON{true}); -} - -TEST(JSONSchema_keyword_iterator, unknown_keyword) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "foobar": 0 - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 2); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), "/$schema"); - EXPECT_EQ( - entries.at(0).subschema.get(), - sourcemeta::core::JSON{"https://json-schema.org/draft/2020-12/schema"}); - EXPECT_EQ(entries.at(0).dialect, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_EQ(entries.at(0).base_dialect, - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - EXPECT_EQ(entries.at(0).vocabularies.size(), 7); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/foobar"); - EXPECT_EQ(entries.at(1).subschema.get(), sourcemeta::core::JSON{0}); - EXPECT_EQ(entries.at(1).dialect, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_EQ(entries.at(1).base_dialect, - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - EXPECT_EQ(entries.at(1).vocabularies.size(), 7); -} - -TEST(JSONSchema_keyword_iterator, with_default_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "properties": {}, - "patternProperties": {}, - "additionalProperties": true - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema")) { - entries.push_back(entry); - - // The same for all entries - EXPECT_EQ(entry.dialect, "https://json-schema.org/draft/2020-12/schema"); - EXPECT_TRUE(entry.base_dialect.has_value()); - EXPECT_EQ(entry.base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - EXPECT_EQ(entry.vocabularies.size(), 7); - } - - EXPECT_EQ(entries.size(), 3); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), - "/patternProperties"); - EXPECT_EQ(entries.at(0).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/properties"); - EXPECT_EQ(entries.at(1).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), - "/additionalProperties"); - EXPECT_EQ(entries.at(2).subschema.get(), sourcemeta::core::JSON{true}); -} - -TEST(JSONSchema_keyword_iterator, no_default_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "properties": {}, - "patternProperties": {}, - "additionalProperties": true - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - - // The same for all entries - EXPECT_TRUE(entry.dialect.empty()); - EXPECT_FALSE(entry.base_dialect.has_value()); - EXPECT_EQ(entry.vocabularies.size(), 0); - } - - EXPECT_EQ(entries.size(), 3); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), - "/additionalProperties"); - EXPECT_EQ(entries.at(0).subschema.get(), sourcemeta::core::JSON{true}); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), - "/patternProperties"); - EXPECT_EQ(entries.at(1).subschema.get(), sourcemeta::core::parse_json("{}")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), "/properties"); - EXPECT_EQ(entries.at(2).subschema.get(), sourcemeta::core::parse_json("{}")); -} - -TEST(JSONSchema_keyword_iterator, boolean_true) { - const sourcemeta::core::JSON document{true}; - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_TRUE(entries.empty()); -} - -TEST(JSONSchema_keyword_iterator, boolean_false) { - const sourcemeta::core::JSON document{false}; - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaKeywordIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_TRUE(entries.empty()); -} diff --git a/test/jsonschema/jsonschema_metaschema_test.cc b/test/jsonschema/jsonschema_metaschema_test.cc deleted file mode 100644 index 733b3d581..000000000 --- a/test/jsonschema/jsonschema_metaschema_test.cc +++ /dev/null @@ -1,102 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_metaschema, example_2020_12) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - })JSON")}; - - const auto metaschema{ - sourcemeta::core::metaschema(schema, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(metaschema.is_object()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/schema") - .has_value()); - EXPECT_EQ(metaschema, sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/schema") - .value()); -} - -TEST(JSONSchema_metaschema, with_default_dialect) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "type": "string" - })JSON")}; - - const auto metaschema{sourcemeta::core::metaschema( - schema, sourcemeta::core::schema_resolver, - "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_TRUE(metaschema.is_object()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/schema") - .has_value()); - EXPECT_EQ(metaschema, sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/schema") - .value()); -} - -TEST(JSONSchema_metaschema, no_dialect) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "type": "string" - })JSON")}; - - EXPECT_THROW( - sourcemeta::core::metaschema(schema, sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaUnknownDialectError); -} - -TEST(JSONSchema_metaschema, unknown_dialect) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://example.com", - "type": "string" - })JSON")}; - - EXPECT_THROW( - sourcemeta::core::metaschema(schema, sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_metaschema, override_returns_override_metaschema) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "x-sourcemeta-dialect-override-subschema": - "https://json-schema.org/draft/2020-12/schema", - "type": "string" - })JSON")}; - - const auto metaschema{ - sourcemeta::core::metaschema(schema, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(metaschema.is_object()); - EXPECT_EQ(metaschema, sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/schema") - .value()); -} - -TEST(JSONSchema_metaschema, override_only_returns_override_metaschema) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "x-sourcemeta-dialect-override-subschema": - "https://json-schema.org/draft/2020-12/schema", - "type": "string" - })JSON")}; - - const auto metaschema{ - sourcemeta::core::metaschema(schema, sourcemeta::core::schema_resolver)}; - EXPECT_TRUE(metaschema.is_object()); - EXPECT_EQ(metaschema, sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/schema") - .value()); -} - -TEST(JSONSchema_metaschema, override_unresolvable) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "x-sourcemeta-dialect-override-subschema": "https://example.com/missing", - "type": "string" - })JSON")}; - - EXPECT_THROW( - sourcemeta::core::metaschema(schema, sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaResolutionError); -} diff --git a/test/jsonschema/jsonschema_parse_type_test.cc b/test/jsonschema/jsonschema_parse_type_test.cc deleted file mode 100644 index 76a38ec5e..000000000 --- a/test/jsonschema/jsonschema_parse_type_test.cc +++ /dev/null @@ -1,114 +0,0 @@ -#include - -#include -#include - -TEST(JSONSchema_parse_type, null_string) { - const sourcemeta::core::JSON type{"null"}; - const auto result{sourcemeta::core::parse_schema_type(type)}; - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::Null))); - EXPECT_EQ(result.count(), 1); -} - -TEST(JSONSchema_parse_type, boolean_string) { - const sourcemeta::core::JSON type{"boolean"}; - const auto result{sourcemeta::core::parse_schema_type(type)}; - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::Boolean))); - EXPECT_EQ(result.count(), 1); -} - -TEST(JSONSchema_parse_type, object_string) { - const sourcemeta::core::JSON type{"object"}; - const auto result{sourcemeta::core::parse_schema_type(type)}; - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::Object))); - EXPECT_EQ(result.count(), 1); -} - -TEST(JSONSchema_parse_type, array_string) { - const sourcemeta::core::JSON type{"array"}; - const auto result{sourcemeta::core::parse_schema_type(type)}; - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::Array))); - EXPECT_EQ(result.count(), 1); -} - -TEST(JSONSchema_parse_type, number_string) { - const sourcemeta::core::JSON type{"number"}; - const auto result{sourcemeta::core::parse_schema_type(type)}; - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::Integer))); - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::Real))); - EXPECT_EQ(result.count(), 2); -} - -TEST(JSONSchema_parse_type, integer_string) { - const sourcemeta::core::JSON type{"integer"}; - const auto result{sourcemeta::core::parse_schema_type(type)}; - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::Integer))); - EXPECT_EQ(result.count(), 1); -} - -TEST(JSONSchema_parse_type, string_string) { - const sourcemeta::core::JSON type{"string"}; - const auto result{sourcemeta::core::parse_schema_type(type)}; - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::String))); - EXPECT_EQ(result.count(), 1); -} - -TEST(JSONSchema_parse_type, unknown_string) { - const sourcemeta::core::JSON type{"foo"}; - const auto result{sourcemeta::core::parse_schema_type(type)}; - EXPECT_EQ(result.count(), 0); -} - -TEST(JSONSchema_parse_type, array_single) { - const auto type{sourcemeta::core::parse_json(R"JSON([ "string" ])JSON")}; - const auto result{sourcemeta::core::parse_schema_type(type)}; - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::String))); - EXPECT_EQ(result.count(), 1); -} - -TEST(JSONSchema_parse_type, array_multiple) { - const auto type{sourcemeta::core::parse_json( - R"JSON([ "string", "null", "object" ])JSON")}; - const auto result{sourcemeta::core::parse_schema_type(type)}; - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::String))); - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::Null))); - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::Object))); - EXPECT_EQ(result.count(), 3); -} - -TEST(JSONSchema_parse_type, array_with_number) { - const auto type{ - sourcemeta::core::parse_json(R"JSON([ "number", "boolean" ])JSON")}; - const auto result{sourcemeta::core::parse_schema_type(type)}; - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::Integer))); - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::Real))); - EXPECT_TRUE(result.test( - static_cast(sourcemeta::core::JSON::Type::Boolean))); - EXPECT_EQ(result.count(), 3); -} - -TEST(JSONSchema_parse_type, array_empty) { - const auto type{sourcemeta::core::parse_json(R"JSON([])JSON")}; - const auto result{sourcemeta::core::parse_schema_type(type)}; - EXPECT_EQ(result.count(), 0); -} - -TEST(JSONSchema_parse_type, non_string_non_array) { - const sourcemeta::core::JSON type{42}; - const auto result{sourcemeta::core::parse_schema_type(type)}; - EXPECT_EQ(result.count(), 0); -} diff --git a/test/jsonschema/jsonschema_resolver_test.cc b/test/jsonschema/jsonschema_resolver_test.cc deleted file mode 100644 index 6fc242fa8..000000000 --- a/test/jsonschema/jsonschema_resolver_test.cc +++ /dev/null @@ -1,738 +0,0 @@ -#include - -#include -#include -#include - -#define EXPECT_SCHEMA(identifier) \ - { \ - const std::optional result{ \ - sourcemeta::core::schema_resolver(identifier)}; \ - EXPECT_TRUE(result.has_value()); \ - const sourcemeta::core::JSON &document{result.value()}; \ - EXPECT_TRUE(sourcemeta::core::is_schema(document)); \ - const auto id{sourcemeta::core::identify( \ - document, sourcemeta::core::schema_resolver)}; \ - EXPECT_EQ(sourcemeta::core::URI{id}.canonicalize().recompose(), \ - sourcemeta::core::URI{identifier}.canonicalize().recompose()); \ - } - -TEST(JSONSchema_resolver, jsonschema_2020_12) { - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/schema"); - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/meta/applicator"); - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/meta/content"); - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/meta/core"); - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/meta/format-annotation"); - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/meta/format-assertion"); - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/meta/hyper-schema"); - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/meta/meta-data"); - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/meta/unevaluated"); - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/meta/validation"); - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/links"); - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/output/schema"); - - // Just because a lot of people get this wrong - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/schema#"); - - // Take HTTP versions too - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/hyper-schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/hyper-schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/meta/applicator") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/meta/content") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/meta/core") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/meta/format-annotation") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/meta/format-assertion") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/meta/hyper-schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/meta/meta-data") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/meta/unevaluated") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/meta/validation") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/links") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2020-12/output/schema") - .has_value()); -} - -TEST(JSONSchema_resolver, jsonschema_2019_09) { - EXPECT_SCHEMA("https://json-schema.org/draft/2019-09/schema"); - EXPECT_SCHEMA("https://json-schema.org/draft/2019-09/meta/applicator"); - EXPECT_SCHEMA("https://json-schema.org/draft/2019-09/meta/content"); - EXPECT_SCHEMA("https://json-schema.org/draft/2019-09/meta/core"); - EXPECT_SCHEMA("https://json-schema.org/draft/2019-09/meta/format"); - EXPECT_SCHEMA("https://json-schema.org/draft/2019-09/meta/hyper-schema"); - EXPECT_SCHEMA("https://json-schema.org/draft/2019-09/meta/meta-data"); - EXPECT_SCHEMA("https://json-schema.org/draft/2019-09/meta/validation"); - EXPECT_SCHEMA("https://json-schema.org/draft/2019-09/output/schema"); - EXPECT_SCHEMA("https://json-schema.org/draft/2019-09/links"); - EXPECT_SCHEMA("https://json-schema.org/draft/2019-09/output/hyper-schema"); - - // Just because a lot of people get this wrong - EXPECT_SCHEMA("https://json-schema.org/draft/2019-09/schema#"); - - // Take HTTP versions too - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/hyper-schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/hyper-schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/meta/applicator") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/meta/content") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/meta/core") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/meta/format") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/meta/hyper-schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/meta/meta-data") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/meta/validation") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/links") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/output/schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft/2019-09/output/hyper-schema") - .has_value()); -} - -TEST(JSONSchema_resolver, jsonschema_draft7) { - EXPECT_SCHEMA("http://json-schema.org/draft-07/schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-07/hyper-schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-07/links#"); - EXPECT_SCHEMA("http://json-schema.org/draft-07/hyper-schema-output"); - - // Take canonicalized versions too - EXPECT_SCHEMA("http://json-schema.org/draft-07/schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-07/hyper-schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-07/links"); - - // Take HTTPS versions too - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-07/schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-07/schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-07/hyper-schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-07/hyper-schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-07/links#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-07/links") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-07/hyper-schema-output") - .has_value()); -} - -TEST(JSONSchema_resolver, jsonschema_draft6) { - EXPECT_SCHEMA("http://json-schema.org/draft-06/schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-06/hyper-schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-06/links#"); - - // Take canonicalized versions too - EXPECT_SCHEMA("http://json-schema.org/draft-06/schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-06/hyper-schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-06/links"); - - // Take HTTPS versions too - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-06/schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-06/schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-06/hyper-schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-06/hyper-schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-06/links#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-06/links") - .has_value()); -} - -TEST(JSONSchema_resolver, jsonschema_draft4) { - EXPECT_SCHEMA("http://json-schema.org/draft-04/schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-04/hyper-schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-04/links#"); - - // Take canonicalized versions too - EXPECT_SCHEMA("http://json-schema.org/draft-04/schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-04/hyper-schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-04/links"); - - // Take HTTPS versions too - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-04/schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-04/schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-04/hyper-schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-04/hyper-schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-04/links#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-04/links") - .has_value()); -} - -TEST(JSONSchema_resolver, jsonschema_draft3) { - EXPECT_SCHEMA("http://json-schema.org/draft-03/schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-03/hyper-schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-03/links#"); - EXPECT_SCHEMA("http://json-schema.org/draft-03/json-ref#"); - - // Take canonicalized versions too - EXPECT_SCHEMA("http://json-schema.org/draft-03/schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-03/hyper-schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-03/links"); - EXPECT_SCHEMA("http://json-schema.org/draft-03/json-ref"); - - // Take HTTPS versions too - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-03/schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-03/schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-03/hyper-schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-03/hyper-schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-03/links#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-03/links") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-03/json-ref#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-03/json-ref") - .has_value()); -} - -TEST(JSONSchema_resolver, jsonschema_draft2) { - EXPECT_SCHEMA("http://json-schema.org/draft-02/schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-02/hyper-schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-02/links#"); - EXPECT_SCHEMA("http://json-schema.org/draft-02/json-ref#"); - - // Take canonicalized versions too - EXPECT_SCHEMA("http://json-schema.org/draft-02/schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-02/hyper-schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-02/links"); - EXPECT_SCHEMA("http://json-schema.org/draft-02/json-ref"); - - // Take HTTPS versions too - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-02/schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-02/schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-02/hyper-schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-02/hyper-schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-02/links#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-02/links") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-02/json-ref#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-02/json-ref") - .has_value()); -} - -TEST(JSONSchema_resolver, jsonschema_draft1) { - EXPECT_SCHEMA("http://json-schema.org/draft-01/schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-01/hyper-schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-01/links#"); - EXPECT_SCHEMA("http://json-schema.org/draft-01/json-ref#"); - - // Take canonicalized versions too - EXPECT_SCHEMA("http://json-schema.org/draft-01/schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-01/hyper-schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-01/links"); - EXPECT_SCHEMA("http://json-schema.org/draft-01/json-ref"); - - // Take HTTPS versions too - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-01/schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-01/schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-01/hyper-schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-01/hyper-schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-01/links#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-01/links") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-01/json-ref#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-01/json-ref") - .has_value()); -} - -TEST(JSONSchema_resolver, jsonschema_draft0) { - EXPECT_SCHEMA("http://json-schema.org/draft-00/schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-00/hyper-schema#"); - EXPECT_SCHEMA("http://json-schema.org/draft-00/links#"); - EXPECT_SCHEMA("http://json-schema.org/draft-00/json-ref#"); - - // Take canonicalized versions too - EXPECT_SCHEMA("http://json-schema.org/draft-00/schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-00/hyper-schema"); - EXPECT_SCHEMA("http://json-schema.org/draft-00/links"); - EXPECT_SCHEMA("http://json-schema.org/draft-00/json-ref"); - - // Take HTTPS versions too - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-00/schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-00/schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-00/hyper-schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-00/hyper-schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-00/links#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-00/links") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-00/json-ref#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft-00/json-ref") - .has_value()); -} - -TEST(JSONSchema_resolver, openapi_3_1) { - EXPECT_SCHEMA("https://spec.openapis.org/oas/3.1/dialect/base"); - EXPECT_SCHEMA("https://spec.openapis.org/oas/3.1/meta/base"); -} - -TEST(JSONSchema_resolver, openapi_3_2) { - EXPECT_SCHEMA("https://spec.openapis.org/oas/3.2/dialect/2025-09-17"); - EXPECT_SCHEMA("https://spec.openapis.org/oas/3.2/meta/2025-09-17"); -} - -TEST(JSONSchema_resolver, idempotency) { - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/schema"); - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/schema"); - EXPECT_SCHEMA("https://json-schema.org/draft/2020-12/schema"); -} - -TEST(JSONSchema_resolver, invalid) { - const std::optional result{ - sourcemeta::core::schema_resolver("https://example.com/foobar")}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_resolver, is_known_schema_2020_12_http) { - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft/2020-12/schema")); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft/2020-12/schema#")); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft/2020-12/hyper-schema")); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft/2020-12/meta/applicator")); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft/2020-12/meta/core")); -} - -TEST(JSONSchema_resolver, is_known_schema_2019_09_http) { - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft/2019-09/schema")); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft/2019-09/schema#")); -} - -TEST(JSONSchema_resolver, is_known_schema_draft7_https) { - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://json-schema.org/draft-07/schema#")); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://json-schema.org/draft-07/schema")); -} - -TEST(JSONSchema_resolver, is_known_schema_draft4_https) { - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://json-schema.org/draft-04/schema#")); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://json-schema.org/draft-04/schema")); -} - -TEST(JSONSchema_resolver, is_known_schema_draft0_https) { - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://json-schema.org/draft-00/schema#")); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://json-schema.org/draft-00/schema")); -} - -TEST(JSONSchema_resolver, is_known_schema_2020_12) { - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://json-schema.org/draft/2020-12/schema")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://json-schema.org/draft/2020-12/schema#")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://json-schema.org/draft/2020-12/hyper-schema")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/hyper-schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://json-schema.org/draft/2020-12/meta/applicator")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/meta/applicator") - .has_value()); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://json-schema.org/draft/2020-12/meta/core")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2020-12/meta/core") - .has_value()); -} - -TEST(JSONSchema_resolver, is_known_schema_2019_09) { - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://json-schema.org/draft/2019-09/schema")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2019-09/schema") - .has_value()); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://json-schema.org/draft/2019-09/schema#")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://json-schema.org/draft/2019-09/schema#") - .has_value()); -} - -TEST(JSONSchema_resolver, is_known_schema_draft7) { - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft-07/schema#")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft-07/schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft-07/schema")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft-07/schema") - .has_value()); -} - -TEST(JSONSchema_resolver, is_known_schema_draft4) { - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft-04/schema#")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft-04/schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft-04/schema")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft-04/schema") - .has_value()); -} - -TEST(JSONSchema_resolver, is_known_schema_draft0) { - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft-00/schema#")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft-00/schema#") - .has_value()); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft-00/schema")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft-00/schema") - .has_value()); -} - -TEST(JSONSchema_resolver, is_known_schema_openapi_3_1) { - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://spec.openapis.org/oas/3.1/dialect/base")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://spec.openapis.org/oas/3.1/dialect/base") - .has_value()); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://spec.openapis.org/oas/3.1/meta/base")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://spec.openapis.org/oas/3.1/meta/base") - .has_value()); -} - -TEST(JSONSchema_resolver, is_known_schema_openapi_3_2) { - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://spec.openapis.org/oas/3.2/dialect/2025-09-17")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://spec.openapis.org/oas/3.2/dialect/2025-09-17") - .has_value()); - EXPECT_TRUE(sourcemeta::core::is_known_schema( - "https://spec.openapis.org/oas/3.2/meta/2025-09-17")); - EXPECT_TRUE(sourcemeta::core::schema_resolver( - "https://spec.openapis.org/oas/3.2/meta/2025-09-17") - .has_value()); -} - -TEST(JSONSchema_resolver, is_known_schema_unknown) { - EXPECT_FALSE(sourcemeta::core::is_known_schema("https://example.com/foobar")); - EXPECT_FALSE(sourcemeta::core::schema_resolver("https://example.com/foobar") - .has_value()); - EXPECT_FALSE(sourcemeta::core::is_known_schema("")); - EXPECT_FALSE(sourcemeta::core::schema_resolver("").has_value()); - EXPECT_FALSE(sourcemeta::core::is_known_schema( - "http://json-schema.org/draft-99/schema")); - EXPECT_FALSE(sourcemeta::core::schema_resolver( - "http://json-schema.org/draft-99/schema") - .has_value()); -} - -TEST(JSONSchema_resolver, is_official_schema_2020_12) { - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2020-12/schema")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2020-12/schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft/2020-12/schema")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2020-12/hyper-schema")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2020-12/meta/applicator")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2020-12/meta/core")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2020-12/meta/format-annotation")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2020-12/meta/format-assertion")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2020-12/meta/hyper-schema")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2020-12/meta/meta-data")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2020-12/meta/unevaluated")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2020-12/meta/validation")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2020-12/links")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2020-12/output/schema")); -} - -TEST(JSONSchema_resolver, is_official_schema_2019_09) { - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2019-09/schema")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2019-09/schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft/2019-09/schema")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2019-09/hyper-schema")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2019-09/meta/applicator")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2019-09/meta/core")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2019-09/meta/format")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2019-09/meta/hyper-schema")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2019-09/meta/meta-data")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2019-09/meta/validation")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2019-09/links")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2019-09/output/schema")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft/2019-09/output/hyper-schema")); -} - -TEST(JSONSchema_resolver, is_official_schema_draft7) { - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-07/schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-07/schema")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "https://json-schema.org/draft-07/schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-07/hyper-schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-07/links#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-07/hyper-schema-output")); -} - -TEST(JSONSchema_resolver, is_official_schema_draft6) { - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-06/schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-06/hyper-schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-06/links#")); -} - -TEST(JSONSchema_resolver, is_official_schema_draft4) { - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-04/schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-04/hyper-schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-04/links#")); -} - -TEST(JSONSchema_resolver, is_official_schema_draft3) { - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-03/schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-03/hyper-schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-03/links#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-03/json-ref#")); -} - -TEST(JSONSchema_resolver, is_official_schema_draft2) { - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-02/schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-02/hyper-schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-02/links#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-02/json-ref#")); -} - -TEST(JSONSchema_resolver, is_official_schema_draft1) { - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-01/schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-01/hyper-schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-01/links#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-01/json-ref#")); -} - -TEST(JSONSchema_resolver, is_official_schema_draft0) { - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-00/schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-00/hyper-schema#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-00/links#")); - EXPECT_TRUE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-00/json-ref#")); -} - -TEST(JSONSchema_resolver, is_official_schema_openapi_3_1) { - EXPECT_FALSE(sourcemeta::core::is_official_schema( - "https://spec.openapis.org/oas/3.1/dialect/base")); - EXPECT_FALSE(sourcemeta::core::is_official_schema( - "https://spec.openapis.org/oas/3.1/meta/base")); -} - -TEST(JSONSchema_resolver, is_official_schema_openapi_3_2) { - EXPECT_FALSE(sourcemeta::core::is_official_schema( - "https://spec.openapis.org/oas/3.2/dialect/2025-09-17")); - EXPECT_FALSE(sourcemeta::core::is_official_schema( - "https://spec.openapis.org/oas/3.2/meta/2025-09-17")); -} - -TEST(JSONSchema_resolver, is_official_schema_unknown) { - EXPECT_FALSE( - sourcemeta::core::is_official_schema("https://example.com/foobar")); - EXPECT_FALSE(sourcemeta::core::is_official_schema("")); - EXPECT_FALSE(sourcemeta::core::is_official_schema( - "http://json-schema.org/draft-99/schema")); -} diff --git a/test/jsonschema/jsonschema_test_utils.h b/test/jsonschema/jsonschema_test_utils.h deleted file mode 100644 index 3986da5a5..000000000 --- a/test/jsonschema/jsonschema_test_utils.h +++ /dev/null @@ -1,517 +0,0 @@ -#ifndef SOURCEMETA_CORE_JSONSCHEMA_TEST_UTILS_H_ -#define SOURCEMETA_CORE_JSONSCHEMA_TEST_UTILS_H_ - -#include -#include -#include -#include -#include - -#define EXPECT_VOCABULARY_KNOWN(vocabulary_value, expected_known) \ - EXPECT_TRUE(std::holds_alternative( \ - (vocabulary_value))); \ - EXPECT_EQ( \ - std::get((vocabulary_value)), \ - sourcemeta::core::Vocabularies::Known::expected_known) - -#define EXPECT_VOCABULARY_REQUIRED(vocabularies, expected_known) \ - EXPECT_TRUE( \ - (vocabularies) \ - .contains(sourcemeta::core::Vocabularies::Known::expected_known)); \ - EXPECT_TRUE((vocabularies) \ - .get(sourcemeta::core::Vocabularies::Known::expected_known) \ - .value()) - -#define EXPECT_VOCABULARY_OPTIONAL(vocabularies, expected_known) \ - EXPECT_TRUE( \ - (vocabularies) \ - .contains(sourcemeta::core::Vocabularies::Known::expected_known)); \ - EXPECT_FALSE((vocabularies) \ - .get(sourcemeta::core::Vocabularies::Known::expected_known) \ - .value()) - -#define EXPECT_OPTIONAL_POINTER(optional_value, expected_optional) \ - if (std::optional{expected_optional}.has_value()) { \ - EXPECT_TRUE((optional_value).has_value()); \ - EXPECT_EQ(sourcemeta::core::to_string((optional_value).value()), \ - std::optional{expected_optional}.value()); \ - } else { \ - EXPECT_FALSE((optional_value).has_value()); \ - } - -#define EXPECT_POINTER_TEMPLATE(pointer, expected) \ - { \ - std::ostringstream stream; \ - sourcemeta::core::stringify((pointer), stream); \ - EXPECT_EQ(stream.str(), (expected)); \ - } - -#define TO_POINTER(pointer_string) \ - sourcemeta::core::to_pointer((pointer_string)) - -#define EXPECT_FRAME(frame, expected_type, reference, root_id, \ - expected_pointer, expected_dialect, \ - expected_base_dialect, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan) \ - EXPECT_TRUE((frame).locations().contains({(expected_type), (reference)})); \ - EXPECT_EQ((frame).root(), (root_id)); \ - EXPECT_EQ( \ - sourcemeta::core::to_string( \ - (frame).locations().at({(expected_type), (reference)}).pointer), \ - (expected_pointer)); \ - EXPECT_EQ((frame).locations().at({(expected_type), (reference)}).dialect, \ - (expected_dialect)); \ - EXPECT_EQ((frame).locations().at({(expected_type), (reference)}).base, \ - (expected_base)); \ - EXPECT_TRUE( \ - (frame) \ - .traverse( \ - (frame).locations().at({(expected_type), (reference)}).base) \ - .has_value()); \ - EXPECT_EQ( \ - (frame).locations().at({(expected_type), (reference)}).base_dialect, \ - sourcemeta::core::SchemaBaseDialect::expected_base_dialect); \ - EXPECT_EQ(sourcemeta::core::to_string((frame).relative_instance_location( \ - (frame).locations().at({(expected_type), (reference)}))), \ - (expected_relative_pointer)); \ - EXPECT_OPTIONAL_POINTER( \ - (frame).locations().at({(expected_type), (reference)}).parent, \ - expected_parent); \ - EXPECT_EQ( \ - (frame).locations().at({(expected_type), (reference)}).property_name, \ - (expected_property_name)); \ - EXPECT_EQ((frame).locations().at({(expected_type), (reference)}).orphan, \ - (expected_orphan)); - -#define EXPECT_FRAME_STATIC( \ - frame, reference, root_id, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_base, expected_relative_pointer, \ - expected_parent, expected_property_name, expected_orphan) \ - EXPECT_FRAME(frame, sourcemeta::core::SchemaReferenceType::Static, \ - reference, root_id, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan) - -#define EXPECT_FRAME_STATIC_RESOURCE( \ - frame, reference, root_id, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_base, expected_relative_pointer, \ - expected_parent, expected_property_name, expected_orphan) \ - EXPECT_FRAME_STATIC(frame, reference, root_id, expected_pointer, \ - expected_dialect, expected_base_dialect, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan) \ - EXPECT_EQ( \ - (frame) \ - .locations() \ - .at({sourcemeta::core::SchemaReferenceType::Static, (reference)}) \ - .type, \ - sourcemeta::core::SchemaFrame::LocationType::Resource); - -#define EXPECT_FRAME_STATIC_POINTER( \ - frame, reference, root_id, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_base, expected_relative_pointer, \ - expected_parent, expected_property_name, expected_orphan) \ - EXPECT_FRAME_STATIC(frame, reference, root_id, expected_pointer, \ - expected_dialect, expected_base_dialect, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan) \ - EXPECT_EQ( \ - (frame) \ - .locations() \ - .at({sourcemeta::core::SchemaReferenceType::Static, (reference)}) \ - .type, \ - sourcemeta::core::SchemaFrame::LocationType::Pointer); - -#define EXPECT_FRAME_STATIC_SUBSCHEMA( \ - frame, reference, root_id, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_base, expected_relative_pointer, \ - expected_parent, expected_property_name, expected_orphan) \ - EXPECT_FRAME_STATIC(frame, reference, root_id, expected_pointer, \ - expected_dialect, expected_base_dialect, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan) \ - EXPECT_EQ( \ - (frame) \ - .locations() \ - .at({sourcemeta::core::SchemaReferenceType::Static, (reference)}) \ - .type, \ - sourcemeta::core::SchemaFrame::LocationType::Subschema); - -#define EXPECT_FRAME_STATIC_ANCHOR( \ - frame, reference, root_id, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_base, expected_relative_pointer, \ - expected_parent, expected_property_name, expected_orphan) \ - EXPECT_FRAME_STATIC(frame, reference, root_id, expected_pointer, \ - expected_dialect, expected_base_dialect, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan) \ - EXPECT_EQ( \ - (frame) \ - .locations() \ - .at({sourcemeta::core::SchemaReferenceType::Static, (reference)}) \ - .type, \ - sourcemeta::core::SchemaFrame::LocationType::Anchor); - -#define EXPECT_FRAME_DYNAMIC_ANCHOR( \ - frame, reference, root_id, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_base, expected_relative_pointer, \ - expected_parent, expected_property_name, expected_orphan) \ - EXPECT_FRAME_DYNAMIC(frame, reference, root_id, expected_pointer, \ - expected_dialect, expected_base_dialect, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan) \ - EXPECT_EQ( \ - (frame) \ - .locations() \ - .at({sourcemeta::core::SchemaReferenceType::Dynamic, (reference)}) \ - .type, \ - sourcemeta::core::SchemaFrame::LocationType::Anchor); - -#define EXPECT_FRAME_DYNAMIC( \ - frame, reference, root_id, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_base, expected_relative_pointer, \ - expected_parent, expected_property_name, expected_orphan) \ - EXPECT_FRAME(frame, sourcemeta::core::SchemaReferenceType::Dynamic, \ - reference, root_id, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_base, \ - expected_relative_pointer, expected_parent, \ - expected_property_name, expected_orphan) - -#define __EXPECT_ANONYMOUS_FRAME(frame, expected_type, reference, \ - expected_pointer, expected_dialect, \ - expected_base_dialect, expected_parent, \ - expected_property_name, expected_orphan) \ - EXPECT_TRUE((frame).locations().contains({(expected_type), (reference)})); \ - EXPECT_TRUE((frame).root().empty()); \ - EXPECT_EQ( \ - sourcemeta::core::to_string( \ - (frame).locations().at({(expected_type), (reference)}).pointer), \ - (expected_pointer)); \ - EXPECT_EQ((frame).locations().at({(expected_type), (reference)}).dialect, \ - (expected_dialect)); \ - EXPECT_EQ( \ - (frame).locations().at({(expected_type), (reference)}).base_dialect, \ - sourcemeta::core::SchemaBaseDialect::expected_base_dialect); \ - EXPECT_OPTIONAL_POINTER( \ - (frame).locations().at({(expected_type), (reference)}).parent, \ - expected_parent); \ - EXPECT_EQ( \ - (frame).locations().at({(expected_type), (reference)}).property_name, \ - (expected_property_name)); \ - EXPECT_EQ((frame).locations().at({(expected_type), (reference)}).orphan, \ - (expected_orphan)); - -#define EXPECT_ANONYMOUS_FRAME_STATIC(frame, reference, expected_pointer, \ - expected_dialect, expected_base_dialect, \ - expected_parent, expected_property_name, \ - expected_orphan) \ - __EXPECT_ANONYMOUS_FRAME( \ - frame, sourcemeta::core::SchemaReferenceType::Static, reference, \ - expected_pointer, expected_dialect, expected_base_dialect, \ - expected_parent, expected_property_name, expected_orphan) - -#define EXPECT_ANONYMOUS_FRAME_STATIC_RESOURCE( \ - frame, reference, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_parent, expected_property_name, \ - expected_orphan) \ - __EXPECT_ANONYMOUS_FRAME( \ - frame, sourcemeta::core::SchemaReferenceType::Static, reference, \ - expected_pointer, expected_dialect, expected_base_dialect, \ - expected_parent, expected_property_name, expected_orphan) \ - EXPECT_EQ( \ - (frame) \ - .locations() \ - .at({sourcemeta::core::SchemaReferenceType::Static, (reference)}) \ - .type, \ - sourcemeta::core::SchemaFrame::LocationType::Resource); - -#define EXPECT_ANONYMOUS_FRAME_STATIC_POINTER( \ - frame, reference, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_parent, expected_property_name, \ - expected_orphan) \ - __EXPECT_ANONYMOUS_FRAME( \ - frame, sourcemeta::core::SchemaReferenceType::Static, reference, \ - expected_pointer, expected_dialect, expected_base_dialect, \ - expected_parent, expected_property_name, expected_orphan) \ - EXPECT_EQ( \ - (frame) \ - .locations() \ - .at({sourcemeta::core::SchemaReferenceType::Static, (reference)}) \ - .type, \ - sourcemeta::core::SchemaFrame::LocationType::Pointer); - -#define EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA( \ - frame, reference, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_parent, expected_property_name, \ - expected_orphan) \ - __EXPECT_ANONYMOUS_FRAME( \ - frame, sourcemeta::core::SchemaReferenceType::Static, reference, \ - expected_pointer, expected_dialect, expected_base_dialect, \ - expected_parent, expected_property_name, expected_orphan) \ - EXPECT_EQ( \ - (frame) \ - .locations() \ - .at({sourcemeta::core::SchemaReferenceType::Static, (reference)}) \ - .type, \ - sourcemeta::core::SchemaFrame::LocationType::Subschema); - -#define EXPECT_ANONYMOUS_FRAME_STATIC_ANCHOR( \ - frame, reference, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_parent, expected_property_name, \ - expected_orphan) \ - __EXPECT_ANONYMOUS_FRAME( \ - frame, sourcemeta::core::SchemaReferenceType::Static, reference, \ - expected_pointer, expected_dialect, expected_base_dialect, \ - expected_parent, expected_property_name, expected_orphan) \ - EXPECT_EQ( \ - (frame) \ - .locations() \ - .at({sourcemeta::core::SchemaReferenceType::Static, (reference)}) \ - .type, \ - sourcemeta::core::SchemaFrame::LocationType::Anchor); - -#define EXPECT_ANONYMOUS_FRAME_DYNAMIC_ANCHOR( \ - frame, reference, expected_pointer, expected_dialect, \ - expected_base_dialect, expected_parent, expected_property_name, \ - expected_orphan) \ - __EXPECT_ANONYMOUS_FRAME( \ - frame, sourcemeta::core::SchemaReferenceType::Dynamic, reference, \ - expected_pointer, expected_dialect, expected_base_dialect, \ - expected_parent, expected_property_name, expected_orphan) \ - EXPECT_EQ( \ - (frame) \ - .locations() \ - .at({sourcemeta::core::SchemaReferenceType::Dynamic, (reference)}) \ - .type, \ - sourcemeta::core::SchemaFrame::LocationType::Anchor); - -#define EXPECT_REFERENCE(frame, expected_type, expected_pointer, expected_uri, \ - expected_base, expected_fragment, expected_original) \ - { \ - const auto __ref_pointer{TO_POINTER(expected_pointer)}; \ - const auto __ref_entry{(frame).reference( \ - expected_type, sourcemeta::core::to_weak_pointer(__ref_pointer))}; \ - EXPECT_TRUE(__ref_entry.has_value()); \ - EXPECT_EQ(__ref_entry->get().destination, (expected_uri)); \ - EXPECT_EQ(__ref_entry->get().base, (expected_base)); \ - EXPECT_EQ(__ref_entry->get().fragment, (expected_fragment)); \ - EXPECT_EQ(__ref_entry->get().original, (expected_original)); \ - } - -#define EXPECT_STATIC_REFERENCE(frame, expected_pointer, expected_uri, \ - expected_base, expected_fragment, \ - expected_original) \ - EXPECT_REFERENCE(frame, sourcemeta::core::SchemaReferenceType::Static, \ - expected_pointer, expected_uri, expected_base, \ - expected_fragment, expected_original) - -#define EXPECT_DYNAMIC_REFERENCE(frame, expected_pointer, expected_uri, \ - expected_base, expected_fragment, \ - expected_original) \ - EXPECT_REFERENCE(frame, sourcemeta::core::SchemaReferenceType::Dynamic, \ - expected_pointer, expected_uri, expected_base, \ - expected_fragment, expected_original) - -#define __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, expected_dialect, \ - expected_base_dialect) \ - EXPECT_EQ(sourcemeta::core::to_string(entries.at(index).pointer), \ - expected_schema_location); \ - EXPECT_OPTIONAL_POINTER(entries.at(index).parent, expected_parent_location); \ - EXPECT_FALSE(entries.at(index).dialect.empty()); \ - EXPECT_TRUE(entries.at(index).base_dialect.has_value()); \ - EXPECT_EQ(entries.at(index).dialect, expected_dialect); \ - EXPECT_EQ( \ - sourcemeta::core::to_string(entries.at(index).base_dialect.value()), \ - expected_base_dialect); \ - EXPECT_FALSE(entries.at(index).vocabularies.empty()); - -#define EXPECT_WALKER_ENTRY_2020_12(entries, index, expected_schema_location, \ - expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "https://json-schema.org/draft/2020-12/schema", \ - "https://json-schema.org/draft/2020-12/schema"); \ - EXPECT_FALSE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_2020_12_ORPHAN( \ - entries, index, expected_schema_location, expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "https://json-schema.org/draft/2020-12/schema", \ - "https://json-schema.org/draft/2020-12/schema"); \ - EXPECT_TRUE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_2019_09(entries, index, expected_schema_location, \ - expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "https://json-schema.org/draft/2019-09/schema", \ - "https://json-schema.org/draft/2019-09/schema"); \ - EXPECT_FALSE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_2019_09_ORPHAN( \ - entries, index, expected_schema_location, expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "https://json-schema.org/draft/2019-09/schema", \ - "https://json-schema.org/draft/2019-09/schema"); \ - EXPECT_TRUE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_DRAFT7(entries, index, expected_schema_location, \ - expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-07/schema#", \ - "http://json-schema.org/draft-07/schema#"); \ - EXPECT_FALSE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_DRAFT7_ORPHAN( \ - entries, index, expected_schema_location, expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-07/schema#", \ - "http://json-schema.org/draft-07/schema#"); \ - EXPECT_TRUE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_DRAFT6(entries, index, expected_schema_location, \ - expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-06/schema#", \ - "http://json-schema.org/draft-06/schema#"); \ - EXPECT_FALSE(entries.at(index).orphan); \ - EXPECT_FALSE(entries.at(index).property_name); - -#define EXPECT_WALKER_ENTRY_DRAFT6_ORPHAN( \ - entries, index, expected_schema_location, expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-06/schema#", \ - "http://json-schema.org/draft-06/schema#"); \ - EXPECT_TRUE(entries.at(index).orphan); \ - EXPECT_FALSE(entries.at(index).property_name); - -#define EXPECT_WALKER_ENTRY_DRAFT6_PROPERTY_NAME( \ - entries, index, expected_schema_location, expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-06/schema#", \ - "http://json-schema.org/draft-06/schema#"); \ - EXPECT_FALSE(entries.at(index).orphan); \ - EXPECT_TRUE(entries.at(index).property_name); - -#define EXPECT_WALKER_ENTRY_DRAFT4(entries, index, expected_schema_location, \ - expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-04/schema#", \ - "http://json-schema.org/draft-04/schema#"); \ - EXPECT_FALSE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_DRAFT4_ORPHAN( \ - entries, index, expected_schema_location, expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-04/schema#", \ - "http://json-schema.org/draft-04/schema#"); \ - EXPECT_TRUE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_DRAFT3(entries, index, expected_schema_location, \ - expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-03/schema#", \ - "http://json-schema.org/draft-03/schema#"); \ - EXPECT_FALSE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_DRAFT3_ORPHAN( \ - entries, index, expected_schema_location, expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-03/schema#", \ - "http://json-schema.org/draft-03/schema#"); \ - EXPECT_TRUE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_DRAFT2(entries, index, expected_schema_location, \ - expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-02/schema#", \ - "http://json-schema.org/draft-02/hyper-schema#"); \ - EXPECT_FALSE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_DRAFT2_ORPHAN( \ - entries, index, expected_schema_location, expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-02/schema#", \ - "http://json-schema.org/draft-02/hyper-schema#"); \ - EXPECT_TRUE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_DRAFT1(entries, index, expected_schema_location, \ - expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-01/schema#", \ - "http://json-schema.org/draft-01/hyper-schema#"); \ - EXPECT_FALSE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_DRAFT1_ORPHAN( \ - entries, index, expected_schema_location, expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-01/schema#", \ - "http://json-schema.org/draft-01/hyper-schema#"); \ - EXPECT_TRUE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_DRAFT0(entries, index, expected_schema_location, \ - expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-00/schema#", \ - "http://json-schema.org/draft-00/hyper-schema#"); \ - EXPECT_FALSE(entries.at(index).orphan); - -#define EXPECT_WALKER_ENTRY_DRAFT0_ORPHAN( \ - entries, index, expected_schema_location, expected_parent_location) \ - __EXPECT_WALKER_ENTRY(entries, index, expected_schema_location, \ - expected_parent_location, \ - "http://json-schema.org/draft-00/schema#", \ - "http://json-schema.org/draft-00/hyper-schema#"); \ - EXPECT_TRUE(entries.at(index).orphan); - -#define EXPECT_REFERENCE_TO(result, index, type, origin) \ - EXPECT_EQ((result).at((index)).get().first.first, \ - sourcemeta::core::SchemaReferenceType::type); \ - EXPECT_EQ( \ - sourcemeta::core::to_string((result).at((index)).get().first.second), \ - (origin)); - -#define EXPECT_FRAME_LOCATION_REACHABLE(frame, reference_type, reference, \ - base) \ - EXPECT_TRUE((frame).locations().contains( \ - {sourcemeta::core::SchemaReferenceType::reference_type, (reference)})); \ - EXPECT_TRUE((frame).traverse((base)).has_value()); \ - EXPECT_TRUE((frame).is_reachable( \ - (frame).traverse((base))->get(), \ - (frame).locations().at( \ - {sourcemeta::core::SchemaReferenceType::reference_type, \ - (reference)}), \ - sourcemeta::core::schema_walker, sourcemeta::core::schema_resolver)) - -#define EXPECT_FRAME_LOCATION_NON_REACHABLE(frame, reference_type, reference, \ - base) \ - EXPECT_TRUE((frame).locations().contains( \ - {sourcemeta::core::SchemaReferenceType::reference_type, (reference)})); \ - EXPECT_TRUE((frame).traverse((base)).has_value()); \ - EXPECT_FALSE((frame).is_reachable( \ - (frame).traverse((base))->get(), \ - (frame).locations().at( \ - {sourcemeta::core::SchemaReferenceType::reference_type, \ - (reference)}), \ - sourcemeta::core::schema_walker, sourcemeta::core::schema_resolver)) - -#endif diff --git a/test/jsonschema/jsonschema_vocabulary_2019_09_test.cc b/test/jsonschema/jsonschema_vocabulary_2019_09_test.cc deleted file mode 100644 index 483b5fe9a..000000000 --- a/test/jsonschema/jsonschema_vocabulary_2019_09_test.cc +++ /dev/null @@ -1,165 +0,0 @@ -#include - -#include -#include - -#include "jsonschema_test_utils.h" - -#include // std::string - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/2019-09-custom-vocabularies") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/2019-09-custom-vocabularies", - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/core": true, - "https://json-schema.org/draft/2019-09/vocab/applicator": true, - "https://json-schema.org/draft/2019-09/vocab/validation": false - } - })JSON"); - } else if (identifier == "https://sourcemeta.com/2019-09-no-vocabularies") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/2019-09-no-vocabularies", - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON"); - } else if (identifier == - "https://sourcemeta.com/2019-09-hyper-no-vocabularies") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/2019-09-hyper-no-vocabularies", - "$schema": "https://json-schema.org/draft/2019-09/hyper-schema" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_vocabulary_2019_09, parse_vocabularies_with_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/core": true, - "https://json-schema.org/draft/2019-09/vocab/applicator": true, - "https://json-schema.org/draft/2019-09/vocab/validation": false - } - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result->size(), 3); - EXPECT_VOCABULARY_REQUIRED(*result, JSON_Schema_2019_09_Core); - EXPECT_VOCABULARY_REQUIRED(*result, JSON_Schema_2019_09_Applicator); - EXPECT_VOCABULARY_OPTIONAL(*result, JSON_Schema_2019_09_Validation); -} - -TEST(JSONSchema_vocabulary_2019_09, parse_vocabularies_without_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "object" - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_2019_09, parse_vocabularies_boolean_schema) { - const sourcemeta::core::JSON document{true}; - const auto result{sourcemeta::core::parse_vocabularies( - document, test_resolver, "https://json-schema.org/draft/2019-09/schema")}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_2019_09, - parse_vocabularies_with_base_dialect_with_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/core": true, - "https://json-schema.org/draft/2019-09/vocab/applicator": true - } - })JSON"); - - const auto result{sourcemeta::core::parse_vocabularies( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09)}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result->size(), 2); - EXPECT_VOCABULARY_REQUIRED(*result, JSON_Schema_2019_09_Core); - EXPECT_VOCABULARY_REQUIRED(*result, JSON_Schema_2019_09_Applicator); -} - -TEST(JSONSchema_vocabulary_2019_09, - parse_vocabularies_with_base_dialect_without_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "type": "object" - })JSON"); - - const auto result{sourcemeta::core::parse_vocabularies( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_2019_09, - parse_vocabularies_with_base_dialect_hyper) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/core": true - } - })JSON"); - - const auto result{sourcemeta::core::parse_vocabularies( - document, - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09_Hyper)}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result->size(), 1); - EXPECT_VOCABULARY_REQUIRED(*result, JSON_Schema_2019_09_Core); -} - -TEST(JSONSchema_vocabulary_2019_09, no_vocabularies) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/2019-09-no-vocabularies" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2019_09_Core); -} - -TEST(JSONSchema_vocabulary_2019_09, no_vocabularies_hyper) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/2019-09-hyper-no-vocabularies" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2019_09_Core); -} - -TEST(JSONSchema_vocabulary_2019_09, hyper) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/hyper-schema" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 7); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2019_09_Core); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2019_09_Applicator); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2019_09_Validation); - EXPECT_VOCABULARY_OPTIONAL(vocabularies, JSON_Schema_2019_09_Format); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2019_09_Content); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2019_09_Meta_Data); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2019_09_Hyper_Schema); -} - -TEST(JSONSchema_vocabulary_2019_09, custom_vocabularies) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/2019-09-custom-vocabularies" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 3); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2019_09_Core); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2019_09_Applicator); - EXPECT_VOCABULARY_OPTIONAL(vocabularies, JSON_Schema_2019_09_Validation); -} diff --git a/test/jsonschema/jsonschema_vocabulary_2020_12_test.cc b/test/jsonschema/jsonschema_vocabulary_2020_12_test.cc deleted file mode 100644 index 8bf9f6414..000000000 --- a/test/jsonschema/jsonschema_vocabulary_2020_12_test.cc +++ /dev/null @@ -1,217 +0,0 @@ -#include - -#include -#include - -#include "jsonschema_test_utils.h" - -#include // std::string - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/2020-12-custom-vocabularies") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/2020-12-custom-vocabularies", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/validation": false - } - })JSON"); - } else if (identifier == "https://sourcemeta.com/optional-core") { - // Optional core - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/optional-core", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": false - } - })JSON"); - } else if (identifier == "https://sourcemeta.com/no-core") { - // Missing core - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/no-core", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/validation": true - } - })JSON"); - } else if (identifier == "https://sourcemeta.com/2020-12-no-vocabularies") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/2020-12-no-vocabularies", - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON"); - } else if (identifier == - "https://sourcemeta.com/2020-12-hyper-no-vocabularies") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/2020-12-hyper-no-vocabularies", - "$schema": "https://json-schema.org/draft/2020-12/hyper-schema" - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_vocabulary_2020_12, parse_vocabularies_with_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/validation": false - } - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result->size(), 3); - EXPECT_VOCABULARY_REQUIRED(*result, JSON_Schema_2020_12_Core); - EXPECT_VOCABULARY_REQUIRED(*result, JSON_Schema_2020_12_Applicator); - EXPECT_VOCABULARY_OPTIONAL(*result, JSON_Schema_2020_12_Validation); -} - -TEST(JSONSchema_vocabulary_2020_12, parse_vocabularies_without_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object" - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_2020_12, parse_vocabularies_boolean_schema) { - const sourcemeta::core::JSON document{true}; - const auto result{sourcemeta::core::parse_vocabularies( - document, test_resolver, "https://json-schema.org/draft/2020-12/schema")}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_2020_12, - parse_vocabularies_with_base_dialect_with_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true - } - })JSON"); - - const auto result{sourcemeta::core::parse_vocabularies( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12)}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result->size(), 2); - EXPECT_VOCABULARY_REQUIRED(*result, JSON_Schema_2020_12_Core); - EXPECT_VOCABULARY_REQUIRED(*result, JSON_Schema_2020_12_Applicator); -} - -TEST(JSONSchema_vocabulary_2020_12, - parse_vocabularies_with_base_dialect_without_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "type": "object" - })JSON"); - - const auto result{sourcemeta::core::parse_vocabularies( - document, sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_2020_12, - parse_vocabularies_with_base_dialect_hyper) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true - } - })JSON"); - - const auto result{sourcemeta::core::parse_vocabularies( - document, - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12_Hyper)}; - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result->size(), 1); - EXPECT_VOCABULARY_REQUIRED(*result, JSON_Schema_2020_12_Core); -} - -TEST(JSONSchema_vocabulary_2020_12, core_vocabularies_boolean_with_default) { - const sourcemeta::core::JSON document{true}; - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies( - document, test_resolver, - "https://sourcemeta.com/2020-12-custom-vocabularies")}; - EXPECT_EQ(vocabularies.size(), 3); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Core); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Applicator); - EXPECT_VOCABULARY_OPTIONAL(vocabularies, JSON_Schema_2020_12_Validation); -} - -TEST(JSONSchema_vocabulary_2020_12, - real_metaschema_takes_precedence_over_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/2020-12-no-vocabularies" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies( - document, test_resolver, - "https://sourcemeta.com/2020-12-custom-vocabularies")}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Core); -} - -TEST(JSONSchema_vocabulary_2020_12, core_cannot_be_optional) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/optional-core" - })JSON"); - - EXPECT_THROW(sourcemeta::core::vocabularies(document, test_resolver), - sourcemeta::core::SchemaError); -} - -TEST(JSONSchema_vocabulary_2020_12, core_must_be_declared) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/no-core" - })JSON"); - - EXPECT_THROW(sourcemeta::core::vocabularies(document, test_resolver), - sourcemeta::core::SchemaError); -} - -TEST(JSONSchema_vocabulary_2020_12, no_vocabularies) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/2020-12-no-vocabularies" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Core); -} - -TEST(JSONSchema_vocabulary_2020_12, no_vocabularies_hyper) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/2020-12-hyper-no-vocabularies" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Core); -} - -TEST(JSONSchema_vocabulary_2020_12, hyper) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/hyper-schema" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 8); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Core); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Applicator); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Unevaluated); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Validation); - EXPECT_VOCABULARY_REQUIRED(vocabularies, - JSON_Schema_2020_12_Format_Annotation); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Content); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Meta_Data); - // Notice this is 2019-09. That's actually correct. - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2019_09_Hyper_Schema); -} diff --git a/test/jsonschema/jsonschema_vocabulary_draft0_test.cc b/test/jsonschema/jsonschema_vocabulary_draft0_test.cc deleted file mode 100644 index a5a844166..000000000 --- a/test/jsonschema/jsonschema_vocabulary_draft0_test.cc +++ /dev/null @@ -1,98 +0,0 @@ -#include - -#include -#include - -#include "jsonschema_test_utils.h" - -#include // std::string - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/one-hop") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/one-hop", - "$schema": "http://json-schema.org/draft-00/schema#" - })JSON"); - } else if (identifier == "https://sourcemeta.com/with-vocabulary") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/with-vocabulary", - "$schema": "http://json-schema.org/draft-00/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/validation": false - } - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_vocabulary_draft0, parse_vocabularies_without_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#", - "type": "object" - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft0, parse_vocabularies_with_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true - } - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft0, schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_0); -} - -TEST(JSONSchema_vocabulary_draft0, hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/hyper-schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_0_Hyper); -} - -TEST(JSONSchema_vocabulary_draft0, one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/one-hop", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_0_Hyper); -} - -TEST(JSONSchema_vocabulary_draft0, ignore_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/with-vocabulary", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_0_Hyper); -} diff --git a/test/jsonschema/jsonschema_vocabulary_draft1_test.cc b/test/jsonschema/jsonschema_vocabulary_draft1_test.cc deleted file mode 100644 index d217b74fc..000000000 --- a/test/jsonschema/jsonschema_vocabulary_draft1_test.cc +++ /dev/null @@ -1,98 +0,0 @@ -#include - -#include -#include - -#include "jsonschema_test_utils.h" - -#include // std::string - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/one-hop") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/one-hop", - "$schema": "http://json-schema.org/draft-01/schema#" - })JSON"); - } else if (identifier == "https://sourcemeta.com/with-vocabulary") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/with-vocabulary", - "$schema": "http://json-schema.org/draft-01/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/validation": false - } - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_vocabulary_draft1, parse_vocabularies_without_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#", - "type": "object" - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft1, parse_vocabularies_with_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true - } - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft1, schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_1); -} - -TEST(JSONSchema_vocabulary_draft1, hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/hyper-schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_1_Hyper); -} - -TEST(JSONSchema_vocabulary_draft1, one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/one-hop", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_1_Hyper); -} - -TEST(JSONSchema_vocabulary_draft1, ignore_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/with-vocabulary", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_1_Hyper); -} diff --git a/test/jsonschema/jsonschema_vocabulary_draft2_test.cc b/test/jsonschema/jsonschema_vocabulary_draft2_test.cc deleted file mode 100644 index c58d135bf..000000000 --- a/test/jsonschema/jsonschema_vocabulary_draft2_test.cc +++ /dev/null @@ -1,98 +0,0 @@ -#include - -#include -#include - -#include "jsonschema_test_utils.h" - -#include // std::string - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/one-hop") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/one-hop", - "$schema": "http://json-schema.org/draft-02/schema#" - })JSON"); - } else if (identifier == "https://sourcemeta.com/with-vocabulary") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/with-vocabulary", - "$schema": "http://json-schema.org/draft-02/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/validation": false - } - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_vocabulary_draft2, parse_vocabularies_without_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#", - "type": "object" - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft2, parse_vocabularies_with_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true - } - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft2, schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_2); -} - -TEST(JSONSchema_vocabulary_draft2, hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/hyper-schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_2_Hyper); -} - -TEST(JSONSchema_vocabulary_draft2, one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/one-hop", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_2_Hyper); -} - -TEST(JSONSchema_vocabulary_draft2, ignore_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/with-vocabulary", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_2_Hyper); -} diff --git a/test/jsonschema/jsonschema_vocabulary_draft3_test.cc b/test/jsonschema/jsonschema_vocabulary_draft3_test.cc deleted file mode 100644 index c35a73443..000000000 --- a/test/jsonschema/jsonschema_vocabulary_draft3_test.cc +++ /dev/null @@ -1,98 +0,0 @@ -#include - -#include -#include - -#include "jsonschema_test_utils.h" - -#include // std::string - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/one-hop") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/one-hop", - "$schema": "http://json-schema.org/draft-03/schema#" - })JSON"); - } else if (identifier == "https://sourcemeta.com/with-vocabulary") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/with-vocabulary", - "$schema": "http://json-schema.org/draft-03/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/validation": false - } - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_vocabulary_draft3, parse_vocabularies_without_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "type": "object" - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft3, parse_vocabularies_with_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true - } - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft3, schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_3); -} - -TEST(JSONSchema_vocabulary_draft3, hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/hyper-schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_3_Hyper); -} - -TEST(JSONSchema_vocabulary_draft3, one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/one-hop", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_3); -} - -TEST(JSONSchema_vocabulary_draft3, ignore_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/with-vocabulary", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_3); -} diff --git a/test/jsonschema/jsonschema_vocabulary_draft4_test.cc b/test/jsonschema/jsonschema_vocabulary_draft4_test.cc deleted file mode 100644 index 527f239bd..000000000 --- a/test/jsonschema/jsonschema_vocabulary_draft4_test.cc +++ /dev/null @@ -1,98 +0,0 @@ -#include - -#include -#include - -#include "jsonschema_test_utils.h" - -#include // std::string - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/one-hop") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/one-hop", - "$schema": "http://json-schema.org/draft-04/schema#" - })JSON"); - } else if (identifier == "https://sourcemeta.com/with-vocabulary") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/with-vocabulary", - "$schema": "http://json-schema.org/draft-04/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/validation": false - } - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_vocabulary_draft4, parse_vocabularies_without_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object" - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft4, parse_vocabularies_with_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true - } - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft4, schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_4); -} - -TEST(JSONSchema_vocabulary_draft4, hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/hyper-schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_4_Hyper); -} - -TEST(JSONSchema_vocabulary_draft4, one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/one-hop", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_4); -} - -TEST(JSONSchema_vocabulary_draft4, ignore_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/with-vocabulary", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_4); -} diff --git a/test/jsonschema/jsonschema_vocabulary_draft6_test.cc b/test/jsonschema/jsonschema_vocabulary_draft6_test.cc deleted file mode 100644 index 22c937b59..000000000 --- a/test/jsonschema/jsonschema_vocabulary_draft6_test.cc +++ /dev/null @@ -1,98 +0,0 @@ -#include - -#include -#include - -#include "jsonschema_test_utils.h" - -#include // std::string - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/one-hop") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/one-hop", - "$schema": "http://json-schema.org/draft-06/schema#" - })JSON"); - } else if (identifier == "https://sourcemeta.com/with-vocabulary") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/with-vocabulary", - "$schema": "http://json-schema.org/draft-06/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/validation": false - } - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_vocabulary_draft6, parse_vocabularies_without_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "type": "object" - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft6, parse_vocabularies_with_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true - } - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft6, schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_6); -} - -TEST(JSONSchema_vocabulary_draft6, hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/hyper-schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_6_Hyper); -} - -TEST(JSONSchema_vocabulary_draft6, one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/one-hop", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_6); -} - -TEST(JSONSchema_vocabulary_draft6, ignore_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/with-vocabulary", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_6); -} diff --git a/test/jsonschema/jsonschema_vocabulary_draft7_test.cc b/test/jsonschema/jsonschema_vocabulary_draft7_test.cc deleted file mode 100644 index 5d92b8f68..000000000 --- a/test/jsonschema/jsonschema_vocabulary_draft7_test.cc +++ /dev/null @@ -1,98 +0,0 @@ -#include - -#include -#include - -#include "jsonschema_test_utils.h" - -#include // std::string - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/one-hop") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/one-hop", - "$schema": "http://json-schema.org/draft-07/schema#" - })JSON"); - } else if (identifier == "https://sourcemeta.com/with-vocabulary") { - return sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/with-vocabulary", - "$schema": "http://json-schema.org/draft-07/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/validation": false - } - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -TEST(JSONSchema_vocabulary_draft7, parse_vocabularies_without_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object" - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft7, parse_vocabularies_with_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true - } - })JSON"); - - const auto result{ - sourcemeta::core::parse_vocabularies(document, test_resolver)}; - EXPECT_FALSE(result.has_value()); -} - -TEST(JSONSchema_vocabulary_draft7, schema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_7); -} - -TEST(JSONSchema_vocabulary_draft7, hyperschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/hyper-schema#", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_7_Hyper); -} - -TEST(JSONSchema_vocabulary_draft7, one_hop) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/one-hop", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_7); -} - -TEST(JSONSchema_vocabulary_draft7, ignore_vocabulary) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/with-vocabulary", - "type": "object" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, test_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_7); -} diff --git a/test/jsonschema/jsonschema_vocabulary_test.cc b/test/jsonschema/jsonschema_vocabulary_test.cc deleted file mode 100644 index 397734346..000000000 --- a/test/jsonschema/jsonschema_vocabulary_test.cc +++ /dev/null @@ -1,661 +0,0 @@ -#include - -#include -#include - -#include "jsonschema_test_utils.h" - -#include // std::ostringstream -#include // std::unordered_set -#include // std::variant - -TEST(JSONSchema_vocabulary, core_vocabularies_boolean_without_default) { - const sourcemeta::core::JSON document{true}; - EXPECT_THROW(sourcemeta::core::vocabularies( - document, sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_vocabulary, unresolvable_dialect) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://non-existent.com/dialect" - })JSON"); - EXPECT_THROW(sourcemeta::core::vocabularies( - document, sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_vocabulary, override_returns_override_vocabularies) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "x-sourcemeta-dialect-override-subschema": - "https://json-schema.org/draft/2020-12/schema" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, - sourcemeta::core::schema_resolver)}; - EXPECT_EQ(vocabularies.size(), 7); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Core); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Applicator); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Unevaluated); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Validation); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Meta_Data); - EXPECT_VOCABULARY_REQUIRED(vocabularies, - JSON_Schema_2020_12_Format_Annotation); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_2020_12_Content); -} - -TEST(JSONSchema_vocabulary, override_only_returns_override_vocabularies) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "x-sourcemeta-dialect-override-subschema": - "http://json-schema.org/draft-07/schema#" - })JSON"); - const sourcemeta::core::Vocabularies vocabularies{ - sourcemeta::core::vocabularies(document, - sourcemeta::core::schema_resolver)}; - EXPECT_EQ(vocabularies.size(), 1); - EXPECT_VOCABULARY_REQUIRED(vocabularies, JSON_Schema_Draft_7); -} - -TEST(JSONSchema_vocabulary, override_unresolvable) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "x-sourcemeta-dialect-override-subschema": - "https://non-existent.com/dialect" - })JSON"); - EXPECT_THROW(sourcemeta::core::vocabularies( - document, sourcemeta::core::schema_resolver), - sourcemeta::core::SchemaResolutionError); -} - -TEST(JSONSchema_vocabulary, known_vocabulary_to_string) { - using Known = sourcemeta::core::Vocabularies::Known; - -#define EXPECT_VOCABULARY_URI(vocabulary, expected_uri) \ - { \ - std::ostringstream stream; \ - stream << vocabulary; \ - EXPECT_EQ(stream.str(), expected_uri); \ - } - - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_0, - "http://json-schema.org/draft-00/schema#"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_0_Hyper, - "http://json-schema.org/draft-00/hyper-schema#"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_1, - "http://json-schema.org/draft-01/schema#"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_1_Hyper, - "http://json-schema.org/draft-01/hyper-schema#"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_2, - "http://json-schema.org/draft-02/schema#"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_2_Hyper, - "http://json-schema.org/draft-02/hyper-schema#"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_3, - "http://json-schema.org/draft-03/schema#"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_3_Hyper, - "http://json-schema.org/draft-03/hyper-schema#"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_4, - "http://json-schema.org/draft-04/schema#"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_4_Hyper, - "http://json-schema.org/draft-04/hyper-schema#"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_6, - "http://json-schema.org/draft-06/schema#"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_6_Hyper, - "http://json-schema.org/draft-06/hyper-schema#"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_7, - "http://json-schema.org/draft-07/schema#"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_Draft_7_Hyper, - "http://json-schema.org/draft-07/hyper-schema#"); - - EXPECT_VOCABULARY_URI(Known::JSON_Schema_2019_09_Core, - "https://json-schema.org/draft/2019-09/vocab/core"); - EXPECT_VOCABULARY_URI( - Known::JSON_Schema_2019_09_Applicator, - "https://json-schema.org/draft/2019-09/vocab/applicator"); - EXPECT_VOCABULARY_URI( - Known::JSON_Schema_2019_09_Validation, - "https://json-schema.org/draft/2019-09/vocab/validation"); - EXPECT_VOCABULARY_URI( - Known::JSON_Schema_2019_09_Meta_Data, - "https://json-schema.org/draft/2019-09/vocab/meta-data"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_2019_09_Format, - "https://json-schema.org/draft/2019-09/vocab/format"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_2019_09_Content, - "https://json-schema.org/draft/2019-09/vocab/content"); - EXPECT_VOCABULARY_URI( - Known::JSON_Schema_2019_09_Hyper_Schema, - "https://json-schema.org/draft/2019-09/vocab/hyper-schema"); - - EXPECT_VOCABULARY_URI(Known::JSON_Schema_2020_12_Core, - "https://json-schema.org/draft/2020-12/vocab/core"); - EXPECT_VOCABULARY_URI( - Known::JSON_Schema_2020_12_Applicator, - "https://json-schema.org/draft/2020-12/vocab/applicator"); - EXPECT_VOCABULARY_URI( - Known::JSON_Schema_2020_12_Unevaluated, - "https://json-schema.org/draft/2020-12/vocab/unevaluated"); - EXPECT_VOCABULARY_URI( - Known::JSON_Schema_2020_12_Validation, - "https://json-schema.org/draft/2020-12/vocab/validation"); - EXPECT_VOCABULARY_URI( - Known::JSON_Schema_2020_12_Meta_Data, - "https://json-schema.org/draft/2020-12/vocab/meta-data"); - EXPECT_VOCABULARY_URI( - Known::JSON_Schema_2020_12_Format_Annotation, - "https://json-schema.org/draft/2020-12/vocab/format-annotation"); - EXPECT_VOCABULARY_URI( - Known::JSON_Schema_2020_12_Format_Assertion, - "https://json-schema.org/draft/2020-12/vocab/format-assertion"); - EXPECT_VOCABULARY_URI(Known::JSON_Schema_2020_12_Content, - "https://json-schema.org/draft/2020-12/vocab/content"); - - EXPECT_VOCABULARY_URI(Known::OpenAPI_3_1_Base, - "https://spec.openapis.org/oas/3.1/vocab/base"); - EXPECT_VOCABULARY_URI(Known::OpenAPI_3_2_Base, - "https://spec.openapis.org/oas/3.2/vocab/base"); - -#undef EXPECT_VOCABULARY_URI -} - -TEST(JSONSchema_vocabulary, throw_if_any_unsupported_all_supported_by_enum) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, - {Known::JSON_Schema_2020_12_Applicator, true}, - {Known::JSON_Schema_2020_12_Validation, false}}; - - const std::unordered_set supported{ - Known::JSON_Schema_2020_12_Core, Known::JSON_Schema_2020_12_Applicator}; - - EXPECT_NO_THROW(vocabularies.throw_if_any_unsupported( - supported, "Unsupported vocabulary")); -} - -TEST(JSONSchema_vocabulary, - throw_if_any_unsupported_all_supported_custom_by_string) { - using Known = sourcemeta::core::Vocabularies::Known; - - sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - vocabularies.insert("https://example.com/custom-vocab-1", true); - vocabularies.insert("https://example.com/custom-vocab-2", true); - - const std::unordered_set supported{ - Known::JSON_Schema_2020_12_Core, - sourcemeta::core::JSON::String{"https://example.com/custom-vocab-1"}, - sourcemeta::core::JSON::String{"https://example.com/custom-vocab-2"}}; - - EXPECT_NO_THROW(vocabularies.throw_if_any_unsupported( - supported, "Unsupported vocabulary")); -} - -TEST(JSONSchema_vocabulary, - throw_if_any_unsupported_mixed_known_enum_and_custom_string) { - using Known = sourcemeta::core::Vocabularies::Known; - - sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, - {Known::JSON_Schema_2020_12_Applicator, true}}; - vocabularies.insert("https://example.com/custom-vocab", true); - - const std::unordered_set supported{ - Known::JSON_Schema_2020_12_Core, Known::JSON_Schema_2020_12_Applicator, - sourcemeta::core::JSON::String{"https://example.com/custom-vocab"}}; - - EXPECT_NO_THROW(vocabularies.throw_if_any_unsupported( - supported, "Unsupported vocabulary")); -} - -TEST(JSONSchema_vocabulary, throw_if_any_unsupported_missing_required_known) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, - {Known::JSON_Schema_2020_12_Applicator, true}, - {Known::JSON_Schema_2020_12_Validation, true}}; - - const std::unordered_set supported{ - Known::JSON_Schema_2020_12_Core, Known::JSON_Schema_2020_12_Applicator}; - - try { - vocabularies.throw_if_any_unsupported(supported, "Unsupported vocabulary"); - FAIL(); - } catch (const sourcemeta::core::SchemaVocabularyError &error) { - EXPECT_EQ(error.uri(), - "https://json-schema.org/draft/2020-12/vocab/validation"); - EXPECT_STREQ(error.what(), "Unsupported vocabulary"); - } -} - -TEST(JSONSchema_vocabulary, throw_if_any_unsupported_missing_required_custom) { - using Known = sourcemeta::core::Vocabularies::Known; - - sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - vocabularies.insert("https://example.com/custom-vocab", true); - - const std::unordered_set supported{ - Known::JSON_Schema_2020_12_Core}; - - try { - vocabularies.throw_if_any_unsupported(supported, "Unsupported vocabulary"); - FAIL(); - } catch (const sourcemeta::core::SchemaVocabularyError &error) { - EXPECT_EQ(error.uri(), "https://example.com/custom-vocab"); - EXPECT_STREQ(error.what(), "Unsupported vocabulary"); - } -} - -TEST(JSONSchema_vocabulary, throw_if_any_unsupported_optional_not_checked) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, - {Known::JSON_Schema_2020_12_Validation, false}}; - - const std::unordered_set supported{ - Known::JSON_Schema_2020_12_Core}; - - EXPECT_NO_THROW(vocabularies.throw_if_any_unsupported( - supported, "Unsupported vocabulary")); -} - -TEST(JSONSchema_vocabulary, throw_if_any_unsupported_empty_vocabularies) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{}; - - const std::unordered_set supported{ - Known::JSON_Schema_2020_12_Core}; - - EXPECT_NO_THROW(vocabularies.throw_if_any_unsupported( - supported, "Unsupported vocabulary")); -} - -TEST(JSONSchema_vocabulary, - throw_if_any_unsupported_known_vocab_as_string_in_vocabularies) { - using Known = sourcemeta::core::Vocabularies::Known; - - sourcemeta::core::Vocabularies vocabularies{}; - vocabularies.insert("https://json-schema.org/draft/2020-12/vocab/core", true); - - const std::unordered_set supported{ - Known::JSON_Schema_2020_12_Core}; - - EXPECT_NO_THROW(vocabularies.throw_if_any_unsupported( - supported, "Unsupported vocabulary")); -} - -TEST(JSONSchema_vocabulary, - throw_if_any_unsupported_custom_supported_by_string) { - using Known = sourcemeta::core::Vocabularies::Known; - - sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - vocabularies.insert("https://example.com/custom-vocab", true); - - const std::unordered_set supported{ - Known::JSON_Schema_2020_12_Core, - sourcemeta::core::JSON::String{"https://example.com/custom-vocab"}}; - - EXPECT_NO_THROW(vocabularies.throw_if_any_unsupported( - supported, "Unsupported vocabulary")); -} - -TEST(JSONSchema_vocabulary, contains_any_empty_vocabularies) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{}; - - EXPECT_FALSE(vocabularies.contains_any({Known::JSON_Schema_2020_12_Core})); - EXPECT_FALSE( - vocabularies.contains_any({Known::JSON_Schema_2020_12_Core, - Known::JSON_Schema_2020_12_Applicator})); -} - -TEST(JSONSchema_vocabulary, contains_any_single_match) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - - EXPECT_TRUE(vocabularies.contains_any({Known::JSON_Schema_2020_12_Core})); - EXPECT_TRUE( - vocabularies.contains_any({Known::JSON_Schema_2020_12_Core, - Known::JSON_Schema_2020_12_Applicator})); - EXPECT_TRUE(vocabularies.contains_any({Known::JSON_Schema_2020_12_Applicator, - Known::JSON_Schema_2020_12_Core})); -} - -TEST(JSONSchema_vocabulary, contains_any_no_match) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - - EXPECT_FALSE( - vocabularies.contains_any({Known::JSON_Schema_2020_12_Applicator})); - EXPECT_FALSE(vocabularies.contains_any({Known::JSON_Schema_2020_12_Applicator, - Known::JSON_Schema_2020_12_Validation, - Known::JSON_Schema_2020_12_Content})); -} - -TEST(JSONSchema_vocabulary, contains_any_multiple_vocabularies) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, - {Known::JSON_Schema_2020_12_Applicator, true}, - {Known::JSON_Schema_2020_12_Validation, false}}; - - EXPECT_TRUE(vocabularies.contains_any({Known::JSON_Schema_2020_12_Core})); - EXPECT_TRUE( - vocabularies.contains_any({Known::JSON_Schema_2020_12_Applicator})); - EXPECT_TRUE( - vocabularies.contains_any({Known::JSON_Schema_2020_12_Validation})); - EXPECT_TRUE(vocabularies.contains_any( - {Known::JSON_Schema_2020_12_Content, Known::JSON_Schema_2020_12_Core})); - EXPECT_FALSE(vocabularies.contains_any( - {Known::JSON_Schema_2020_12_Content, Known::JSON_Schema_Draft_7})); -} - -TEST(JSONSchema_vocabulary, contains_any_empty_list) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - - EXPECT_FALSE(vocabularies.contains_any({})); -} - -TEST(JSONSchema_vocabulary, contains_any_matches_both_required_and_optional) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, - {Known::JSON_Schema_2020_12_Validation, false}}; - - EXPECT_TRUE(vocabularies.contains_any({Known::JSON_Schema_2020_12_Core})); - EXPECT_TRUE( - vocabularies.contains_any({Known::JSON_Schema_2020_12_Validation})); -} - -TEST(JSONSchema_vocabulary, uri_to_string_known_variant) { - using Known = sourcemeta::core::Vocabularies::Known; - using URI = sourcemeta::core::Vocabularies::URI; - - const URI vocabulary{Known::JSON_Schema_2020_12_Core}; - std::ostringstream stream; - stream << vocabulary; - EXPECT_EQ(stream.str(), "https://json-schema.org/draft/2020-12/vocab/core"); -} - -TEST(JSONSchema_vocabulary, uri_to_string_custom_variant) { - using URI = sourcemeta::core::Vocabularies::URI; - - const URI vocabulary{ - sourcemeta::core::JSON::String{"https://example.com/custom-vocab"}}; - std::ostringstream stream; - stream << vocabulary; - EXPECT_EQ(stream.str(), "https://example.com/custom-vocab"); -} - -TEST(JSONSchema_vocabulary, to_string_known) { - using Known = sourcemeta::core::Vocabularies::Known; - - EXPECT_EQ(sourcemeta::core::to_string(Known::JSON_Schema_2020_12_Core), - "https://json-schema.org/draft/2020-12/vocab/core"); - EXPECT_EQ(sourcemeta::core::to_string(Known::JSON_Schema_2019_09_Applicator), - "https://json-schema.org/draft/2019-09/vocab/applicator"); - EXPECT_EQ(sourcemeta::core::to_string(Known::JSON_Schema_Draft_7), - "http://json-schema.org/draft-07/schema#"); - EXPECT_EQ(sourcemeta::core::to_string(Known::OpenAPI_3_1_Base), - "https://spec.openapis.org/oas/3.1/vocab/base"); - EXPECT_EQ(sourcemeta::core::to_string(Known::OpenAPI_3_2_Base), - "https://spec.openapis.org/oas/3.2/vocab/base"); -} - -TEST(JSONSchema_vocabulary, to_string_uri_known_variant) { - using Known = sourcemeta::core::Vocabularies::Known; - using URI = sourcemeta::core::Vocabularies::URI; - - const URI vocabulary{Known::JSON_Schema_2020_12_Validation}; - EXPECT_EQ(sourcemeta::core::to_string(vocabulary), - "https://json-schema.org/draft/2020-12/vocab/validation"); -} - -TEST(JSONSchema_vocabulary, to_string_uri_custom_variant) { - using URI = sourcemeta::core::Vocabularies::URI; - - const URI vocabulary{ - sourcemeta::core::JSON::String{"https://example.com/my-vocab"}}; - EXPECT_EQ(sourcemeta::core::to_string(vocabulary), - "https://example.com/my-vocab"); -} - -TEST(JSONSchema_vocabulary, has_unknown_empty_vocabularies) { - const sourcemeta::core::Vocabularies vocabularies{}; - EXPECT_FALSE(vocabularies.has_unknown()); -} - -TEST(JSONSchema_vocabulary, has_unknown_only_known_required) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, - {Known::JSON_Schema_2020_12_Applicator, true}}; - - EXPECT_FALSE(vocabularies.has_unknown()); -} - -TEST(JSONSchema_vocabulary, has_unknown_only_known_optional) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, - {Known::JSON_Schema_2020_12_Validation, false}}; - - EXPECT_FALSE(vocabularies.has_unknown()); -} - -TEST(JSONSchema_vocabulary, has_unknown_with_custom_required) { - using Known = sourcemeta::core::Vocabularies::Known; - - sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - vocabularies.insert("https://example.com/custom-vocab", true); - - EXPECT_TRUE(vocabularies.has_unknown()); -} - -TEST(JSONSchema_vocabulary, has_unknown_with_custom_optional) { - using Known = sourcemeta::core::Vocabularies::Known; - - sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - vocabularies.insert("https://example.com/custom-vocab", false); - - EXPECT_TRUE(vocabularies.has_unknown()); -} - -TEST(JSONSchema_vocabulary, has_unknown_with_multiple_custom) { - using Known = sourcemeta::core::Vocabularies::Known; - - sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - vocabularies.insert("https://example.com/custom-vocab-1", true); - vocabularies.insert("https://example.com/custom-vocab-2", false); - - EXPECT_TRUE(vocabularies.has_unknown()); -} - -TEST(JSONSchema_vocabulary, throw_if_any_unknown_required_empty) { - const sourcemeta::core::Vocabularies vocabularies{}; - EXPECT_NO_THROW( - vocabularies.throw_if_any_unknown_required("Unknown vocabulary")); -} - -TEST(JSONSchema_vocabulary, throw_if_any_unknown_required_only_known) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, - {Known::JSON_Schema_2020_12_Applicator, true}}; - - EXPECT_NO_THROW( - vocabularies.throw_if_any_unknown_required("Unknown vocabulary")); -} - -TEST(JSONSchema_vocabulary, throw_if_any_unknown_required_only_optional) { - using Known = sourcemeta::core::Vocabularies::Known; - - sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - vocabularies.insert("https://example.com/custom-vocab", false); - - EXPECT_NO_THROW( - vocabularies.throw_if_any_unknown_required("Unknown vocabulary")); -} - -TEST(JSONSchema_vocabulary, throw_if_any_unknown_required_with_required) { - using Known = sourcemeta::core::Vocabularies::Known; - - sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - vocabularies.insert("https://example.com/custom-vocab", true); - - try { - vocabularies.throw_if_any_unknown_required("Unknown vocabulary"); - FAIL(); - } catch (const sourcemeta::core::SchemaVocabularyError &error) { - EXPECT_EQ(error.uri(), "https://example.com/custom-vocab"); - EXPECT_STREQ(error.what(), "Unknown vocabulary"); - } -} - -TEST(JSONSchema_vocabulary, - throw_if_any_unknown_required_mixed_required_optional) { - using Known = sourcemeta::core::Vocabularies::Known; - - sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - vocabularies.insert("https://example.com/optional-vocab", false); - vocabularies.insert("https://example.com/required-vocab", true); - - try { - vocabularies.throw_if_any_unknown_required("Unknown vocabulary"); - FAIL(); - } catch (const sourcemeta::core::SchemaVocabularyError &error) { - EXPECT_EQ(error.uri(), "https://example.com/required-vocab"); - EXPECT_STREQ(error.what(), "Unknown vocabulary"); - } -} - -TEST(JSONSchema_vocabulary, contains_any_openapi_3_1_base) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, {Known::OpenAPI_3_1_Base, true}}; - - EXPECT_TRUE(vocabularies.contains_any({Known::OpenAPI_3_1_Base})); - EXPECT_TRUE(vocabularies.contains_any( - {Known::OpenAPI_3_1_Base, Known::OpenAPI_3_2_Base})); - EXPECT_FALSE(vocabularies.contains_any({Known::OpenAPI_3_2_Base})); -} - -TEST(JSONSchema_vocabulary, contains_any_openapi_3_2_base) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, {Known::OpenAPI_3_2_Base, true}}; - - EXPECT_TRUE(vocabularies.contains_any({Known::OpenAPI_3_2_Base})); - EXPECT_TRUE(vocabularies.contains_any( - {Known::OpenAPI_3_1_Base, Known::OpenAPI_3_2_Base})); - EXPECT_FALSE(vocabularies.contains_any({Known::OpenAPI_3_1_Base})); -} - -TEST(JSONSchema_vocabulary, insert_openapi_3_1_base_by_string) { - using Known = sourcemeta::core::Vocabularies::Known; - - sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - vocabularies.insert("https://spec.openapis.org/oas/3.1/vocab/base", true); - - EXPECT_EQ(vocabularies.size(), 2); - EXPECT_TRUE(vocabularies.contains(Known::OpenAPI_3_1_Base)); - EXPECT_TRUE(vocabularies.get(Known::OpenAPI_3_1_Base).value()); - EXPECT_FALSE(vocabularies.has_unknown()); -} - -TEST(JSONSchema_vocabulary, insert_openapi_3_2_base_by_string) { - using Known = sourcemeta::core::Vocabularies::Known; - - sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}}; - vocabularies.insert("https://spec.openapis.org/oas/3.2/vocab/base", false); - - EXPECT_EQ(vocabularies.size(), 2); - EXPECT_TRUE(vocabularies.contains(Known::OpenAPI_3_2_Base)); - EXPECT_FALSE(vocabularies.get(Known::OpenAPI_3_2_Base).value()); - EXPECT_FALSE(vocabularies.has_unknown()); -} - -TEST(JSONSchema_vocabulary, - throw_if_any_unsupported_openapi_required_not_in_supported) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, {Known::OpenAPI_3_1_Base, true}}; - - const std::unordered_set supported{ - Known::JSON_Schema_2020_12_Core}; - - try { - vocabularies.throw_if_any_unsupported(supported, "Unsupported vocabulary"); - FAIL(); - } catch (const sourcemeta::core::SchemaVocabularyError &error) { - EXPECT_EQ(error.uri(), "https://spec.openapis.org/oas/3.1/vocab/base"); - EXPECT_STREQ(error.what(), "Unsupported vocabulary"); - } -} - -TEST(JSONSchema_vocabulary, - throw_if_any_unsupported_openapi_optional_not_checked) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, - {Known::OpenAPI_3_1_Base, false}}; - - const std::unordered_set supported{ - Known::JSON_Schema_2020_12_Core}; - - EXPECT_NO_THROW(vocabularies.throw_if_any_unsupported( - supported, "Unsupported vocabulary")); -} - -TEST(JSONSchema_vocabulary, throw_if_any_unsupported_openapi_in_supported) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, {Known::OpenAPI_3_1_Base, true}}; - - const std::unordered_set supported{ - Known::JSON_Schema_2020_12_Core, Known::OpenAPI_3_1_Base}; - - EXPECT_NO_THROW(vocabularies.throw_if_any_unsupported( - supported, "Unsupported vocabulary")); -} - -TEST(JSONSchema_vocabulary, has_unknown_with_openapi_vocabularies) { - using Known = sourcemeta::core::Vocabularies::Known; - - const sourcemeta::core::Vocabularies vocabularies{ - {Known::JSON_Schema_2020_12_Core, true}, - {Known::OpenAPI_3_1_Base, true}, - {Known::OpenAPI_3_2_Base, false}}; - - EXPECT_FALSE(vocabularies.has_unknown()); -} diff --git a/test/jsonschema/jsonschema_walker_2019_09_test.cc b/test/jsonschema/jsonschema_walker_2019_09_test.cc deleted file mode 100644 index 90eca3d25..000000000 --- a/test/jsonschema/jsonschema_walker_2019_09_test.cc +++ /dev/null @@ -1,1850 +0,0 @@ -#include - -#include - -#include - -#include "jsonschema_test_utils.h" - -#include // std::string_view -#include // std::unordered_set - -static const sourcemeta::core::Vocabularies VOCABULARIES_2019_09_CORE{ - {"https://json-schema.org/draft/2019-09/vocab/core", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_2019_09_APPLICATOR{ - {"https://json-schema.org/draft/2019-09/vocab/core", true}, - {"https://json-schema.org/draft/2019-09/vocab/applicator", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_2019_09_VALIDATION{ - {"https://json-schema.org/draft/2019-09/vocab/core", true}, - {"https://json-schema.org/draft/2019-09/vocab/validation", true}}; - -static const sourcemeta::core::Vocabularies - VOCABULARIES_2019_09_APPLICATOR_AND_VALIDATION{ - {"https://json-schema.org/draft/2019-09/vocab/core", true}, - {"https://json-schema.org/draft/2019-09/vocab/applicator", true}, - {"https://json-schema.org/draft/2019-09/vocab/validation", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_2019_09_FORMAT{ - {"https://json-schema.org/draft/2019-09/vocab/core", true}, - {"https://json-schema.org/draft/2019-09/vocab/format", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_2019_09_CONTENT{ - {"https://json-schema.org/draft/2019-09/vocab/core", true}, - {"https://json-schema.org/draft/2019-09/vocab/content", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_2019_09_METADATA{ - {"https://json-schema.org/draft/2019-09/vocab/core", true}, - {"https://json-schema.org/draft/2019-09/vocab/meta-data", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_2019_09_HYPERSCHEMA{ - {"https://json-schema.org/draft/2019-09/vocab/core", true}, - {"https://json-schema.org/draft/2019-09/vocab/hyper-schema", true}}; - -TEST(JSONSchema_walker_2019_09, core_schema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$schema", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2019_09_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, core_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$vocabulary", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2019_09_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, core_id) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$id", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2019_09_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, core_anchor) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$anchor", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2019_09_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, core_recursiveAnchor) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("$recursiveAnchor", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2019_09_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, core_ref) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$ref", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2019_09_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, core_recursiveRef) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$recursiveRef", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2019_09_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, core_defs) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$defs", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::LocationMembers); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2019_09_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, core_comment) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$comment", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2019_09_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_allOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("allOf", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_anyOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anyOf", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_oneOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("oneOf", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_not) { - using namespace sourcemeta::core; - const auto &result{schema_walker("not", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceNegate); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_if) { - using namespace sourcemeta::core; - const auto &result{schema_walker("if", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceMaybe); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_then) { - using namespace sourcemeta::core; - const auto &result{schema_walker("then", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceMaybe); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - const std::unordered_set expected{"if"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_else) { - using namespace sourcemeta::core; - const auto &result{schema_walker("else", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceMaybe); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - const std::unordered_set expected{"if"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_dependentSchemas) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("dependentSchemas", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembersInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2019_09, applicator_items) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueOrElementsTraverseAnyItemOrItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2019_09, applicator_additionalItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalItems", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseSomeItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - const std::unordered_set expected{"items"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2019_09, applicator_contains_only) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contains", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseAnyItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2019_09, applicator_contains_with_validation) { - using namespace sourcemeta::core; - const auto &result{schema_walker( - "contains", VOCABULARIES_2019_09_APPLICATOR_AND_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseAnyItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - const std::unordered_set expected{"minContains", - "maxContains"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2019_09, applicator_properties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("properties", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2019_09, applicator_patternProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("patternProperties", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyRegex); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2019_09, applicator_additionalProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - const std::unordered_set expected{"properties", - "patternProperties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2019_09, applicator_propertyNames) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("propertyNames", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseAnyPropertyKey); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2019_09, applicator_unevaluatedItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("unevaluatedItems", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseSomeItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - const std::unordered_set expected{"items", - "additionalItems"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2019_09, applicator_unevaluatedProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("unevaluatedProperties", VOCABULARIES_2019_09_APPLICATOR)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Applicator); - const std::unordered_set expected{ - "properties", "patternProperties", "additionalProperties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2019_09, validation_type) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_enum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_const) { - using namespace sourcemeta::core; - const auto &result{schema_walker("const", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_multipleOf) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("multipleOf", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_2019_09, validation_maximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - const std::unordered_set expected{"type"}; - EXPECT_EQ(result.order_dependencies, expected); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_2019_09, validation_minimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - const std::unordered_set expected{"type"}; - EXPECT_EQ(result.order_dependencies, expected); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_2019_09, validation_exclusiveMaximum) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("exclusiveMaximum", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_2019_09, validation_exclusiveMinimum) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("exclusiveMinimum", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_2019_09, validation_maxLength) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxLength", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2019_09, validation_minLength) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minLength", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2019_09, validation_pattern) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2019_09, validation_maxItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxItems", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2019_09, validation_minItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minItems", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2019_09, validation_uniqueItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("uniqueItems", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2019_09, validation_maxContains) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxContains", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2019_09, validation_minContains) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minContains", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2019_09, validation_maxProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxProperties", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2019_09, validation_minProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minProperties", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2019_09, validation_required) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("required", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2019_09, validation_dependentRequired) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("dependentRequired", VOCABULARIES_2019_09_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2019_09, format_format) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_2019_09_FORMAT)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Format); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2019_09, content_contentEncoding) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentEncoding", VOCABULARIES_2019_09_CONTENT)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Content); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2019_09, content_contentMediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentMediaType", VOCABULARIES_2019_09_CONTENT)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Content); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2019_09, content_contentSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentSchema", VOCABULARIES_2019_09_CONTENT)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Content); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2019_09, metadata_title) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_2019_09_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, metadata_description) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("description", VOCABULARIES_2019_09_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, metadata_default) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_2019_09_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, metadata_deprecated) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("deprecated", VOCABULARIES_2019_09_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, metadata_readOnly) { - using namespace sourcemeta::core; - const auto &result{schema_walker("readOnly", VOCABULARIES_2019_09_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, metadata_writeOnly) { - using namespace sourcemeta::core; - const auto &result{schema_walker("writeOnly", VOCABULARIES_2019_09_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, metadata_examples) { - using namespace sourcemeta::core; - const auto &result{schema_walker("examples", VOCABULARIES_2019_09_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_base) { - using namespace sourcemeta::core; - const auto &result{schema_walker("base", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_links) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_href) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_anchor) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anchor", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_anchorPointer) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("anchorPointer", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_rel) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_templatePointers) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("templatePointers", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_templateRequired) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("templateRequired", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_targetMediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetMediaType", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_targetHints) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetHints", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_submissionMediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("submissionMediaType", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_hrefSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("hrefSchema", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_targetSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetSchema", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_headerSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("headerSchema", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_submissionSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("submissionSchema", VOCABULARIES_2019_09_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_allOf_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("allOf", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_anyOf_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anyOf", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_oneOf_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("oneOf", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_not_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("not", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_if_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("if", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_then_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("then", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_else_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("else", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, - applicator_dependentSchemas_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("dependentSchemas", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_additionalItems_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalItems", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_items_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_contains_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("contains", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_properties_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("properties", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, - applicator_patternProperties_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("patternProperties", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, - applicator_additionalProperties_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, applicator_propertyNames_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("propertyNames", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, - applicator_unevaluatedItems_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("unevaluatedItems", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, - applicator_unevaluatedProperties_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("unevaluatedProperties", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_type_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_enum_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_const_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("const", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_multipleOf_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("multipleOf", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_maximum_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_minimum_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, - validation_exclusiveMaximum_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("exclusiveMaximum", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, - validation_exclusiveMinimum_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("exclusiveMinimum", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_maxLength_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxLength", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_minLength_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minLength", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_pattern_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_maxItems_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxItems", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_minItems_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minItems", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_uniqueItems_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("uniqueItems", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_maxContains_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxContains", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_minContains_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minContains", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_maxProperties_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxProperties", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_minProperties_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minProperties", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, validation_required_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("required", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, - validation_dependentRequired_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("dependentRequired", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, format_format_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, content_contentEncoding_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentEncoding", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, content_contentMediaType_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentMediaType", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, content_contentSchema_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("contentSchema", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, metadata_title_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, metadata_description_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("description", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, metadata_default_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, metadata_deprecated_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("deprecated", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, metadata_readOnly_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("readOnly", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, metadata_writeOnly_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("writeOnly", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, metadata_examples_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("examples", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_base_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("base", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_links_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_ref_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("ref", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_href_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_anchor_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anchor", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_anchorPointer_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anchorPointer", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_rel_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, - hyperschema_templatePointers_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("templatePointers", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, - hyperschema_templateRequired_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("templateRequired", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, - hyperschema_targetMediaType_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetMediaType", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_targetHints_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("targetHints", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, - hyperschema_submissionMediaType_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("submissionMediaType", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_hrefSchema_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("hrefSchema", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_targetSchema_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("targetSchema", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, hyperschema_headerSchema_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("headerSchema", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, - hyperschema_submissionSchema_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("submissionSchema", VOCABULARIES_2019_09_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2019_09, schema_keyword_priority_array) { - const auto &vocabularies = VOCABULARIES_2019_09_APPLICATOR_AND_VALIDATION; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("items", vocabularies, walker), 0); - EXPECT_EQ(schema_keyword_priority("additionalItems", vocabularies, walker), - 1); - EXPECT_EQ(schema_keyword_priority("minContains", vocabularies, walker), 0); - EXPECT_EQ(schema_keyword_priority("maxContains", vocabularies, walker), 0); - EXPECT_EQ(schema_keyword_priority("contains", vocabularies, walker), 1); - EXPECT_EQ(schema_keyword_priority("unevaluatedItems", vocabularies, walker), - 2); -} - -TEST(JSONSchema_walker_2019_09, schema_keyword_priority_object) { - const auto &vocabularies = VOCABULARIES_2019_09_APPLICATOR; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 0); - EXPECT_EQ(schema_keyword_priority("patternProperties", vocabularies, walker), - 0); - EXPECT_EQ( - schema_keyword_priority("additionalProperties", vocabularies, walker), 1); - EXPECT_EQ( - schema_keyword_priority("unevaluatedProperties", vocabularies, walker), - 2); -} - -TEST(JSONSchema_walker_2019_09, schema_keyword_priority_other) { - const auto &vocabularies = VOCABULARIES_2019_09_APPLICATOR; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("if", vocabularies, walker), 0); - EXPECT_EQ(schema_keyword_priority("then", vocabularies, walker), 1); - EXPECT_EQ(schema_keyword_priority("else", vocabularies, walker), 1); -} - -TEST(JSONSchema_walker_2019_09, schema_keyword_priority_unknown) { - const auto &vocabularies = VOCABULARIES_2019_09_CORE; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 0); -} - -TEST(JSONSchema_walker_2019_09, instance_locations) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "allOf": [ { "type": "string" }, { "minLength": 3 } ], - "anyOf": [ { "type": "string" } ], - "oneOf": [ { "type": "string" } ], - "if": { "const": "foo" }, - "then": true, - "else": { "maxLength": 10 }, - "not": { "const": "bar" }, - "properties": { - "foo": { "type": "string" }, - "bar": false - }, - "additionalProperties": { "type": "number" }, - "patternProperties": { - "^f": { "type": "integer" }, - "x$": true - }, - "dependentSchemas": { - "foo": { "minProperties": 1 }, - "bar": { "maxProperties": 10 } - }, - "propertyNames": { "minLength": 1 }, - "contains": { "type": "number" }, - "additionalItems": { "minimum": 2 }, - "items": { "items": [ true, false ] }, - "unevaluatedProperties": { "type": "number" }, - "unevaluatedItems": { "minimum": 2 }, - "contentSchema": { "type": "string" }, - "$defs": { - "foo": { - "properties": { - "bar": { "type": "string" } - } - } - }, - "definitions": { "foo": true } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 28); - - EXPECT_WALKER_ENTRY_2019_09(entries, 0, "", std::nullopt); - - // Applicator vocabulary (any) - EXPECT_WALKER_ENTRY_2019_09(entries, 1, "/allOf/0", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 2, "/allOf/1", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 3, "/anyOf/0", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 4, "/oneOf/0", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 5, "/if", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 6, "/then", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 7, "/else", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 8, "/not", ""); - - // Applicator vocabulary (object) - EXPECT_WALKER_ENTRY_2019_09(entries, 9, "/properties/foo", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 10, "/properties/bar", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 11, "/additionalProperties", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 12, "/patternProperties/^f", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 13, "/patternProperties/x$", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 14, "/dependentSchemas/foo", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 15, "/dependentSchemas/bar", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 16, "/propertyNames", ""); - - // Applicator vocabulary (array) - EXPECT_WALKER_ENTRY_2019_09(entries, 17, "/contains", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 18, "/additionalItems", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 19, "/items", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 20, "/items/items/0", "/items"); - EXPECT_WALKER_ENTRY_2019_09(entries, 21, "/items/items/1", "/items"); - - // Unevaluated applicators - EXPECT_WALKER_ENTRY_2019_09(entries, 22, "/unevaluatedProperties", ""); - EXPECT_WALKER_ENTRY_2019_09(entries, 23, "/unevaluatedItems", ""); - - // Content vocabulary - EXPECT_WALKER_ENTRY_2019_09(entries, 24, "/contentSchema", ""); - - // Core vocabulary - EXPECT_WALKER_ENTRY_2019_09_ORPHAN(entries, 25, "/$defs/foo", ""); - EXPECT_WALKER_ENTRY_2019_09_ORPHAN(entries, 26, "/$defs/foo/properties/bar", - "/$defs/foo"); - EXPECT_WALKER_ENTRY_2019_09_ORPHAN(entries, 27, "/definitions/foo", ""); -} - -TEST(JSONSchema_walker_2019_09, definitions_subschemas) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "foo": { - "properties": { - "bar": { - "additionalProperties": { - "type": "string" - } - } - } - } - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 4); - - EXPECT_WALKER_ENTRY_2019_09(entries, 0, "", std::nullopt); - EXPECT_WALKER_ENTRY_2019_09_ORPHAN(entries, 1, "/$defs/foo", ""); - EXPECT_WALKER_ENTRY_2019_09_ORPHAN(entries, 2, "/$defs/foo/properties/bar", - "/$defs/foo"); - EXPECT_WALKER_ENTRY_2019_09_ORPHAN( - entries, 3, "/$defs/foo/properties/bar/additionalProperties", - "/$defs/foo/properties/bar"); -} diff --git a/test/jsonschema/jsonschema_walker_2020_12_test.cc b/test/jsonschema/jsonschema_walker_2020_12_test.cc deleted file mode 100644 index a63aaef9a..000000000 --- a/test/jsonschema/jsonschema_walker_2020_12_test.cc +++ /dev/null @@ -1,1988 +0,0 @@ -#include - -#include - -#include - -#include "jsonschema_test_utils.h" - -#include // std::string_view -#include // std::unordered_set - -static const sourcemeta::core::Vocabularies VOCABULARIES_2020_12_CORE{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_2020_12_APPLICATOR{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}, - {"https://json-schema.org/draft/2020-12/vocab/applicator", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_2020_12_UNEVALUATED{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}, - {"https://json-schema.org/draft/2020-12/vocab/unevaluated", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_2020_12_VALIDATION{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}, - {"https://json-schema.org/draft/2020-12/vocab/validation", true}}; - -static const sourcemeta::core::Vocabularies - VOCABULARIES_2020_12_FORMAT_ANNOTATION{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}, - {"https://json-schema.org/draft/2020-12/vocab/format-annotation", - true}}; - -static const sourcemeta::core::Vocabularies - VOCABULARIES_2020_12_FORMAT_ASSERTION{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}, - {"https://json-schema.org/draft/2020-12/vocab/format-assertion", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_2020_12_CONTENT{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}, - {"https://json-schema.org/draft/2020-12/vocab/content", true}}; - -static const sourcemeta::core::Vocabularies - VOCABULARIES_2020_12_APPLICATOR_AND_VALIDATION{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}, - {"https://json-schema.org/draft/2020-12/vocab/applicator", true}, - {"https://json-schema.org/draft/2020-12/vocab/validation", true}}; - -static const sourcemeta::core::Vocabularies - VOCABULARIES_2020_12_UNEVALUATED_AND_APPLICATOR{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}, - {"https://json-schema.org/draft/2020-12/vocab/unevaluated", true}, - {"https://json-schema.org/draft/2020-12/vocab/applicator", true}}; - -static const sourcemeta::core::Vocabularies - VOCABULARIES_2020_12_APPLICATOR_UNEVALUATED_AND_VALIDATION{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}, - {"https://json-schema.org/draft/2020-12/vocab/applicator", true}, - {"https://json-schema.org/draft/2020-12/vocab/unevaluated", true}, - {"https://json-schema.org/draft/2020-12/vocab/validation", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_2020_12_METADATA{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}, - {"https://json-schema.org/draft/2020-12/vocab/meta-data", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_2020_12_HYPERSCHEMA{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}, - {"https://json-schema.org/draft/2019-09/vocab/hyper-schema", true}}; - -TEST(JSONSchema_walker_2020_12, core_schema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$schema", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2020_12_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, core_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$vocabulary", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2020_12_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, core_id) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$id", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2020_12_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, core_anchor) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$anchor", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2020_12_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, core_dynamicAnchor) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("$dynamicAnchor", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2020_12_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, core_ref) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$ref", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2020_12_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, core_dynamicRef) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$dynamicRef", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2020_12_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, core_defs) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$defs", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::LocationMembers); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2020_12_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, core_comment) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$comment", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_2020_12_Core); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_allOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("allOf", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_anyOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anyOf", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_oneOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("oneOf", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_not) { - using namespace sourcemeta::core; - const auto &result{schema_walker("not", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceNegate); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_if) { - using namespace sourcemeta::core; - const auto &result{schema_walker("if", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceMaybe); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_then) { - using namespace sourcemeta::core; - const auto &result{schema_walker("then", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceMaybe); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - const std::unordered_set expected{"if"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_else) { - using namespace sourcemeta::core; - const auto &result{schema_walker("else", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceMaybe); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - const std::unordered_set expected{"if"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_dependentSchemas) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("dependentSchemas", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembersInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2020_12, applicator_prefixItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("prefixItems", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsTraverseItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2020_12, applicator_items) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseSomeItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - const std::unordered_set expected{"prefixItems"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2020_12, applicator_contains_only) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contains", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseAnyItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2020_12, applicator_contains_with_validation) { - using namespace sourcemeta::core; - const auto &result{schema_walker( - "contains", VOCABULARIES_2020_12_APPLICATOR_AND_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseAnyItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - const std::unordered_set expected{"minContains", - "maxContains"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2020_12, applicator_properties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("properties", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2020_12, applicator_patternProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("patternProperties", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyRegex); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2020_12, applicator_additionalProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - const std::unordered_set expected{"properties", - "patternProperties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2020_12, applicator_propertyNames) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("propertyNames", VOCABULARIES_2020_12_APPLICATOR)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseAnyPropertyKey); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Applicator); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2020_12, unevaluated_unevaluatedItems_only) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("unevaluatedItems", VOCABULARIES_2020_12_UNEVALUATED)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseSomeItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Unevaluated); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2020_12, unevaluated_unevaluatedItems_with_applicator) { - using namespace sourcemeta::core; - const auto &result{schema_walker( - "unevaluatedItems", VOCABULARIES_2020_12_UNEVALUATED_AND_APPLICATOR)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseSomeItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Unevaluated); - const std::unordered_set expected{"prefixItems", "items", - "contains"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2020_12, unevaluated_unevaluatedProperties_only) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("unevaluatedProperties", VOCABULARIES_2020_12_UNEVALUATED)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Unevaluated); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2020_12, - unevaluated_unevaluatedProperties_with_applicator) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("unevaluatedProperties", - VOCABULARIES_2020_12_UNEVALUATED_AND_APPLICATOR)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Unevaluated); - const std::unordered_set expected{ - "properties", "patternProperties", "additionalProperties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2020_12, validation_type) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_enum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_const) { - using namespace sourcemeta::core; - const auto &result{schema_walker("const", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_multipleOf) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("multipleOf", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_2020_12, validation_maximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - const std::unordered_set expected{"type"}; - EXPECT_EQ(result.order_dependencies, expected); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_2020_12, validation_minimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - const std::unordered_set expected{"type"}; - EXPECT_EQ(result.order_dependencies, expected); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_2020_12, validation_exclusiveMaximum) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("exclusiveMaximum", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_2020_12, validation_exclusiveMinimum) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("exclusiveMinimum", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_2020_12, validation_maxLength) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxLength", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2020_12, validation_minLength) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minLength", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2020_12, validation_pattern) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2020_12, validation_maxItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxItems", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2020_12, validation_minItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minItems", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2020_12, validation_uniqueItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("uniqueItems", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2020_12, validation_maxContains) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxContains", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2020_12, validation_minContains) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minContains", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_2020_12, validation_maxProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxProperties", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2020_12, validation_minProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minProperties", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2020_12, validation_required) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("required", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2020_12, validation_dependentRequired) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("dependentRequired", VOCABULARIES_2020_12_VALIDATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Validation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_2020_12, format_annotation_format) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("format", VOCABULARIES_2020_12_FORMAT_ANNOTATION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Format_Annotation); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2020_12, format_assertion_format) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("format", VOCABULARIES_2020_12_FORMAT_ASSERTION)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Format_Assertion); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2020_12, content_contentEncoding) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentEncoding", VOCABULARIES_2020_12_CONTENT)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Content); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2020_12, content_contentMediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentMediaType", VOCABULARIES_2020_12_CONTENT)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Content); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2020_12, content_contentSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentSchema", VOCABULARIES_2020_12_CONTENT)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Content); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_2020_12, metadata_title) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_2020_12_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, metadata_description) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("description", VOCABULARIES_2020_12_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, metadata_default) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_2020_12_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, metadata_deprecated) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("deprecated", VOCABULARIES_2020_12_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, metadata_readOnly) { - using namespace sourcemeta::core; - const auto &result{schema_walker("readOnly", VOCABULARIES_2020_12_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, metadata_writeOnly) { - using namespace sourcemeta::core; - const auto &result{schema_walker("writeOnly", VOCABULARIES_2020_12_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, metadata_examples) { - using namespace sourcemeta::core; - const auto &result{schema_walker("examples", VOCABULARIES_2020_12_METADATA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Annotation); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2020_12_Meta_Data); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_base) { - using namespace sourcemeta::core; - const auto &result{schema_walker("base", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_links) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_href) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_anchor) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anchor", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_anchorPointer) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("anchorPointer", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_rel) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_templatePointers) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("templatePointers", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_templateRequired) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("templateRequired", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_targetMediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetMediaType", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_targetHints) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetHints", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_submissionMediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("submissionMediaType", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_hrefSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("hrefSchema", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_targetSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetSchema", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_headerSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("headerSchema", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_submissionSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("submissionSchema", VOCABULARIES_2020_12_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), - JSON_Schema_2019_09_Hyper_Schema); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_allOf_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("allOf", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_anyOf_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anyOf", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_oneOf_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("oneOf", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_not_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("not", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_if_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("if", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_then_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("then", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_else_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("else", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, - applicator_dependentSchemas_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("dependentSchemas", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_prefixItems_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("prefixItems", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_items_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_contains_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("contains", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_properties_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("properties", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, - applicator_patternProperties_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("patternProperties", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, - applicator_additionalProperties_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, applicator_propertyNames_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("propertyNames", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, - unevaluated_unevaluatedItems_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("unevaluatedItems", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, - unevaluated_unevaluatedProperties_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("unevaluatedProperties", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_type_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_enum_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_const_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("const", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_multipleOf_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("multipleOf", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_maximum_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_minimum_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, - validation_exclusiveMaximum_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("exclusiveMaximum", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, - validation_exclusiveMinimum_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("exclusiveMinimum", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_maxLength_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxLength", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_minLength_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minLength", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_pattern_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_maxItems_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxItems", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_minItems_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minItems", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_uniqueItems_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("uniqueItems", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_maxContains_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxContains", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_minContains_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minContains", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_maxProperties_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxProperties", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_minProperties_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minProperties", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, validation_required_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("required", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, - validation_dependentRequired_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("dependentRequired", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, format_annotation_format_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, format_assertion_format_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, content_contentEncoding_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentEncoding", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, content_contentMediaType_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentMediaType", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, content_contentSchema_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("contentSchema", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, metadata_title_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, metadata_description_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("description", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, metadata_default_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, metadata_deprecated_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("deprecated", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, metadata_readOnly_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("readOnly", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, metadata_writeOnly_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("writeOnly", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, metadata_examples_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("examples", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_base_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("base", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_links_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_ref_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("ref", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_href_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_anchor_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anchor", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_anchorPointer_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anchorPointer", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_rel_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, - hyperschema_templatePointers_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("templatePointers", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, - hyperschema_templateRequired_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("templateRequired", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, - hyperschema_targetMediaType_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetMediaType", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_targetHints_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("targetHints", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, - hyperschema_submissionMediaType_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("submissionMediaType", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_hrefSchema_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("hrefSchema", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_targetSchema_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("targetSchema", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, hyperschema_headerSchema_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("headerSchema", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, - hyperschema_submissionSchema_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("submissionSchema", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_2020_12, schema_keyword_priority_array) { - const auto &vocabularies = - VOCABULARIES_2020_12_APPLICATOR_UNEVALUATED_AND_VALIDATION; - - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("prefixItems", vocabularies, walker), 0); - EXPECT_EQ(schema_keyword_priority("items", vocabularies, walker), 1); - EXPECT_EQ(schema_keyword_priority("minContains", vocabularies, walker), 0); - EXPECT_EQ(schema_keyword_priority("maxContains", vocabularies, walker), 0); - EXPECT_EQ(schema_keyword_priority("contains", vocabularies, walker), 1); - EXPECT_EQ(schema_keyword_priority("unevaluatedItems", vocabularies, walker), - 2); -} - -TEST(JSONSchema_walker_2020_12, schema_keyword_priority_object) { - const auto &vocabularies = VOCABULARIES_2020_12_UNEVALUATED_AND_APPLICATOR; - - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 0); - EXPECT_EQ(schema_keyword_priority("patternProperties", vocabularies, walker), - 0); - EXPECT_EQ( - schema_keyword_priority("additionalProperties", vocabularies, walker), 1); - EXPECT_EQ( - schema_keyword_priority("unevaluatedProperties", vocabularies, walker), - 2); -} - -TEST(JSONSchema_walker_2020_12, schema_keyword_priority_other) { - const auto &vocabularies = VOCABULARIES_2020_12_APPLICATOR; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("if", vocabularies, walker), 0); - EXPECT_EQ(schema_keyword_priority("then", vocabularies, walker), 1); - EXPECT_EQ(schema_keyword_priority("else", vocabularies, walker), 1); -} - -TEST(JSONSchema_walker_2020_12, schema_keyword_priority_unknown) { - const auto &vocabularies = VOCABULARIES_2020_12_CORE; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 0); -} - -TEST(JSONSchema_walker_2020_12, instance_locations) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "allOf": [ { "type": "string" }, { "minLength": 3 } ], - "anyOf": [ { "type": "string" } ], - "oneOf": [ { "type": "string" } ], - "if": { "const": "foo" }, - "then": true, - "else": { "maxLength": 10 }, - "not": { "const": "bar" }, - "properties": { - "foo": { "type": "string" }, - "bar": false - }, - "additionalProperties": { "type": "number" }, - "patternProperties": { - "^f": { "type": "integer" }, - "x$": true - }, - "dependentSchemas": { - "foo": { "minProperties": 1 }, - "bar": { "maxProperties": 10 } - }, - "propertyNames": { "minLength": 1 }, - "contains": { "type": "number" }, - "items": { "minimum": 2 }, - "prefixItems": [ true, false ], - "unevaluatedProperties": { "type": "number" }, - "unevaluatedItems": { "minimum": 2 }, - "contentSchema": { "type": "string" }, - "$defs": { - "foo": { - "properties": { - "bar": { "type": "string" } - } - } - }, - "definitions": { "foo": true } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 27); - - EXPECT_WALKER_ENTRY_2020_12(entries, 0, "", std::nullopt); - - // Applicator vocabulary (any) - EXPECT_WALKER_ENTRY_2020_12(entries, 1, "/allOf/0", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 2, "/allOf/1", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 3, "/anyOf/0", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 4, "/oneOf/0", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 5, "/if", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 6, "/then", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 7, "/else", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 8, "/not", ""); - - // Applicator vocabulary (object) - EXPECT_WALKER_ENTRY_2020_12(entries, 9, "/properties/foo", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 10, "/properties/bar", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 11, "/additionalProperties", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 12, "/patternProperties/^f", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 13, "/patternProperties/x$", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 14, "/dependentSchemas/foo", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 15, "/dependentSchemas/bar", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 16, "/propertyNames", ""); - - // Applicator vocabulary (array) - EXPECT_WALKER_ENTRY_2020_12(entries, 17, "/contains", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 18, "/items", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 19, "/prefixItems/0", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 20, "/prefixItems/1", ""); - - // Unevaluated vocabulary - EXPECT_WALKER_ENTRY_2020_12(entries, 21, "/unevaluatedProperties", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 22, "/unevaluatedItems", ""); - - // Content vocabulary - EXPECT_WALKER_ENTRY_2020_12(entries, 23, "/contentSchema", ""); - - // Core vocabulary - EXPECT_WALKER_ENTRY_2020_12_ORPHAN(entries, 24, "/$defs/foo", ""); - EXPECT_WALKER_ENTRY_2020_12_ORPHAN(entries, 25, "/$defs/foo/properties/bar", - "/$defs/foo"); - EXPECT_WALKER_ENTRY_2020_12_ORPHAN(entries, 26, "/definitions/foo", ""); -} - -TEST(JSONSchema_walker_2020_12, instance_locations_nested) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "additionalProperties": { - "properties": { - "foo": { - "allOf": [ - { "type": "string" } - ] - } - } - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 4); - - EXPECT_WALKER_ENTRY_2020_12(entries, 0, "", std::nullopt); - EXPECT_WALKER_ENTRY_2020_12(entries, 1, "/additionalProperties", ""); - EXPECT_WALKER_ENTRY_2020_12(entries, 2, - "/additionalProperties/properties/foo", - "/additionalProperties"); - EXPECT_WALKER_ENTRY_2020_12(entries, 3, - "/additionalProperties/properties/foo/allOf/0", - "/additionalProperties/properties/foo"); -} - -TEST(JSONSchema_walker_2020_12, instance_locations_defs_with_ref) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "common", - "allOf": [ { "$ref": "#foo" } ], - "$defs": { - "foo": { - "$anchor": "foo" - } - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 3); - - EXPECT_WALKER_ENTRY_2020_12(entries, 0, "", std::nullopt); - EXPECT_WALKER_ENTRY_2020_12(entries, 1, "/allOf/0", ""); - EXPECT_WALKER_ENTRY_2020_12_ORPHAN(entries, 2, "/$defs/foo", ""); -} - -TEST(JSONSchema_walker_2020_12, definitions_subschemas) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$defs": { - "foo": { - "properties": { - "bar": { - "additionalProperties": { - "type": "string" - } - } - } - } - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 4); - - EXPECT_WALKER_ENTRY_2020_12(entries, 0, "", std::nullopt); - EXPECT_WALKER_ENTRY_2020_12_ORPHAN(entries, 1, "/$defs/foo", ""); - EXPECT_WALKER_ENTRY_2020_12_ORPHAN(entries, 2, "/$defs/foo/properties/bar", - "/$defs/foo"); - EXPECT_WALKER_ENTRY_2020_12_ORPHAN( - entries, 3, "/$defs/foo/properties/bar/additionalProperties", - "/$defs/foo/properties/bar"); -} diff --git a/test/jsonschema/jsonschema_walker_draft0_test.cc b/test/jsonschema/jsonschema_walker_draft0_test.cc deleted file mode 100644 index d2ed78cc8..000000000 --- a/test/jsonschema/jsonschema_walker_draft0_test.cc +++ /dev/null @@ -1,982 +0,0 @@ -#include - -#include - -#include "jsonschema_test_utils.h" - -#include // std::string_view -#include // std::unordered_set - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT0{ - {"http://json-schema.org/draft-00/schema#", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT0_HYPERSCHEMA{ - {"http://json-schema.org/draft-00/hyper-schema#", true}}; - -TEST(JSONSchema_walker_draft0, schema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$schema", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, id) { - using namespace sourcemeta::core; - const auto &result{schema_walker("id", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, ref) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$ref", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, items) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueOrElementsTraverseAnyItemOrItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft0, properties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("properties", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft0, additionalProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - const std::unordered_set expected{"properties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft0, type) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, enum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, maximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft0, minimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft0, maximumCanEqual) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximumCanEqual", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft0, minimumCanEqual) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimumCanEqual", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft0, maxLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxLength", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft0, minLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minLength", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft0, pattern) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft0, maxItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxItems", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft0, minItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minItems", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft0, requires) { - using namespace sourcemeta::core; - const auto &result{schema_walker("requires", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseParent); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft0, format) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft0, title) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, description) { - using namespace sourcemeta::core; - const auto &result{schema_walker("description", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, default) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, disallow) { - using namespace sourcemeta::core; - const auto &result{schema_walker("disallow", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, extends) { - using namespace sourcemeta::core; - const auto &result{schema_walker("extends", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, contentEncoding) { - using namespace sourcemeta::core; - const auto &result{schema_walker("contentEncoding", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft0, optional) { - using namespace sourcemeta::core; - const auto &result{schema_walker("optional", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft0, maxDecimal) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxDecimal", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Real})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_links) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_fragmentResolution) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("fragmentResolution", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_root) { - using namespace sourcemeta::core; - const auto &result{schema_walker("root", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_readonly) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("readonly", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_pathStart) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("pathStart", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_mediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("mediaType", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_alternate) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("alternate", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_href) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_rel) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_method) { - using namespace sourcemeta::core; - const auto &result{schema_walker("method", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_enctype) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enctype", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_schema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$schema", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_id) { - using namespace sourcemeta::core; - const auto &result{schema_walker("id", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_ref) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$ref", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_items) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueOrElementsTraverseAnyItemOrItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_properties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("properties", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_additionalProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - const std::unordered_set expected{"properties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_type) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_enum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_maximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft0, hyperschema_minimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft0, hyperschema_maximumCanEqual) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maximumCanEqual", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft0, hyperschema_minimumCanEqual) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minimumCanEqual", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft0, hyperschema_maxLength) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxLength", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_minLength) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minLength", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_pattern) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_maxItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxItems", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_minItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minItems", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_requires) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("requires", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseParent); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_format) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_title) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_description) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("description", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_default) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_disallow) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("disallow", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_extends) { - using namespace sourcemeta::core; - const auto &result{schema_walker("extends", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_contentEncoding) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentEncoding", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_optional) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("optional", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_maxDecimal) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxDecimal", VOCABULARIES_DRAFT0_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_0_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Real})); -} - -TEST(JSONSchema_walker_draft0, hyperschema_links_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, - hyperschema_fragmentResolution_without_hyperchema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("fragmentResolution", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_root_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("root", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_readonly_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("readonly", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_pathStart_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pathStart", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_mediaType_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("mediaType", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_alternate_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("alternate", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_href_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_rel_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_method_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("method", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, hyperschema_enctype_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enctype", VOCABULARIES_DRAFT0)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft0, schema_keyword_priority_object) { - const auto &vocabularies = VOCABULARIES_DRAFT0; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 0); - EXPECT_EQ( - schema_keyword_priority("additionalProperties", vocabularies, walker), 1); -} - -TEST(JSONSchema_walker_draft0, schema_keyword_priority_unknown) { - const auto &vocabularies = VOCABULARIES_DRAFT0; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 0); -} - -TEST(JSONSchema_walker_draft0, instance_locations) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-00/schema#", - "properties": { - "foo": { - "type": "string", - "requires": { "type": "object" } - }, - "bar": false - }, - "additionalProperties": { "type": "number" }, - "items": { "items": [ { "type": "string" }, { "type": "integer" } ] }, - "type": [ "string", { "type": "number" }, { "type": "integer" } ], - "extends": { - "extends": [ { "type": "string" } ] - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 12); - - EXPECT_WALKER_ENTRY_DRAFT0(entries, 0, "", std::nullopt); - - // Applicators (object) - EXPECT_WALKER_ENTRY_DRAFT0(entries, 1, "/properties/foo", ""); - EXPECT_WALKER_ENTRY_DRAFT0(entries, 2, "/properties/foo/requires", - "/properties/foo"); - EXPECT_WALKER_ENTRY_DRAFT0(entries, 3, "/properties/bar", ""); - EXPECT_WALKER_ENTRY_DRAFT0(entries, 4, "/additionalProperties", ""); - - // Applicators (array) - EXPECT_WALKER_ENTRY_DRAFT0(entries, 5, "/items", ""); - EXPECT_WALKER_ENTRY_DRAFT0(entries, 6, "/items/items/0", "/items"); - EXPECT_WALKER_ENTRY_DRAFT0(entries, 7, "/items/items/1", "/items"); - - // Applicators (any) - EXPECT_WALKER_ENTRY_DRAFT0(entries, 8, "/type/1", ""); - EXPECT_WALKER_ENTRY_DRAFT0(entries, 9, "/type/2", ""); - EXPECT_WALKER_ENTRY_DRAFT0(entries, 10, "/extends", ""); - EXPECT_WALKER_ENTRY_DRAFT0(entries, 11, "/extends/extends/0", "/extends"); -} diff --git a/test/jsonschema/jsonschema_walker_draft1_test.cc b/test/jsonschema/jsonschema_walker_draft1_test.cc deleted file mode 100644 index 981bfedbe..000000000 --- a/test/jsonschema/jsonschema_walker_draft1_test.cc +++ /dev/null @@ -1,982 +0,0 @@ -#include - -#include - -#include "jsonschema_test_utils.h" - -#include // std::string_view -#include // std::unordered_set - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT1{ - {"http://json-schema.org/draft-01/schema#", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT1_HYPERSCHEMA{ - {"http://json-schema.org/draft-01/hyper-schema#", true}}; - -TEST(JSONSchema_walker_draft1, schema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$schema", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, id) { - using namespace sourcemeta::core; - const auto &result{schema_walker("id", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, ref) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$ref", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, items) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueOrElementsTraverseAnyItemOrItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft1, properties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("properties", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft1, additionalProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - const std::unordered_set expected{"properties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft1, type) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, enum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, maximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft1, minimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft1, maximumCanEqual) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximumCanEqual", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft1, minimumCanEqual) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimumCanEqual", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft1, maxLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxLength", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft1, minLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minLength", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft1, pattern) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft1, maxItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxItems", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft1, minItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minItems", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft1, requires) { - using namespace sourcemeta::core; - const auto &result{schema_walker("requires", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseParent); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft1, format) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft1, title) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, description) { - using namespace sourcemeta::core; - const auto &result{schema_walker("description", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, default) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, disallow) { - using namespace sourcemeta::core; - const auto &result{schema_walker("disallow", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, extends) { - using namespace sourcemeta::core; - const auto &result{schema_walker("extends", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, contentEncoding) { - using namespace sourcemeta::core; - const auto &result{schema_walker("contentEncoding", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft1, optional) { - using namespace sourcemeta::core; - const auto &result{schema_walker("optional", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft1, maxDecimal) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxDecimal", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Real})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_links) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_fragmentResolution) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("fragmentResolution", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_root) { - using namespace sourcemeta::core; - const auto &result{schema_walker("root", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_readonly) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("readonly", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_pathStart) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("pathStart", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_mediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("mediaType", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_alternate) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("alternate", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_href) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_rel) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_method) { - using namespace sourcemeta::core; - const auto &result{schema_walker("method", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_enctype) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enctype", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_schema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$schema", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_id) { - using namespace sourcemeta::core; - const auto &result{schema_walker("id", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_ref) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$ref", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_items) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueOrElementsTraverseAnyItemOrItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_properties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("properties", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_additionalProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - const std::unordered_set expected{"properties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_type) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_enum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_maximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft1, hyperschema_minimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft1, hyperschema_maximumCanEqual) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maximumCanEqual", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft1, hyperschema_minimumCanEqual) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minimumCanEqual", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft1, hyperschema_maxLength) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxLength", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_minLength) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minLength", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_pattern) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_maxItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxItems", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_minItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minItems", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_requires) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("requires", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseParent); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_format) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_title) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_description) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("description", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_default) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_disallow) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("disallow", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_extends) { - using namespace sourcemeta::core; - const auto &result{schema_walker("extends", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_contentEncoding) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentEncoding", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_optional) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("optional", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_maxDecimal) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxDecimal", VOCABULARIES_DRAFT1_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_1_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Real})); -} - -TEST(JSONSchema_walker_draft1, hyperschema_links_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, - hyperschema_fragmentResolution_without_hyperchema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("fragmentResolution", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_root_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("root", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_readonly_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("readonly", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_pathStart_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pathStart", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_mediaType_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("mediaType", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_alternate_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("alternate", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_href_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_rel_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_method_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("method", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, hyperschema_enctype_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enctype", VOCABULARIES_DRAFT1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft1, schema_keyword_priority_object) { - const auto &vocabularies = VOCABULARIES_DRAFT1; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 0); - EXPECT_EQ( - schema_keyword_priority("additionalProperties", vocabularies, walker), 1); -} - -TEST(JSONSchema_walker_draft1, schema_keyword_priority_unknown) { - const auto &vocabularies = VOCABULARIES_DRAFT1; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 0); -} - -TEST(JSONSchema_walker_draft1, instance_locations) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-01/schema#", - "properties": { - "foo": { - "type": "string", - "requires": { "type": "object" } - }, - "bar": false - }, - "additionalProperties": { "type": "number" }, - "items": { "items": [ { "type": "string" }, { "type": "integer" } ] }, - "type": [ "string", { "type": "number" }, { "type": "integer" } ], - "extends": { - "extends": [ { "type": "string" } ] - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 12); - - EXPECT_WALKER_ENTRY_DRAFT1(entries, 0, "", std::nullopt); - - // Applicators (object) - EXPECT_WALKER_ENTRY_DRAFT1(entries, 1, "/properties/foo", ""); - EXPECT_WALKER_ENTRY_DRAFT1(entries, 2, "/properties/foo/requires", - "/properties/foo"); - EXPECT_WALKER_ENTRY_DRAFT1(entries, 3, "/properties/bar", ""); - EXPECT_WALKER_ENTRY_DRAFT1(entries, 4, "/additionalProperties", ""); - - // Applicators (array) - EXPECT_WALKER_ENTRY_DRAFT1(entries, 5, "/items", ""); - EXPECT_WALKER_ENTRY_DRAFT1(entries, 6, "/items/items/0", "/items"); - EXPECT_WALKER_ENTRY_DRAFT1(entries, 7, "/items/items/1", "/items"); - - // Applicators (any) - EXPECT_WALKER_ENTRY_DRAFT1(entries, 8, "/type/1", ""); - EXPECT_WALKER_ENTRY_DRAFT1(entries, 9, "/type/2", ""); - EXPECT_WALKER_ENTRY_DRAFT1(entries, 10, "/extends", ""); - EXPECT_WALKER_ENTRY_DRAFT1(entries, 11, "/extends/extends/0", "/extends"); -} diff --git a/test/jsonschema/jsonschema_walker_draft2_test.cc b/test/jsonschema/jsonschema_walker_draft2_test.cc deleted file mode 100644 index 8c7182615..000000000 --- a/test/jsonschema/jsonschema_walker_draft2_test.cc +++ /dev/null @@ -1,1011 +0,0 @@ -#include - -#include - -#include "jsonschema_test_utils.h" - -#include // std::string_view -#include // std::unordered_set - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT2{ - {"http://json-schema.org/draft-02/schema#", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT2_HYPERSCHEMA{ - {"http://json-schema.org/draft-02/hyper-schema#", true}}; - -TEST(JSONSchema_walker_draft2, schema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$schema", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, id) { - using namespace sourcemeta::core; - const auto &result{schema_walker("id", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, ref) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$ref", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, items) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueOrElementsTraverseAnyItemOrItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft2, properties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("properties", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft2, additionalProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - const std::unordered_set expected{"properties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft2, type) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, enum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, maximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft2, minimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft2, maximumCanEqual) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximumCanEqual", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft2, minimumCanEqual) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimumCanEqual", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft2, maxLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxLength", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft2, minLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minLength", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft2, pattern) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft2, maxItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxItems", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft2, minItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minItems", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft2, uniqueItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("uniqueItems", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft2, requires) { - using namespace sourcemeta::core; - const auto &result{schema_walker("requires", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseParent); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft2, optional) { - using namespace sourcemeta::core; - const auto &result{schema_walker("optional", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft2, format) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft2, title) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, description) { - using namespace sourcemeta::core; - const auto &result{schema_walker("description", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, default) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, divisibleBy) { - using namespace sourcemeta::core; - const auto &result{schema_walker("divisibleBy", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft2, disallow) { - using namespace sourcemeta::core; - const auto &result{schema_walker("disallow", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, extends) { - using namespace sourcemeta::core; - const auto &result{schema_walker("extends", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, contentEncoding) { - using namespace sourcemeta::core; - const auto &result{schema_walker("contentEncoding", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft2, hyperschema_links) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_fragmentResolution) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("fragmentResolution", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_root) { - using namespace sourcemeta::core; - const auto &result{schema_walker("root", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_readonly) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("readonly", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_pathStart) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("pathStart", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_mediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("mediaType", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_alternate) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("alternate", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_href) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_rel) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_method) { - using namespace sourcemeta::core; - const auto &result{schema_walker("method", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_enctype) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enctype", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_schema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$schema", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_id) { - using namespace sourcemeta::core; - const auto &result{schema_walker("id", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_ref) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$ref", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_items) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueOrElementsTraverseAnyItemOrItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft2, hyperschema_properties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("properties", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft2, hyperschema_additionalProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - const std::unordered_set expected{"properties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft2, hyperschema_type) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_enum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_maximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft2, hyperschema_minimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft2, hyperschema_maximumCanEqual) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maximumCanEqual", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft2, hyperschema_minimumCanEqual) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minimumCanEqual", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft2, hyperschema_maxLength) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxLength", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft2, hyperschema_minLength) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minLength", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft2, hyperschema_pattern) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft2, hyperschema_maxItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("maxItems", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft2, hyperschema_minItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("minItems", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft2, hyperschema_uniqueItems) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("uniqueItems", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft2, hyperschema_requires) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("requires", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseParent); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft2, hyperschema_optional) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("optional", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft2, hyperschema_format) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft2, hyperschema_title) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_description) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("description", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_default) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_divisibleBy) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("divisibleBy", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft2, hyperschema_disallow) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("disallow", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_extends) { - using namespace sourcemeta::core; - const auto &result{schema_walker("extends", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_contentEncoding) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentEncoding", VOCABULARIES_DRAFT2_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_2_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft2, - hyperschema_fragmentResolution_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("fragmentResolution", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_root_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("root", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_readonly_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("readonly", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_pathStart_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pathStart", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_mediaType_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("mediaType", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_alternate_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("alternate", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_href_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_rel_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_method_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("method", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_enctype_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enctype", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, hyperschema_targetSchema_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("targetSchema", VOCABULARIES_DRAFT2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft2, schema_keyword_priority_object) { - const auto &vocabularies = VOCABULARIES_DRAFT2; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 0); - EXPECT_EQ( - schema_keyword_priority("additionalProperties", vocabularies, walker), 1); -} - -TEST(JSONSchema_walker_draft2, schema_keyword_priority_unknown) { - const auto &vocabularies = VOCABULARIES_DRAFT2; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 0); -} - -TEST(JSONSchema_walker_draft2, instance_locations) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-02/schema#", - "properties": { - "foo": { - "type": "string", - "requires": { "type": "object" } - }, - "bar": false - }, - "additionalProperties": { "type": "number" }, - "items": { "items": [ { "type": "string" }, { "type": "integer" } ] }, - "type": [ "string", { "type": "number" }, { "type": "integer" } ], - "extends": { - "extends": [ { "type": "string" } ] - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 12); - - EXPECT_WALKER_ENTRY_DRAFT2(entries, 0, "", std::nullopt); - - // Applicators (object) - EXPECT_WALKER_ENTRY_DRAFT2(entries, 1, "/properties/foo", ""); - EXPECT_WALKER_ENTRY_DRAFT2(entries, 2, "/properties/foo/requires", - "/properties/foo"); - EXPECT_WALKER_ENTRY_DRAFT2(entries, 3, "/properties/bar", ""); - EXPECT_WALKER_ENTRY_DRAFT2(entries, 4, "/additionalProperties", ""); - - // Applicators (array) - EXPECT_WALKER_ENTRY_DRAFT2(entries, 5, "/items", ""); - EXPECT_WALKER_ENTRY_DRAFT2(entries, 6, "/items/items/0", "/items"); - EXPECT_WALKER_ENTRY_DRAFT2(entries, 7, "/items/items/1", "/items"); - - // Applicators (any) - EXPECT_WALKER_ENTRY_DRAFT2(entries, 8, "/type/1", ""); - EXPECT_WALKER_ENTRY_DRAFT2(entries, 9, "/type/2", ""); - EXPECT_WALKER_ENTRY_DRAFT2(entries, 10, "/extends", ""); - EXPECT_WALKER_ENTRY_DRAFT2(entries, 11, "/extends/extends/0", "/extends"); -} diff --git a/test/jsonschema/jsonschema_walker_draft3_test.cc b/test/jsonschema/jsonschema_walker_draft3_test.cc deleted file mode 100644 index 2b981cdb7..000000000 --- a/test/jsonschema/jsonschema_walker_draft3_test.cc +++ /dev/null @@ -1,787 +0,0 @@ -#include - -#include - -#include "jsonschema_test_utils.h" - -#include // std::string_view -#include // std::unordered_set - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT3{ - {"http://json-schema.org/draft-03/schema#", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT3_HYPERSCHEMA{ - {"http://json-schema.org/draft-03/hyper-schema#", true}}; - -TEST(JSONSchema_walker_draft3, schema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$schema", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, id) { - using namespace sourcemeta::core; - const auto &result{schema_walker("id", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, ref) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$ref", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, definitions) { - using namespace sourcemeta::core; - const auto &result{schema_walker("definitions", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::LocationMembers); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3_hyperschema, definitions) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("definitions", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::LocationMembers); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, items) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueOrElementsTraverseAnyItemOrItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft3, additionalItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("additionalItems", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseSomeItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"items"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft3, properties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("properties", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft3, patternProperties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("patternProperties", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyRegex); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft3, dependencies) { - using namespace sourcemeta::core; - const auto &result{schema_walker("dependencies", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembersInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft3, additionalProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"properties", - "patternProperties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft3, type) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, enum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, maximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft3, minimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft3, exclusiveMaximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("exclusiveMaximum", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft3, exclusiveMinimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("exclusiveMinimum", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft3, maxLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxLength", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft3, minLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minLength", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft3, pattern) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft3, maxItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxItems", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft3, minItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minItems", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft3, uniqueItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("uniqueItems", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft3, required) { - using namespace sourcemeta::core; - const auto &result{schema_walker("required", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft3, format) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft3, title) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, description) { - using namespace sourcemeta::core; - const auto &result{schema_walker("description", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, default) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, divisibleBy) { - using namespace sourcemeta::core; - const auto &result{schema_walker("divisibleBy", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft3, disallow) { - using namespace sourcemeta::core; - const auto &result{schema_walker("disallow", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorElementsInPlaceSomeNegate); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, extends) { - using namespace sourcemeta::core; - const auto &result{schema_walker("extends", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueOrElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_links) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_fragmentResolution) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("fragmentResolution", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_root) { - using namespace sourcemeta::core; - const auto &result{schema_walker("root", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_readonly) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("readonly", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_contentEncoding) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("contentEncoding", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_pathStart) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("pathStart", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_mediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("mediaType", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_href) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_rel) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_method) { - using namespace sourcemeta::core; - const auto &result{schema_walker("method", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_enctype) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enctype", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_targetSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetSchema", VOCABULARIES_DRAFT3_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_3_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_links_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, - hyperschema_fragmentResolution_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("fragmentResolution", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_root_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("root", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_readonly_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("readonly", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, - hyperschema_contentEncoding_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("contentEncoding", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_pathStart_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pathStart", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_mediaType_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("mediaType", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_href_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_rel_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_method_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("method", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_enctype_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enctype", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, hyperschema_targetSchema_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("targetSchema", VOCABULARIES_DRAFT3)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft3, schema_keyword_priority_array) { - const auto &vocabularies = VOCABULARIES_DRAFT3; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("items", vocabularies, walker), 1); - EXPECT_EQ(schema_keyword_priority("additionalItems", vocabularies, walker), - 2); -} - -TEST(JSONSchema_walker_draft3, schema_keyword_priority_object) { - const auto &vocabularies = VOCABULARIES_DRAFT3; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 1); - EXPECT_EQ(schema_keyword_priority("patternProperties", vocabularies, walker), - 1); - EXPECT_EQ( - schema_keyword_priority("additionalProperties", vocabularies, walker), 2); -} - -TEST(JSONSchema_walker_draft3, schema_keyword_priority_unknown) { - const auto &vocabularies = VOCABULARIES_DRAFT3; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 1); -} - -TEST(JSONSchema_walker_draft3, instance_locations) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-03/schema#", - "properties": { - "foo": { "type": "string" }, - "bar": false - }, - "additionalProperties": { "type": "number" }, - "patternProperties": { - "^f": { "type": "integer" }, - "x$": true - }, - "dependencies": { - "foo": [ "bar" ], - "baz": { "type": "string" } - }, - "additionalItems": { "minimum": 2 }, - "items": { "items": [ true, false ] }, - "type": [ "string", { "type": "number" }, { "type": "integer" } ], - "disallow": [ "boolean", { "type": "string" }, { "type": "integer" } ], - "extends": { - "extends": [ { "type": "string" } ] - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 17); - - EXPECT_WALKER_ENTRY_DRAFT3(entries, 0, "", std::nullopt); - - // Applicators (object) - EXPECT_WALKER_ENTRY_DRAFT3(entries, 1, "/properties/foo", ""); - EXPECT_WALKER_ENTRY_DRAFT3(entries, 2, "/properties/bar", ""); - EXPECT_WALKER_ENTRY_DRAFT3(entries, 3, "/additionalProperties", ""); - EXPECT_WALKER_ENTRY_DRAFT3(entries, 4, "/patternProperties/^f", ""); - EXPECT_WALKER_ENTRY_DRAFT3(entries, 5, "/patternProperties/x$", ""); - EXPECT_WALKER_ENTRY_DRAFT3(entries, 6, "/dependencies/baz", ""); - - // Applicators (array) - EXPECT_WALKER_ENTRY_DRAFT3(entries, 7, "/additionalItems", ""); - EXPECT_WALKER_ENTRY_DRAFT3(entries, 8, "/items", ""); - EXPECT_WALKER_ENTRY_DRAFT3(entries, 9, "/items/items/0", "/items"); - EXPECT_WALKER_ENTRY_DRAFT3(entries, 10, "/items/items/1", "/items"); - - // Applicators (any) - EXPECT_WALKER_ENTRY_DRAFT3(entries, 11, "/type/1", ""); - EXPECT_WALKER_ENTRY_DRAFT3(entries, 12, "/type/2", ""); - EXPECT_WALKER_ENTRY_DRAFT3(entries, 13, "/disallow/1", ""); - EXPECT_WALKER_ENTRY_DRAFT3(entries, 14, "/disallow/2", ""); - EXPECT_WALKER_ENTRY_DRAFT3(entries, 15, "/extends", ""); - EXPECT_WALKER_ENTRY_DRAFT3(entries, 16, "/extends/extends/0", "/extends"); -} diff --git a/test/jsonschema/jsonschema_walker_draft4_test.cc b/test/jsonschema/jsonschema_walker_draft4_test.cc deleted file mode 100644 index 1935fce17..000000000 --- a/test/jsonschema/jsonschema_walker_draft4_test.cc +++ /dev/null @@ -1,831 +0,0 @@ -#include - -#include - -#include "jsonschema_test_utils.h" - -#include // std::string_view -#include // std::unordered_set - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT4{ - {"http://json-schema.org/draft-04/schema#", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT4_HYPERSCHEMA{ - {"http://json-schema.org/draft-04/hyper-schema#", true}}; - -TEST(JSONSchema_walker_draft4, schema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$schema", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, id) { - using namespace sourcemeta::core; - const auto &result{schema_walker("id", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, ref) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$ref", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, definitions) { - using namespace sourcemeta::core; - const auto &result{schema_walker("definitions", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::LocationMembers); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, allOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("allOf", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, anyOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anyOf", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, oneOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("oneOf", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, not) { - using namespace sourcemeta::core; - const auto &result{schema_walker("not", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceNegate); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, items) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueOrElementsTraverseAnyItemOrItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft4, additionalItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("additionalItems", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseSomeItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"items"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft4, properties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("properties", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected_dependencies{"$ref"}; - EXPECT_EQ(result.dependencies, expected_dependencies); - const std::unordered_set expected_order_dependencies{ - "required"}; - EXPECT_EQ(result.order_dependencies, expected_order_dependencies); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft4, patternProperties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("patternProperties", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyRegex); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft4, dependencies) { - using namespace sourcemeta::core; - const auto &result{schema_walker("dependencies", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembersInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft4, additionalProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"properties", - "patternProperties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft4, type) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - EXPECT_TRUE(result.dependencies.empty()); - const std::unordered_set expected{"properties"}; - EXPECT_EQ(result.order_dependencies, expected); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, enum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, multipleOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("multipleOf", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft4, maximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft4, minimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft4, exclusiveMaximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("exclusiveMaximum", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft4, exclusiveMinimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("exclusiveMinimum", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft4, maxLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxLength", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft4, minLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minLength", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft4, pattern) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft4, maxItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxItems", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft4, minItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minItems", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft4, uniqueItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("uniqueItems", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft4, maxProperties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxProperties", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft4, minProperties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minProperties", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft4, required) { - using namespace sourcemeta::core; - const auto &result{schema_walker("required", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft4, format) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft4, title) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, description) { - using namespace sourcemeta::core; - const auto &result{schema_walker("description", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, default) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_links) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_media) { - using namespace sourcemeta::core; - const auto &result{schema_walker("media", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_pathStart) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("pathStart", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_href) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_rel) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_mediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("mediaType", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_method) { - using namespace sourcemeta::core; - const auto &result{schema_walker("method", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_encType) { - using namespace sourcemeta::core; - const auto &result{schema_walker("encType", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_readOnly) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("readOnly", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_targetSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetSchema", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_schema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("schema", VOCABULARIES_DRAFT4_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_4_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_links_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_media_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("media", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_pathStart_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pathStart", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_href_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_rel_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_mediaType_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("mediaType", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_method_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("method", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_encType_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("encType", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_readOnly_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("readOnly", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_targetSchema_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("targetSchema", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, hyperschema_schema_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("schema", VOCABULARIES_DRAFT4)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft4, schema_keyword_priority_array) { - const auto &vocabularies = VOCABULARIES_DRAFT4; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("items", vocabularies, walker), 1); - EXPECT_EQ(schema_keyword_priority("additionalItems", vocabularies, walker), - 2); -} - -TEST(JSONSchema_walker_draft4, schema_keyword_priority_object) { - const auto &vocabularies = VOCABULARIES_DRAFT4; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 2); - EXPECT_EQ(schema_keyword_priority("patternProperties", vocabularies, walker), - 1); - EXPECT_EQ( - schema_keyword_priority("additionalProperties", vocabularies, walker), 3); -} - -TEST(JSONSchema_walker_draft4, schema_keyword_priority_unknown) { - const auto &vocabularies = VOCABULARIES_DRAFT4; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 1); -} - -TEST(JSONSchema_walker_draft4, instance_locations) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "allOf": [ { "type": "string" }, { "minLength": 3 } ], - "anyOf": [ { "type": "string" } ], - "oneOf": [ { "type": "string" } ], - "not": { "enum": [ "bar" ] }, - "properties": { - "foo": { "type": "string" }, - "bar": false - }, - "additionalProperties": { "type": "number" }, - "patternProperties": { - "^f": { "type": "integer" }, - "x$": true - }, - "dependencies": { - "foo": [ "bar" ], - "baz": { "type": "string" } - }, - "additionalItems": { "minimum": 2 }, - "items": { "items": [ true, false ] }, - "definitions": { "foo": true } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 17); - - EXPECT_WALKER_ENTRY_DRAFT4(entries, 0, "", std::nullopt); - - // Applicators (any) - EXPECT_WALKER_ENTRY_DRAFT4(entries, 1, "/allOf/0", ""); - EXPECT_WALKER_ENTRY_DRAFT4(entries, 2, "/allOf/1", ""); - EXPECT_WALKER_ENTRY_DRAFT4(entries, 3, "/anyOf/0", ""); - EXPECT_WALKER_ENTRY_DRAFT4(entries, 4, "/oneOf/0", ""); - EXPECT_WALKER_ENTRY_DRAFT4(entries, 5, "/not", ""); - - // Applicators (object) - EXPECT_WALKER_ENTRY_DRAFT4(entries, 6, "/properties/foo", ""); - EXPECT_WALKER_ENTRY_DRAFT4(entries, 7, "/properties/bar", ""); - EXPECT_WALKER_ENTRY_DRAFT4(entries, 8, "/additionalProperties", ""); - EXPECT_WALKER_ENTRY_DRAFT4(entries, 9, "/patternProperties/^f", ""); - EXPECT_WALKER_ENTRY_DRAFT4(entries, 10, "/patternProperties/x$", ""); - EXPECT_WALKER_ENTRY_DRAFT4(entries, 11, "/dependencies/baz", ""); - - // Applicators (array) - EXPECT_WALKER_ENTRY_DRAFT4(entries, 12, "/additionalItems", ""); - EXPECT_WALKER_ENTRY_DRAFT4(entries, 13, "/items", ""); - EXPECT_WALKER_ENTRY_DRAFT4(entries, 14, "/items/items/0", "/items"); - EXPECT_WALKER_ENTRY_DRAFT4(entries, 15, "/items/items/1", "/items"); - - // Core - EXPECT_WALKER_ENTRY_DRAFT4_ORPHAN(entries, 16, "/definitions/foo", ""); -} - -TEST(JSONSchema_walker_draft4, definitions_subschemas) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "definitions": { - "foo": { - "properties": { - "bar": { - "additionalProperties": { - "type": "string" - } - } - } - } - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 4); - - EXPECT_WALKER_ENTRY_DRAFT4(entries, 0, "", std::nullopt); - EXPECT_WALKER_ENTRY_DRAFT4_ORPHAN(entries, 1, "/definitions/foo", ""); - EXPECT_WALKER_ENTRY_DRAFT4_ORPHAN( - entries, 2, "/definitions/foo/properties/bar", "/definitions/foo"); - EXPECT_WALKER_ENTRY_DRAFT4_ORPHAN( - entries, 3, "/definitions/foo/properties/bar/additionalProperties", - "/definitions/foo/properties/bar"); -} diff --git a/test/jsonschema/jsonschema_walker_draft6_test.cc b/test/jsonschema/jsonschema_walker_draft6_test.cc deleted file mode 100644 index 8ee4be7ca..000000000 --- a/test/jsonschema/jsonschema_walker_draft6_test.cc +++ /dev/null @@ -1,926 +0,0 @@ -#include - -#include - -#include "jsonschema_test_utils.h" - -#include // std::string_view -#include // std::unordered_set - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT6{ - {"http://json-schema.org/draft-06/schema#", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT6_HYPERSCHEMA{ - {"http://json-schema.org/draft-06/hyper-schema#", true}}; - -TEST(JSONSchema_walker_draft6, schema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$schema", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, id) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$id", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, ref) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$ref", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, definitions) { - using namespace sourcemeta::core; - const auto &result{schema_walker("definitions", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::LocationMembers); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, allOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("allOf", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, anyOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anyOf", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, oneOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("oneOf", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, not) { - using namespace sourcemeta::core; - const auto &result{schema_walker("not", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceNegate); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, items) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueOrElementsTraverseAnyItemOrItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft6, additionalItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("additionalItems", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseSomeItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"items"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft6, contains) { - using namespace sourcemeta::core; - const auto &result{schema_walker("contains", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseAnyItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft6, properties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("properties", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected_dependencies{"$ref"}; - EXPECT_EQ(result.dependencies, expected_dependencies); - const std::unordered_set expected_order_dependencies{ - "required"}; - EXPECT_EQ(result.order_dependencies, expected_order_dependencies); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft6, patternProperties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("patternProperties", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyRegex); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft6, dependencies) { - using namespace sourcemeta::core; - const auto &result{schema_walker("dependencies", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembersInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft6, additionalProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"properties", - "patternProperties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft6, propertyNames) { - using namespace sourcemeta::core; - const auto &result{schema_walker("propertyNames", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseAnyPropertyKey); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft6, type) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - EXPECT_TRUE(result.dependencies.empty()); - const std::unordered_set expected{"properties"}; - EXPECT_EQ(result.order_dependencies, expected); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, enum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, const) { - using namespace sourcemeta::core; - const auto &result{schema_walker("const", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, multipleOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("multipleOf", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft6, maximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft6, minimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft6, exclusiveMaximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("exclusiveMaximum", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft6, exclusiveMinimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("exclusiveMinimum", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft6, maxLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxLength", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft6, minLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minLength", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft6, pattern) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft6, maxItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxItems", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft6, minItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minItems", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft6, uniqueItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("uniqueItems", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft6, maxProperties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxProperties", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft6, minProperties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minProperties", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft6, required) { - using namespace sourcemeta::core; - const auto &result{schema_walker("required", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft6, format) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft6, title) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, description) { - using namespace sourcemeta::core; - const auto &result{schema_walker("description", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, default) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, examples) { - using namespace sourcemeta::core; - const auto &result{schema_walker("examples", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_links) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_href) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_rel) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_mediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("mediaType", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_submissionEncType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("submissionEncType", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_base) { - using namespace sourcemeta::core; - const auto &result{schema_walker("base", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_media) { - using namespace sourcemeta::core; - const auto &result{schema_walker("media", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_readOnly) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("readOnly", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_hrefSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("hrefSchema", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_targetSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetSchema", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_submissionSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("submissionSchema", VOCABULARIES_DRAFT6_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_links_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_href_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_rel_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_mediaType_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("mediaType", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, - hyperschema_submissionEncType_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("submissionEncType", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_base_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("base", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_media_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("media", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_readOnly_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("readOnly", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_6); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_hrefSchema_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("hrefSchema", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, hyperschema_targetSchema_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("targetSchema", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, - hyperschema_submissionSchema_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("submissionSchema", VOCABULARIES_DRAFT6)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft6, schema_keyword_priority_array) { - const auto &vocabularies = VOCABULARIES_DRAFT6; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("items", vocabularies, walker), 1); - EXPECT_EQ(schema_keyword_priority("additionalItems", vocabularies, walker), - 2); -} - -TEST(JSONSchema_walker_draft6, schema_keyword_priority_object) { - const auto &vocabularies = VOCABULARIES_DRAFT6; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 2); - EXPECT_EQ(schema_keyword_priority("patternProperties", vocabularies, walker), - 1); - EXPECT_EQ( - schema_keyword_priority("additionalProperties", vocabularies, walker), 3); -} - -TEST(JSONSchema_walker_draft6, schema_keyword_priority_unknown) { - const auto &vocabularies = VOCABULARIES_DRAFT6; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 1); -} - -TEST(JSONSchema_walker_draft6, instance_locations) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "allOf": [ { "type": "string" }, { "minLength": 3 } ], - "anyOf": [ { "type": "string" } ], - "oneOf": [ { "type": "string" } ], - "not": { "const": "bar" }, - "properties": { - "foo": { "type": "string" }, - "bar": false - }, - "additionalProperties": { "type": "number" }, - "patternProperties": { - "^f": { "type": "integer" }, - "x$": true - }, - "dependencies": { - "foo": [ "bar" ], - "baz": { "type": "string" } - }, - "propertyNames": { "minLength": 1 }, - "contains": { "type": "number" }, - "additionalItems": { "minimum": 2 }, - "items": { "items": [ true, false ] }, - "definitions": { "foo": true } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 19); - - EXPECT_WALKER_ENTRY_DRAFT6(entries, 0, "", std::nullopt); - - // Applicators (any) - EXPECT_WALKER_ENTRY_DRAFT6(entries, 1, "/allOf/0", ""); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 2, "/allOf/1", ""); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 3, "/anyOf/0", ""); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 4, "/oneOf/0", ""); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 5, "/not", ""); - - // Applicators (object) - EXPECT_WALKER_ENTRY_DRAFT6(entries, 6, "/properties/foo", ""); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 7, "/properties/bar", ""); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 8, "/additionalProperties", ""); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 9, "/patternProperties/^f", ""); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 10, "/patternProperties/x$", ""); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 11, "/dependencies/baz", ""); - EXPECT_WALKER_ENTRY_DRAFT6_PROPERTY_NAME(entries, 12, "/propertyNames", ""); - - // Applicators (array) - EXPECT_WALKER_ENTRY_DRAFT6(entries, 13, "/contains", ""); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 14, "/additionalItems", ""); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 15, "/items", ""); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 16, "/items/items/0", "/items"); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 17, "/items/items/1", "/items"); - - // Core - EXPECT_WALKER_ENTRY_DRAFT6_ORPHAN(entries, 18, "/definitions/foo", ""); -} - -TEST(JSONSchema_walker_draft6, definitions_subschemas) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "definitions": { - "foo": { - "properties": { - "bar": { - "additionalProperties": { - "type": "string" - } - } - } - } - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 4); - - EXPECT_WALKER_ENTRY_DRAFT6(entries, 0, "", std::nullopt); - EXPECT_WALKER_ENTRY_DRAFT6_ORPHAN(entries, 1, "/definitions/foo", ""); - EXPECT_WALKER_ENTRY_DRAFT6_ORPHAN( - entries, 2, "/definitions/foo/properties/bar", "/definitions/foo"); - EXPECT_WALKER_ENTRY_DRAFT6_ORPHAN( - entries, 3, "/definitions/foo/properties/bar/additionalProperties", - "/definitions/foo/properties/bar"); -} - -TEST(JSONSchema_walker_draft6, propertyNames_targets) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "propertyNames": { - "anyOf": [ - { "minLength": 1 }, - { "maxLength": 10 } - ], - "additionalProperties": { - "type": "boolean" - }, - "definitions": { - "test": { - "type": "string" - } - } - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 6); - - EXPECT_WALKER_ENTRY_DRAFT6(entries, 0, "", std::nullopt); - EXPECT_WALKER_ENTRY_DRAFT6_PROPERTY_NAME(entries, 1, "/propertyNames", ""); - EXPECT_WALKER_ENTRY_DRAFT6_PROPERTY_NAME(entries, 2, "/propertyNames/anyOf/0", - "/propertyNames"); - EXPECT_WALKER_ENTRY_DRAFT6_PROPERTY_NAME(entries, 3, "/propertyNames/anyOf/1", - "/propertyNames"); - EXPECT_WALKER_ENTRY_DRAFT6(entries, 4, "/propertyNames/additionalProperties", - "/propertyNames"); - EXPECT_WALKER_ENTRY_DRAFT6_ORPHAN( - entries, 5, "/propertyNames/definitions/test", "/propertyNames"); -} diff --git a/test/jsonschema/jsonschema_walker_draft7_test.cc b/test/jsonschema/jsonschema_walker_draft7_test.cc deleted file mode 100644 index 2aa2b062d..000000000 --- a/test/jsonschema/jsonschema_walker_draft7_test.cc +++ /dev/null @@ -1,1099 +0,0 @@ -#include - -#include - -#include "jsonschema_test_utils.h" - -#include // std::string_view -#include // std::unordered_set - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT7{ - {"http://json-schema.org/draft-07/schema#", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_DRAFT7_HYPERSCHEMA{ - {"http://json-schema.org/draft-07/hyper-schema#", true}}; - -TEST(JSONSchema_walker_draft7, schema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$schema", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, id) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$id", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, ref) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$ref", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Reference); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, definitions) { - using namespace sourcemeta::core; - const auto &result{schema_walker("definitions", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::LocationMembers); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, comment) { - using namespace sourcemeta::core; - const auto &result{schema_walker("$comment", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, allOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("allOf", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, anyOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anyOf", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, oneOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("oneOf", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, not) { - using namespace sourcemeta::core; - const auto &result{schema_walker("not", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceNegate); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, if) { - using namespace sourcemeta::core; - const auto &result{schema_walker("if", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceMaybe); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, then) { - using namespace sourcemeta::core; - const auto &result{schema_walker("then", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceMaybe); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"if"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, else) { - using namespace sourcemeta::core; - const auto &result{schema_walker("else", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceMaybe); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"if"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, items) { - using namespace sourcemeta::core; - const auto &result{schema_walker("items", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueOrElementsTraverseAnyItemOrItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft7, additionalItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("additionalItems", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseSomeItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"items"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft7, contains) { - using namespace sourcemeta::core; - const auto &result{schema_walker("contains", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueTraverseAnyItem); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft7, properties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("properties", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected_dependencies{"$ref"}; - EXPECT_EQ(result.dependencies, expected_dependencies); - const std::unordered_set expected_order_dependencies{ - "required"}; - EXPECT_EQ(result.order_dependencies, expected_order_dependencies); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft7, patternProperties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("patternProperties", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorMembersTraversePropertyRegex); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft7, dependencies) { - using namespace sourcemeta::core; - const auto &result{schema_walker("dependencies", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorMembersInPlaceSome); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft7, additionalProperties) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("additionalProperties", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseSomeProperty); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"properties", - "patternProperties"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft7, propertyNames) { - using namespace sourcemeta::core; - const auto &result{schema_walker("propertyNames", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, - SchemaKeywordType::ApplicatorValueTraverseAnyPropertyKey); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft7, type) { - using namespace sourcemeta::core; - const auto &result{schema_walker("type", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - EXPECT_TRUE(result.dependencies.empty()); - const std::unordered_set expected{"properties"}; - EXPECT_EQ(result.order_dependencies, expected); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, enum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("enum", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, const) { - using namespace sourcemeta::core; - const auto &result{schema_walker("const", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, multipleOf) { - using namespace sourcemeta::core; - const auto &result{schema_walker("multipleOf", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft7, maximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maximum", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft7, minimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minimum", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft7, exclusiveMaximum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("exclusiveMaximum", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft7, exclusiveMinimum) { - using namespace sourcemeta::core; - const auto &result{schema_walker("exclusiveMinimum", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - const auto instances = - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Integer, - sourcemeta::core::JSON::Type::Real}); - EXPECT_EQ(result.instances, instances); -} - -TEST(JSONSchema_walker_draft7, maxLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxLength", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft7, minLength) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minLength", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft7, pattern) { - using namespace sourcemeta::core; - const auto &result{schema_walker("pattern", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft7, maxItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxItems", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft7, minItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minItems", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft7, uniqueItems) { - using namespace sourcemeta::core; - const auto &result{schema_walker("uniqueItems", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Array})); -} - -TEST(JSONSchema_walker_draft7, maxProperties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("maxProperties", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft7, minProperties) { - using namespace sourcemeta::core; - const auto &result{schema_walker("minProperties", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft7, required) { - using namespace sourcemeta::core; - const auto &result{schema_walker("required", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Assertion); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::Object})); -} - -TEST(JSONSchema_walker_draft7, format) { - using namespace sourcemeta::core; - const auto &result{schema_walker("format", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft7, contentEncoding) { - using namespace sourcemeta::core; - const auto &result{schema_walker("contentEncoding", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft7, contentMediaType) { - using namespace sourcemeta::core; - const auto &result{schema_walker("contentMediaType", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_EQ(result.instances, - sourcemeta::core::make_set({sourcemeta::core::JSON::Type::String})); -} - -TEST(JSONSchema_walker_draft7, title) { - using namespace sourcemeta::core; - const auto &result{schema_walker("title", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, description) { - using namespace sourcemeta::core; - const auto &result{schema_walker("description", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, default) { - using namespace sourcemeta::core; - const auto &result{schema_walker("default", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, readOnly) { - using namespace sourcemeta::core; - const auto &result{schema_walker("readOnly", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, writeOnly) { - using namespace sourcemeta::core; - const auto &result{schema_walker("writeOnly", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, examples) { - using namespace sourcemeta::core; - const auto &result{schema_walker("examples", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Comment); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_links) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorElementsInPlace); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_base) { - using namespace sourcemeta::core; - const auto &result{schema_walker("base", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_anchor) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anchor", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_anchorPointer) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("anchorPointer", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_rel) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_href) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_templatePointers) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("templatePointers", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_templateRequired) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("templateRequired", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_targetMediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetMediaType", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_targetHints) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetHints", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_submissionMediaType) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("submissionMediaType", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - const std::unordered_set expected{"$ref"}; - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_hrefSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("hrefSchema", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_targetSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("targetSchema", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_headerSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("headerSchema", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_submissionSchema) { - using namespace sourcemeta::core; - const auto &result{ - schema_walker("submissionSchema", VOCABULARIES_DRAFT7_HYPERSCHEMA)}; - EXPECT_EQ(result.type, SchemaKeywordType::ApplicatorValueInPlaceOther); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), JSON_Schema_Draft_7_Hyper); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_links_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("links", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_base_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("base", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_anchor_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anchor", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_anchorPointer_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("anchorPointer", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_rel_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("rel", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_href_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("href", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, - hyperschema_templatePointers_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("templatePointers", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, - hyperschema_templateRequired_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("templateRequired", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, - hyperschema_targetMediaType_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("targetMediaType", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_targetHints_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("targetHints", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, - hyperschema_submissionMediaType_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("submissionMediaType", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_hrefSchema_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("hrefSchema", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_targetSchema_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("targetSchema", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, hyperschema_headerSchema_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("headerSchema", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, - hyperschema_submissionSchema_without_hyperschema) { - using namespace sourcemeta::core; - const auto &result{schema_walker("submissionSchema", VOCABULARIES_DRAFT7)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - const std::unordered_set expected{"$ref"}; - EXPECT_EQ(result.dependencies, expected); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_draft7, schema_keyword_priority_array) { - const auto &vocabularies = VOCABULARIES_DRAFT7; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("items", vocabularies, walker), 1); - EXPECT_EQ(schema_keyword_priority("additionalItems", vocabularies, walker), - 2); -} - -TEST(JSONSchema_walker_draft7, schema_keyword_priority_object) { - const auto &vocabularies = VOCABULARIES_DRAFT7; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("properties", vocabularies, walker), 2); - EXPECT_EQ(schema_keyword_priority("patternProperties", vocabularies, walker), - 1); - EXPECT_EQ( - schema_keyword_priority("additionalProperties", vocabularies, walker), 3); -} - -TEST(JSONSchema_walker_draft7, schema_keyword_priority_other) { - const auto &vocabularies = VOCABULARIES_DRAFT7; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("if", vocabularies, walker), 1); - EXPECT_EQ(schema_keyword_priority("then", vocabularies, walker), 2); - EXPECT_EQ(schema_keyword_priority("else", vocabularies, walker), 2); -} - -TEST(JSONSchema_walker_draft7, schema_keyword_priority_unknown) { - const auto &vocabularies = VOCABULARIES_DRAFT7; - const auto &walker = sourcemeta::core::schema_walker; - using namespace sourcemeta::core; - EXPECT_EQ(schema_keyword_priority("foobar", vocabularies, walker), 1); -} - -TEST(JSONSchema_walker_draft7, instance_locations) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "allOf": [ { "type": "string" }, { "minLength": 3 } ], - "anyOf": [ { "type": "string" } ], - "oneOf": [ { "type": "string" } ], - "if": { "const": "foo" }, - "then": true, - "else": { "maxLength": 10 }, - "not": { "const": "bar" }, - "properties": { - "foo": { "type": "string" }, - "bar": false - }, - "additionalProperties": { "type": "number" }, - "patternProperties": { - "^f": { "type": "integer" }, - "x$": true - }, - "dependencies": { - "foo": [ "bar" ], - "baz": { "type": "string" } - }, - "propertyNames": { "minLength": 1 }, - "contains": { "type": "number" }, - "additionalItems": { "minimum": 2 }, - "items": { "items": [ true, false ] }, - "definitions": { "foo": true } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 22); - - EXPECT_WALKER_ENTRY_DRAFT7(entries, 0, "", std::nullopt); - - // Applicators (any) - EXPECT_WALKER_ENTRY_DRAFT7(entries, 1, "/allOf/0", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 2, "/allOf/1", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 3, "/anyOf/0", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 4, "/oneOf/0", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 5, "/if", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 6, "/then", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 7, "/else", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 8, "/not", ""); - - // Applicators (object) - EXPECT_WALKER_ENTRY_DRAFT7(entries, 9, "/properties/foo", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 10, "/properties/bar", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 11, "/additionalProperties", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 12, "/patternProperties/^f", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 13, "/patternProperties/x$", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 14, "/dependencies/baz", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 15, "/propertyNames", ""); - - // Applicators (array) - EXPECT_WALKER_ENTRY_DRAFT7(entries, 16, "/contains", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 17, "/additionalItems", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 18, "/items", ""); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 19, "/items/items/0", "/items"); - EXPECT_WALKER_ENTRY_DRAFT7(entries, 20, "/items/items/1", "/items"); - - // Core - EXPECT_WALKER_ENTRY_DRAFT7_ORPHAN(entries, 21, "/definitions/foo", ""); -} - -TEST(JSONSchema_walker_draft7, definitions_subschemas) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "foo": { - "properties": { - "bar": { - "additionalProperties": { - "type": "string" - } - } - } - } - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 4); - - EXPECT_WALKER_ENTRY_DRAFT7(entries, 0, "", std::nullopt); - EXPECT_WALKER_ENTRY_DRAFT7_ORPHAN(entries, 1, "/definitions/foo", ""); - EXPECT_WALKER_ENTRY_DRAFT7_ORPHAN( - entries, 2, "/definitions/foo/properties/bar", "/definitions/foo"); - EXPECT_WALKER_ENTRY_DRAFT7_ORPHAN( - entries, 3, "/definitions/foo/properties/bar/additionalProperties", - "/definitions/foo/properties/bar"); -} diff --git a/test/jsonschema/jsonschema_walker_openapi_test.cc b/test/jsonschema/jsonschema_walker_openapi_test.cc deleted file mode 100644 index 2703e77ec..000000000 --- a/test/jsonschema/jsonschema_walker_openapi_test.cc +++ /dev/null @@ -1,184 +0,0 @@ -#include - -#include - -#include "jsonschema_test_utils.h" - -static const sourcemeta::core::Vocabularies VOCABULARIES_OPENAPI_3_1{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}, - {"https://spec.openapis.org/oas/3.1/vocab/base", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_OPENAPI_3_2{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}, - {"https://spec.openapis.org/oas/3.2/vocab/base", true}}; - -static const sourcemeta::core::Vocabularies VOCABULARIES_2020_12_CORE{ - {"https://json-schema.org/draft/2020-12/vocab/core", true}}; - -TEST(JSONSchema_walker_openapi_3_1, discriminator) { - using namespace sourcemeta::core; - const auto &result{schema_walker("discriminator", VOCABULARIES_OPENAPI_3_1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), OpenAPI_3_1_Base); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_1, discriminator_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("discriminator", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_1, xml) { - using namespace sourcemeta::core; - const auto &result{schema_walker("xml", VOCABULARIES_OPENAPI_3_1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), OpenAPI_3_1_Base); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_1, xml_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("xml", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_1, externalDocs) { - using namespace sourcemeta::core; - const auto &result{schema_walker("externalDocs", VOCABULARIES_OPENAPI_3_1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), OpenAPI_3_1_Base); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_1, externalDocs_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("externalDocs", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_1, example) { - using namespace sourcemeta::core; - const auto &result{schema_walker("example", VOCABULARIES_OPENAPI_3_1)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), OpenAPI_3_1_Base); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_1, example_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("example", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_2, discriminator) { - using namespace sourcemeta::core; - const auto &result{schema_walker("discriminator", VOCABULARIES_OPENAPI_3_2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), OpenAPI_3_2_Base); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_2, discriminator_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("discriminator", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_2, xml) { - using namespace sourcemeta::core; - const auto &result{schema_walker("xml", VOCABULARIES_OPENAPI_3_2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), OpenAPI_3_2_Base); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_2, xml_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("xml", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_2, externalDocs) { - using namespace sourcemeta::core; - const auto &result{schema_walker("externalDocs", VOCABULARIES_OPENAPI_3_2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), OpenAPI_3_2_Base); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_2, externalDocs_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("externalDocs", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_2, example) { - using namespace sourcemeta::core; - const auto &result{schema_walker("example", VOCABULARIES_OPENAPI_3_2)}; - EXPECT_EQ(result.type, SchemaKeywordType::Other); - EXPECT_TRUE(result.vocabulary.has_value()); - EXPECT_VOCABULARY_KNOWN(result.vocabulary.value(), OpenAPI_3_2_Base); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} - -TEST(JSONSchema_walker_openapi_3_2, example_without_vocabulary) { - using namespace sourcemeta::core; - const auto &result{schema_walker("example", VOCABULARIES_2020_12_CORE)}; - EXPECT_EQ(result.type, SchemaKeywordType::Unknown); - EXPECT_FALSE(result.vocabulary.has_value()); - EXPECT_TRUE(result.dependencies.empty()); - EXPECT_TRUE(result.order_dependencies.empty()); - EXPECT_TRUE(result.instances.none()); -} diff --git a/test/jsonschema/jsonschema_walker_test.cc b/test/jsonschema/jsonschema_walker_test.cc deleted file mode 100644 index 9f9891b70..000000000 --- a/test/jsonschema/jsonschema_walker_test.cc +++ /dev/null @@ -1,1174 +0,0 @@ -#include - -#include -#include -#include - -#include - -static auto test_resolver(std::string_view identifier) - -> std::optional { - if (identifier == "https://sourcemeta.com/test-metaschema") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://sourcemeta.com/test-metaschema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://sourcemeta.com/vocab/test-1": true - } - })JSON"); - } else if (identifier == "https://sourcemeta.com/custom-vocab") { - return sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://sourcemeta.com/custom-vocab", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://sourcemeta.com/vocab/test-2": true - } - })JSON"); - } else { - return sourcemeta::core::schema_resolver(identifier); - } -} - -static auto test_walker(std::string_view keyword, - const sourcemeta::core::Vocabularies &vocabularies) - -> const sourcemeta::core::SchemaWalkerResult & { - using namespace sourcemeta::core; - - if (vocabularies.get("https://sourcemeta.com/vocab/test-1").has_value()) { - if (keyword == "schema") { - static const SchemaWalkerResult result{ - SchemaKeywordType::ApplicatorValueTraverseSomeProperty, - "https://sourcemeta.com/vocab/test-1", - {}, - {}, - {}}; - return result; - } - - if (keyword == "schemas") { - static const SchemaWalkerResult result{ - SchemaKeywordType::ApplicatorElementsTraverseItem, - "https://sourcemeta.com/vocab/test-1", - {}, - {}, - {}}; - return result; - } - - if (keyword == "schemaMap") { - static const SchemaWalkerResult result{ - SchemaKeywordType::ApplicatorMembersTraversePropertyStatic, - "https://sourcemeta.com/vocab/test-1", - {}, - {}, - {}}; - return result; - } - - if (keyword == "schemaOrSchemas") { - static const SchemaWalkerResult result{ - SchemaKeywordType::ApplicatorValueOrElementsTraverseAnyItemOrItem, - "https://sourcemeta.com/vocab/test-1", - {}, - {}, - {}}; - return result; - } - } - - if (vocabularies.get("https://sourcemeta.com/vocab/test-2").has_value()) { - if (keyword == "custom") { - static const SchemaWalkerResult result{ - SchemaKeywordType::ApplicatorValueTraverseSomeProperty, - "https://sourcemeta.com/vocab/test-2", - {}, - {}, - {}}; - return result; - } - } - - static const SchemaWalkerResult unknown{ - SchemaKeywordType::Unknown, "", {}, {}, {}}; - return unknown; -} - -TEST(JSONSchema_walker, true) { - const sourcemeta::core::JSON document{true}; - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.at(0).is_boolean(), true); - EXPECT_EQ(subschemas.at(0).to_boolean(), true); - EXPECT_EQ(entries.size(), 1); - - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_TRUE(entries.at(0).dialect.empty()); - EXPECT_FALSE(entries.at(0).base_dialect.has_value()); - EXPECT_TRUE(entries.at(0).vocabularies.empty()); -} - -TEST(JSONSchema_walker, false) { - const sourcemeta::core::JSON document{false}; - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.at(0).is_boolean(), true); - EXPECT_EQ(subschemas.at(0).to_boolean(), false); - EXPECT_EQ(entries.size(), 1); - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_TRUE(entries.at(0).dialect.empty()); - EXPECT_FALSE(entries.at(0).base_dialect.has_value()); - EXPECT_TRUE(entries.at(0).vocabularies.empty()); -} - -TEST(JSONSchema_walker, value) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schema": { - "schema": { - "foo": 1 - } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 3); - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schema": { - "schema": { - "foo": 1 - } - } - })JSON")); - EXPECT_EQ(subschemas.at(1), sourcemeta::core::parse_json(R"JSON({ - "schema": { - "foo": 1 - } - })JSON")); - EXPECT_EQ(subschemas.at(2), sourcemeta::core::parse_json(R"JSON({ - "foo": 1 - })JSON")); - - EXPECT_EQ(entries.size(), 3); - - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/schema"); - EXPECT_EQ(entries.at(1).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), - "/schema/schema"); - EXPECT_EQ(entries.at(2).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(2).base_dialect.has_value()); - EXPECT_EQ(entries.at(2).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, value_with_dialect_no_identifier) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema" - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 2); - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schema": { - "$schema": "https://json-schema.org/draft/2019-09/schema" - } - })JSON")); - EXPECT_EQ(subschemas.at(1), sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON")); - - EXPECT_EQ(entries.size(), 2); - - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - // `$schema` outside a schema resource is ignored - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/schema"); - EXPECT_EQ(entries.at(1).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, value_invalid) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schema": [ { "foo": 1 } ] - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schema": [ { "foo": 1 } ] - })JSON")); - - EXPECT_EQ(entries.size(), 1); - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, elements) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schemas": [ { "foo": 1 }, { "schema": { "bar": 2 } } ] - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 4); - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schemas": [ { "foo": 1 }, { "schema": { "bar": 2 } } ] - })JSON")); - EXPECT_EQ(subschemas.at(1), sourcemeta::core::parse_json(R"JSON({ - "foo": 1 - })JSON")); - EXPECT_EQ(subschemas.at(2), sourcemeta::core::parse_json(R"JSON({ - "schema": { "bar": 2 } - })JSON")); - EXPECT_EQ(subschemas.at(3), sourcemeta::core::parse_json(R"JSON({ - "bar": 2 - })JSON")); - - EXPECT_EQ(entries.size(), 4); - - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/schemas/0"); - EXPECT_EQ(entries.at(1).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), "/schemas/1"); - EXPECT_EQ(entries.at(2).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(2).base_dialect.has_value()); - EXPECT_EQ(entries.at(2).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(3).pointer), - "/schemas/1/schema"); - EXPECT_EQ(entries.at(3).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(3).base_dialect.has_value()); - EXPECT_EQ(entries.at(3).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, elements_invalid) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schemas": { "foo": 1 } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schemas": { "foo": 1 } - })JSON")); - - EXPECT_EQ(entries.size(), 1); - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, members) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schemaMap": { - "foo": { - "schema": { - "bar": 1 - } - } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 3); - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schemaMap": { - "foo": { - "schema": { - "bar": 1 - } - } - } - })JSON")); - EXPECT_EQ(subschemas.at(1), sourcemeta::core::parse_json(R"JSON({ - "schema": { "bar": 1 } - })JSON")); - EXPECT_EQ(subschemas.at(2), sourcemeta::core::parse_json(R"JSON({ - "bar": 1 - })JSON")); - - EXPECT_EQ(entries.size(), 3); - - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), - "/schemaMap/foo"); - EXPECT_EQ(entries.at(1).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), - "/schemaMap/foo/schema"); - EXPECT_EQ(entries.at(2).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(2).base_dialect.has_value()); - EXPECT_EQ(entries.at(2).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, members_invalid) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schemaMap": [ { "foo": 1 } ] - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schemaMap": [ { "foo": 1 } ] - })JSON")); - - EXPECT_EQ(entries.size(), 1); - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, value_or_elements) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schemaOrSchemas": { - "schemaOrSchemas": [ - { "foo": 1 } - ] - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 3); - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schemaOrSchemas": { - "schemaOrSchemas": [ - { "foo": 1 } - ] - } - })JSON")); - EXPECT_EQ(subschemas.at(1), sourcemeta::core::parse_json(R"JSON({ - "schemaOrSchemas": [ { "foo": 1 } ] - })JSON")); - - EXPECT_EQ(subschemas.at(2), sourcemeta::core::parse_json(R"JSON({ - "foo": 1 - })JSON")); - - EXPECT_EQ(entries.size(), 3); - - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), - "/schemaOrSchemas"); - EXPECT_EQ(entries.at(1).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), - "/schemaOrSchemas/schemaOrSchemas/0"); - EXPECT_EQ(entries.at(2).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(2).base_dialect.has_value()); - EXPECT_EQ(entries.at(2).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, no_metaschema_and_no_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "schema": { "foo": 1 } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 1); - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "schema": { "foo": 1 } - })JSON")); - - EXPECT_EQ(entries.size(), 1); - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_TRUE(entries.at(0).dialect.empty()); - EXPECT_FALSE(entries.at(0).base_dialect.has_value()); -} - -TEST(JSONSchema_walker, no_metaschema_with_default) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "schema": { - "schema": { - "foo": 1 - } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, test_walker, test_resolver, - "https://sourcemeta.com/test-metaschema")) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 3); - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "schema": { - "schema": { - "foo": 1 - } - } - })JSON")); - EXPECT_EQ(subschemas.at(1), sourcemeta::core::parse_json(R"JSON({ - "schema": { - "foo": 1 - } - })JSON")); - EXPECT_EQ(subschemas.at(2), sourcemeta::core::parse_json(R"JSON({ - "foo": 1 - })JSON")); - - EXPECT_EQ(entries.size(), 3); - - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/schema"); - EXPECT_EQ(entries.at(1).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), - "/schema/schema"); - EXPECT_EQ(entries.at(2).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(2).base_dialect.has_value()); - EXPECT_EQ(entries.at(2).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, unknown_keyword_from_other_vocab) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schema": { - "custom": { "foo": 1 } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 2); - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schema": { - "custom": { "foo": 1 } - } - })JSON")); - EXPECT_EQ(subschemas.at(1), sourcemeta::core::parse_json(R"JSON({ - "custom": { "foo": 1 } - })JSON")); - - EXPECT_EQ(entries.size(), 2); - - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/schema"); - EXPECT_EQ(entries.at(1).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, multi_metaschemas) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schema": { - "$id": "https://www.example.com", - "$schema": "https://sourcemeta.com/custom-vocab", - "custom": { "foo": 1 } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 3); - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schema": { - "$id": "https://www.example.com", - "$schema": "https://sourcemeta.com/custom-vocab", - "custom": { "foo": 1 } - } - })JSON")); - EXPECT_EQ(subschemas.at(1), sourcemeta::core::parse_json(R"JSON({ - "$id": "https://www.example.com", - "$schema": "https://sourcemeta.com/custom-vocab", - "custom": { "foo": 1 } - })JSON")); - EXPECT_EQ(subschemas.at(2), sourcemeta::core::parse_json(R"JSON({ - "foo": 1 - })JSON")); - - EXPECT_EQ(entries.size(), 3); - - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/schema"); - EXPECT_EQ(entries.at(1).dialect, "https://sourcemeta.com/custom-vocab"); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), - "/schema/custom"); - EXPECT_EQ(entries.at(2).dialect, "https://sourcemeta.com/custom-vocab"); - EXPECT_TRUE(entries.at(2).base_dialect.has_value()); - EXPECT_EQ(entries.at(2).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, flat) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schema": { - "schema": { "foo": 1 } - }, - "schemaMap": { - "foo": { - "schema": { "foo": 2 } - } - } - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIteratorFlat( - document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 2); - EXPECT_EQ(entries.size(), 2); - - // We don't guarantee any specific ordering - if (subschemas.at(0).at("schema").at("foo").to_integer() == 1) { - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "schema": { "foo": 1 } - })JSON")); - EXPECT_EQ(subschemas.at(1), sourcemeta::core::parse_json(R"JSON({ - "schema": { "foo": 2 } - })JSON")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), "/schema"); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), - "/schemaMap/foo"); - EXPECT_EQ(entries.at(1).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - } else { - EXPECT_EQ(subschemas.at(1), sourcemeta::core::parse_json(R"JSON({ - "schema": { "foo": 1 } - })JSON")); - EXPECT_EQ(subschemas.at(0), sourcemeta::core::parse_json(R"JSON({ - "schema": { "foo": 2 } - })JSON")); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/schema"); - EXPECT_EQ(entries.at(1).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(0).pointer), - "/schemaMap/foo"); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - } -} - -TEST(JSONSchema_walker, flat_non_modify) { - const std::string json{R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schema": { - "schema": { "foo": 1 } - }, - "schemaMap": { - "foo": { - "schema": { "foo": 2 } - } - } - })JSON"}; - - sourcemeta::core::JSON document = sourcemeta::core::parse_json(json); - for (const auto &entry : sourcemeta::core::SchemaIteratorFlat( - document, test_walker, test_resolver)) { - sourcemeta::core::set(document, sourcemeta::core::to_pointer(entry.pointer), - sourcemeta::core::JSON{true}); - } - - EXPECT_EQ(document, sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schema": true, - "schemaMap": { - "foo": true - } - })JSON")); -} - -TEST(JSONSchema_walker, flat_no_metaschema) { - const sourcemeta::core::JSON document = - sourcemeta::core::parse_json(R"JSON({ "foo": 1 })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIteratorFlat( - document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 0); - EXPECT_EQ(entries.size(), 0); -} - -TEST(JSONSchema_walker, members_with_array) { - const std::string json{R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schemaMap": { - "foo": { "test": 1 }, - "bar": [ "baz" ] - } - })JSON"}; - - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(json); - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 2); - EXPECT_EQ(subschemas.at(0), document); - EXPECT_EQ(subschemas.at(1), sourcemeta::core::parse_json(R"JSON({ - "test": 1 - })JSON")); - - EXPECT_EQ(entries.size(), 2); - - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), - "/schemaMap/foo"); - EXPECT_EQ(entries.at(1).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, elements_with_string_items) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schemas": [ { "foo": 1 }, "foo" ] - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 2); - EXPECT_EQ(subschemas.at(0), document); - EXPECT_EQ(subschemas.at(1), sourcemeta::core::parse_json(R"JSON({ - "foo": 1 - })JSON")); - - EXPECT_EQ(entries.size(), 2); - - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/schemas/0"); - EXPECT_EQ(entries.at(1).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, value_or_elements_with_string_items) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://sourcemeta.com/test-metaschema", - "schemaOrSchemas": [ { "foo": 1 }, "foo" ] - })JSON"); - - std::vector subschemas; - std::vector entries; - for (const auto &entry : - sourcemeta::core::SchemaIterator(document, test_walker, test_resolver)) { - subschemas.push_back(sourcemeta::core::get(document, entry.pointer)); - entries.push_back(entry); - } - - EXPECT_EQ(subschemas.size(), 2); - EXPECT_EQ(subschemas.at(0), document); - EXPECT_EQ(subschemas.at(1), sourcemeta::core::parse_json(R"JSON({ - "foo": 1 - })JSON")); - - EXPECT_EQ(entries.size(), 2); - - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), - "/schemaOrSchemas/0"); - EXPECT_EQ(entries.at(1).dialect, "https://sourcemeta.com/test-metaschema"); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); -} - -TEST(JSONSchema_walker, override_at_root) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "x-sourcemeta-dialect-override-subschema": - "https://json-schema.org/draft/2020-12/schema", - "type": "string" - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 1); - - EXPECT_FALSE(entries.at(0).parent.has_value()); - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_EQ(entries.at(0).vocabularies.size(), 7); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - EXPECT_FALSE(entries.at(0).orphan); - EXPECT_FALSE(entries.at(0).property_name); -} - -TEST(JSONSchema_walker, override_does_not_inherit_to_children) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "x-sourcemeta-dialect-override-subschema": - "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { "type": "string" } - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 2); - - EXPECT_FALSE(entries.at(0).parent.has_value()); - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_EQ(entries.at(0).vocabularies.size(), 7); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - EXPECT_FALSE(entries.at(0).orphan); - EXPECT_FALSE(entries.at(0).property_name); - - EXPECT_TRUE(entries.at(1).parent.has_value()); - EXPECT_TRUE(entries.at(1).parent.value().empty()); - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), - "/properties/foo"); - EXPECT_EQ(entries.at(1).dialect, "http://json-schema.org/draft-04/schema#"); - EXPECT_EQ(entries.at(1).vocabularies.size(), 1); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4); - EXPECT_FALSE(entries.at(1).orphan); - EXPECT_FALSE(entries.at(1).property_name); -} - -TEST(JSONSchema_walker, override_changes_child_discovery) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "x-sourcemeta-dialect-override-subschema": - "https://json-schema.org/draft/2020-12/schema", - "items": [ - { "type": "string" }, - { "type": "number" } - ] - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 1); - - EXPECT_FALSE(entries.at(0).parent.has_value()); - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_EQ(entries.at(0).vocabularies.size(), 7); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - EXPECT_FALSE(entries.at(0).orphan); - EXPECT_FALSE(entries.at(0).property_name); -} - -TEST(JSONSchema_walker, override_applies_at_non_resource_subschema) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "properties": { - "foo": { - "x-sourcemeta-dialect-override-subschema": - "http://json-schema.org/draft-04/schema#", - "type": "string" - } - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 2); - - EXPECT_FALSE(entries.at(0).parent.has_value()); - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_EQ(entries.at(0).vocabularies.size(), 7); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - EXPECT_FALSE(entries.at(0).orphan); - EXPECT_FALSE(entries.at(0).property_name); - - EXPECT_TRUE(entries.at(1).parent.has_value()); - EXPECT_TRUE(entries.at(1).parent.value().empty()); - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), - "/properties/foo"); - EXPECT_EQ(entries.at(1).dialect, "http://json-schema.org/draft-04/schema#"); - EXPECT_EQ(entries.at(1).vocabularies.size(), 1); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_4); - EXPECT_FALSE(entries.at(1).orphan); - EXPECT_FALSE(entries.at(1).property_name); -} - -TEST(JSONSchema_walker, override_ignored_sibling_to_ref_in_draft7) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "bar": { "type": "string" } - }, - "properties": { - "foo": { - "$ref": "#/definitions/bar", - "$id": "https://example.com/foo", - "x-sourcemeta-dialect-override-subschema": - "https://json-schema.org/draft/2020-12/schema" - } - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 3); - - EXPECT_FALSE(entries.at(0).parent.has_value()); - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, "http://json-schema.org/draft-07/schema#"); - EXPECT_EQ(entries.at(0).vocabularies.size(), 1); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7); - EXPECT_FALSE(entries.at(0).orphan); - EXPECT_FALSE(entries.at(0).property_name); - - EXPECT_TRUE(entries.at(1).parent.has_value()); - EXPECT_TRUE(entries.at(1).parent.value().empty()); - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), - "/definitions/bar"); - EXPECT_EQ(entries.at(1).dialect, "http://json-schema.org/draft-07/schema#"); - EXPECT_EQ(entries.at(1).vocabularies.size(), 1); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7); - EXPECT_TRUE(entries.at(1).orphan); - EXPECT_FALSE(entries.at(1).property_name); - - EXPECT_TRUE(entries.at(2).parent.has_value()); - EXPECT_TRUE(entries.at(2).parent.value().empty()); - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), - "/properties/foo"); - EXPECT_EQ(entries.at(2).dialect, "http://json-schema.org/draft-07/schema#"); - EXPECT_EQ(entries.at(2).vocabularies.size(), 1); - EXPECT_TRUE(entries.at(2).base_dialect.has_value()); - EXPECT_EQ(entries.at(2).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_Draft_7); - EXPECT_FALSE(entries.at(2).orphan); - EXPECT_FALSE(entries.at(2).property_name); -} - -TEST(JSONSchema_walker, override_honored_sibling_to_ref_in_2019_09) { - const sourcemeta::core::JSON document = sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$defs": { - "bar": { "type": "string" } - }, - "properties": { - "foo": { - "$ref": "#/$defs/bar", - "$id": "https://example.com/foo", - "x-sourcemeta-dialect-override-subschema": - "https://json-schema.org/draft/2020-12/schema" - } - } - })JSON"); - - std::vector entries; - for (const auto &entry : sourcemeta::core::SchemaIterator( - document, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver)) { - entries.push_back(entry); - } - - EXPECT_EQ(entries.size(), 3); - - EXPECT_FALSE(entries.at(0).parent.has_value()); - EXPECT_TRUE(entries.at(0).pointer.empty()); - EXPECT_EQ(entries.at(0).dialect, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_EQ(entries.at(0).vocabularies.size(), 6); - EXPECT_TRUE(entries.at(0).base_dialect.has_value()); - EXPECT_EQ(entries.at(0).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); - EXPECT_FALSE(entries.at(0).orphan); - EXPECT_FALSE(entries.at(0).property_name); - - EXPECT_TRUE(entries.at(1).parent.has_value()); - EXPECT_TRUE(entries.at(1).parent.value().empty()); - EXPECT_EQ(sourcemeta::core::to_string(entries.at(1).pointer), "/$defs/bar"); - EXPECT_EQ(entries.at(1).dialect, - "https://json-schema.org/draft/2019-09/schema"); - EXPECT_EQ(entries.at(1).vocabularies.size(), 6); - EXPECT_TRUE(entries.at(1).base_dialect.has_value()); - EXPECT_EQ(entries.at(1).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2019_09); - EXPECT_TRUE(entries.at(1).orphan); - EXPECT_FALSE(entries.at(1).property_name); - - EXPECT_TRUE(entries.at(2).parent.has_value()); - EXPECT_TRUE(entries.at(2).parent.value().empty()); - EXPECT_EQ(sourcemeta::core::to_string(entries.at(2).pointer), - "/properties/foo"); - EXPECT_EQ(entries.at(2).dialect, - "https://json-schema.org/draft/2020-12/schema"); - EXPECT_EQ(entries.at(2).vocabularies.size(), 7); - EXPECT_TRUE(entries.at(2).base_dialect.has_value()); - EXPECT_EQ(entries.at(2).base_dialect.value(), - sourcemeta::core::SchemaBaseDialect::JSON_Schema_2020_12); - EXPECT_FALSE(entries.at(2).orphan); - EXPECT_FALSE(entries.at(2).property_name); -} diff --git a/test/jsonschema/jsonschema_wrap_test.cc b/test/jsonschema/jsonschema_wrap_test.cc deleted file mode 100644 index c9e86397d..000000000 --- a/test/jsonschema/jsonschema_wrap_test.cc +++ /dev/null @@ -1,805 +0,0 @@ -#include - -#include -#include - -#include // std::pair - -static auto wrap_schema(const sourcemeta::core::JSON &schema, - const sourcemeta::core::Pointer &pointer, - std::string_view default_dialect = "") - -> std::pair { - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(schema, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, default_dialect); - const auto location{ - frame.traverse(sourcemeta::core::to_weak_pointer(pointer))}; - assert(location.has_value()); - sourcemeta::core::WeakPointer base; - auto result{sourcemeta::core::wrap(schema, frame, location.value().get(), - sourcemeta::core::schema_resolver, base)}; - return {std::move(result), sourcemeta::core::to_pointer(base)}; -} - -TEST(JSONSchema_wrap, identifier_without_fragment) { - const auto identifier{"https://www.example.com"}; - const auto result{sourcemeta::core::wrap(identifier)}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.example.com" - })JSON")}; - - EXPECT_EQ(result, expected); -} - -// Should still work, as people might be relying on relative URIs -// as identifiers though still correctly resolving those -TEST(JSONSchema_wrap, identifier_relative) { - const auto identifier{"/foo/bar"}; - const auto result{sourcemeta::core::wrap(identifier)}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "/foo/bar" - })JSON")}; - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_wrap, identifier_with_fragment) { - const auto identifier{"https://www.example.com#/foo/bar"}; - const auto result{sourcemeta::core::wrap(identifier)}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://www.example.com#/foo/bar" - })JSON")}; - - EXPECT_EQ(result, expected); -} - -TEST(JSONSchema_wrap, schema_without_identifier) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { - "type": "string" - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {"items"})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, schema_without_identifier_and_relative_uri) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { - "$ref": "relative" - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {"items"})}; - - // We don't want the relative reference to be resolved against - // an absolute base - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "__sourcemeta-core-wrap__#/items", - "$defs": { - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "__sourcemeta-core-wrap__", - "items": { - "$ref": "relative" - } - } - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_EQ(base.size(), 1); - EXPECT_TRUE(base.at(0).is_property()); - EXPECT_EQ(base.at(0).to_property(), "$ref"); -} - -TEST(JSONSchema_wrap, schema_without_identifier_with_default_dialect) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "items": { - "type": "string" - } - })JSON")}; - - const auto [result, base]{wrap_schema( - schema, {"items"}, "https://json-schema.org/draft/2020-12/schema")}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, - schema_without_identifier_with_different_default_dialect) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { - "type": "string" - } - })JSON")}; - - const auto [result, base]{wrap_schema( - schema, {"items"}, "https://json-schema.org/draft/2019-09/schema")}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, schema_without_identifier_empty_pointer) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { - "type": "string" - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "items": { - "type": "string" - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, schema_without_identifier_without_dialect) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "items": { - "type": "string" - } - })JSON")}; - - EXPECT_THROW(wrap_schema(schema, {"items"}), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_wrap, schema_with_identifier) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://sourcemeta.com/1", - "items": { - "type": "string" - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {"items"})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, schema_with_identifier_trailing_empty_fragment) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://sourcemeta.com/1#", - "items": { - "type": "string" - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {"items"})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, schema_with_identifier_different_default_dialect) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://sourcemeta.com/1", - "items": { - "type": "string" - } - })JSON")}; - - const auto [result, base]{wrap_schema( - schema, {"items"}, "https://json-schema.org/draft/2019-09/schema")}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "string" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, schema_with_identifier_default_dialect) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/1", - "items": { - "type": "string" - } - })JSON")}; - - const auto [result, base]{wrap_schema( - schema, {"items"}, "https://json-schema.org/draft/2019-09/schema")}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "type": "string" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, schema_with_identifier_empty_pointer) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://sourcemeta.com/1", - "items": { - "type": "string" - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://sourcemeta.com/1", - "items": { - "type": "string" - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, schema_with_identifier_no_dialect) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$id": "https://sourcemeta.com/1", - "items": { - "type": "string" - } - })JSON")}; - - EXPECT_THROW(wrap_schema(schema, {"items"}), - sourcemeta::core::SchemaUnknownBaseDialectError); -} - -TEST(JSONSchema_wrap, draft4_standalone_ref_with_default_dialect) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$ref": "https://example.com" - })JSON")}; - - const auto [result, base]{ - wrap_schema(schema, {}, "http://json-schema.org/draft-04/schema#")}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "https://example.com" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, draft4_top_level_ref_with_id_empty) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com", - "$ref": "#/definitions/foo", - "definitions": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "https://example.com", - "$ref": "#/definitions/foo", - "definitions": { - "foo": {} - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, draft4_top_level_ref_without_id_empty) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "#/definitions/foo", - "definitions": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "#/definitions/foo", - "definitions": { - "foo": {} - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, draft6_standalone_ref_with_default_dialect) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$ref": "https://example.com" - })JSON")}; - - const auto [result, base]{ - wrap_schema(schema, {}, "http://json-schema.org/draft-06/schema#")}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$ref": "https://example.com" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, draft6_top_level_ref_with_id_empty) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://example.com", - "$ref": "#/definitions/foo", - "definitions": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://example.com", - "$ref": "#/definitions/foo", - "definitions": { - "foo": {} - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, draft6_top_level_ref_without_id_empty) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$ref": "#/definitions/foo", - "definitions": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-06/schema#", - "$ref": "#/definitions/foo", - "definitions": { - "foo": {} - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, draft7_standalone_ref_with_default_dialect) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$ref": "https://example.com" - })JSON")}; - - const auto [result, base]{ - wrap_schema(schema, {}, "http://json-schema.org/draft-07/schema#")}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "https://example.com" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, draft7_top_level_ref_with_id_empty) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com", - "$ref": "#/definitions/foo", - "definitions": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://example.com", - "$ref": "#/definitions/foo", - "definitions": { - "foo": {} - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, draft7_top_level_ref_without_id_empty) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "#/definitions/foo", - "definitions": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "http://json-schema.org/draft-07/schema#", - "$ref": "#/definitions/foo", - "definitions": { - "foo": {} - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, 2019_09_top_level_ref_with_id_empty) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com", - "$ref": "#/$defs/foo", - "$defs": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com", - "$ref": "#/$defs/foo", - "$defs": { - "foo": {} - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, 2019_09_top_level_ref_with_id_defs_foo) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://example.com", - "$ref": "#/$defs/foo", - "$defs": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {"$defs", "foo"})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, 2019_09_top_level_ref_without_id_empty) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "#/$defs/foo", - "$defs": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "#/$defs/foo", - "$defs": { - "foo": {} - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, 2019_09_top_level_ref_without_id_defs_foo) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$ref": "#/$defs/foo", - "$defs": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {"$defs", "foo"})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2019-09/schema" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, 2020_12_top_level_ref_with_id_empty) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com", - "$ref": "#/$defs/foo", - "$defs": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com", - "$ref": "#/$defs/foo", - "$defs": { - "foo": {} - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, 2020_12_top_level_ref_with_id_defs_foo) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com", - "$ref": "#/$defs/foo", - "$defs": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {"$defs", "foo"})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, 2020_12_top_level_ref_without_id_empty) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "#/$defs/foo", - "$defs": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "#/$defs/foo", - "$defs": { - "foo": {} - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, 2020_12_top_level_ref_without_id_defs_foo) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "#/$defs/foo", - "$defs": { - "foo": {} - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {"$defs", "foo"})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema" - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, subschema_with_direct_ref) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com", - "$defs": { - "string": { "type": "string" } - }, - "properties": { - "foo": { "$ref": "#/$defs/string" } - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {"properties", "foo"})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://example.com#/properties/foo", - "$defs": { - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com", - "$defs": { - "string": { "type": "string" } - }, - "properties": { - "foo": { "$ref": "#/$defs/string" } - } - } - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_EQ(base.size(), 1); - EXPECT_TRUE(base.at(0).is_property()); - EXPECT_EQ(base.at(0).to_property(), "$ref"); -} - -TEST(JSONSchema_wrap, subschema_with_nested_ref) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com", - "$defs": { - "string": { "type": "string" } - }, - "properties": { - "foo": { - "type": "object", - "properties": { - "bar": { "$ref": "#/$defs/string" } - } - } - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {"properties", "foo"})}; - - const auto expected{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://example.com#/properties/foo", - "$defs": { - "schema": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com", - "$defs": { - "string": { "type": "string" } - }, - "properties": { - "foo": { - "type": "object", - "properties": { - "bar": { "$ref": "#/$defs/string" } - } - } - } - } - } - })JSON")}; - - EXPECT_EQ(result, expected); - EXPECT_EQ(base.size(), 1); - EXPECT_TRUE(base.at(0).is_property()); - EXPECT_EQ(base.at(0).to_property(), "$ref"); -} - -TEST(JSONSchema_wrap, 2020_12_boolean_subschema_true) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com", - "properties": { - "foo": true - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {"properties", "foo"})}; - - const auto expected{sourcemeta::core::parse_json("true")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, 2020_12_boolean_subschema_false) { - const auto schema{sourcemeta::core::parse_json(R"JSON({ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://example.com", - "properties": { - "foo": false - } - })JSON")}; - - const auto [result, base]{wrap_schema(schema, {"properties", "foo"})}; - - const auto expected{sourcemeta::core::parse_json("false")}; - - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, 2020_12_top_level_boolean_true) { - const auto schema{sourcemeta::core::parse_json("true")}; - const auto [result, base]{ - wrap_schema(schema, {}, "https://json-schema.org/draft/2020-12/schema")}; - const auto expected{sourcemeta::core::parse_json("true")}; - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} - -TEST(JSONSchema_wrap, 2020_12_top_level_boolean_false) { - const auto schema{sourcemeta::core::parse_json("false")}; - const auto [result, base]{ - wrap_schema(schema, {}, "https://json-schema.org/draft/2020-12/schema")}; - const auto expected{sourcemeta::core::parse_json("false")}; - EXPECT_EQ(result, expected); - EXPECT_TRUE(base.empty()); -} diff --git a/test/jsonschema/referencingsuite.cc b/test/jsonschema/referencingsuite.cc deleted file mode 100644 index 45bbd2dd5..000000000 --- a/test/jsonschema/referencingsuite.cc +++ /dev/null @@ -1,181 +0,0 @@ -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -static auto dereference( - const std::string_view uri, - const std::map> - ®istry) - -> std::optional> { - const std::string key{uri}; - if (!registry.contains(key)) { - return std::nullopt; - } - - return registry.at(key); -} - -class ReferencingTest : public testing::Test { -public: - explicit ReferencingTest(sourcemeta::core::JSON test_suite, - sourcemeta::core::JSON test_document, - std::string default_dialect) - // Ubuntu's ClangFormat gets a bit lost on this one - // clang-format off - : suite{std::move(test_suite)}, test{std::move(test_document)}, - dialect{std::move(default_dialect)} {} - // clang-format on - - auto TestBody() -> void override { - // (1) Pre-populate the registry - EXPECT_TRUE(this->suite.defines("registry")); - EXPECT_TRUE(this->suite.at("registry").is_object()); - for (const auto &entry : this->suite.at("registry").as_object()) { - assert(sourcemeta::core::is_schema(entry.second)); - this->registry.insert({entry.first, {entry.second, entry.first}}); - } - - // (2) Frame every schema and re-populate registry - std::map> - new_entries; - for (const auto &[uri, schema] : this->registry) { - sourcemeta::core::SchemaFrame frame{ - sourcemeta::core::SchemaFrame::Mode::References}; - frame.analyse(schema.first, sourcemeta::core::schema_walker, - sourcemeta::core::schema_resolver, this->dialect, uri); - for (const auto &[key, entry] : frame.locations()) { - new_entries.insert({key.second, - {sourcemeta::core::get(schema.first, entry.pointer), - std::string{entry.base}}}); - } - } - - // We don't insert into the main registry on the above loop, - // otherwise we would affect the loop itself. - for (auto pair : new_entries) { - this->registry.insert(std::move(pair)); - } - - // (3) Run test - this->assert_case(this->test, ""); - } - - auto assert_case(const sourcemeta::core::JSON ¤t, - const std::string_view default_base_uri) -> void { - const bool is_error{current.defines("error") && - current.at("error").is_boolean() && - current.at("error").to_boolean()}; - - // These need to be std::string because URI constructor requires it - const std::string base_uri{current.defines("base_uri") - ? current.at("base_uri").to_string() - : std::string{default_base_uri}}; - - assert(current.defines("ref")); - assert(current.at("ref").is_string()); - const std::string ref_string{current.at("ref").to_string()}; - - try { - sourcemeta::core::URI ref_uri{ref_string}; - if (!base_uri.empty()) { - ref_uri.resolve_from(base_uri); - } - - ref_uri.canonicalize(); - const auto result{dereference(ref_uri.recompose(), this->registry)}; - - if (is_error) { - EXPECT_FALSE(result.has_value()); - } else { - EXPECT_TRUE(current.defines("target")); - EXPECT_TRUE(result.has_value()); - EXPECT_EQ(result.value().first, current.at("target")); - if (current.defines("then")) { - assert_case(current.at("then"), result.value().second); - } - } - } catch (const sourcemeta::core::URIParseError &) { - EXPECT_TRUE(is_error); - } - } - -private: - const sourcemeta::core::JSON suite; - const sourcemeta::core::JSON test; - const std::string dialect; - std::map> - registry; -}; - -static auto register_tests(const std::filesystem::path &subdirectory, - const std::string &suite_name, - const std::string &default_dialect) -> void { - for (const std::filesystem::directory_entry &entry : - std::filesystem::directory_iterator( - std::filesystem::path{REFERENCING_SUITE_PATH} / subdirectory)) { - const std::string name{entry.path().stem().string()}; - const sourcemeta::core::JSON test = - sourcemeta::core::read_json(entry.path()); - assert(test.is_object()); - assert(test.defines("tests")); - assert(test.at("tests").is_array()); - for (unsigned int index = 0; index < test.at("tests").size(); index++) { - std::ostringstream test_name; - for (const auto character : name) { - // Hyphens break `--gtest_filter` - test_name << (character == '-' ? '_' : character); - } - - test_name << '_' << index; - testing::RegisterTest( - suite_name.c_str(), test_name.str().c_str(), nullptr, nullptr, - __FILE__, __LINE__, [=]() -> ReferencingTest * { - return new ReferencingTest(test, test.at("tests").at(index), - default_dialect); - }); - } - } -} - -int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); - - // 2020-12 - register_tests("json-schema-draft-2020-12", - "JSONSchemaReferencingSuite_2020_12", - "https://json-schema.org/draft/2020-12/schema"); - - // 2019-09 - register_tests("json-schema-draft-2019-09", - "JSONSchemaReferencingSuite_2019_09", - "https://json-schema.org/draft/2019-09/schema"); - - // Draft7 - register_tests("json-schema-draft-07", "JSONSchemaReferencingSuite_Draft7", - "http://json-schema.org/draft-07/schema#"); - - // Draft6 - register_tests("json-schema-draft-06", "JSONSchemaReferencingSuite_Draft6", - "http://json-schema.org/draft-06/schema#"); - - // Draft4 - register_tests("json-schema-draft-04", "JSONSchemaReferencingSuite_Draft4", - "http://json-schema.org/draft-04/schema#"); - - // Draft3 - register_tests("json-schema-draft-03", "JSONSchemaReferencingSuite_Draft3", - "http://json-schema.org/draft-03/schema#"); - - return RUN_ALL_TESTS(); -} diff --git a/test/packaging/find_package/CMakeLists.txt b/test/packaging/find_package/CMakeLists.txt index 9a91d4603..758378692 100644 --- a/test/packaging/find_package/CMakeLists.txt +++ b/test/packaging/find_package/CMakeLists.txt @@ -16,7 +16,6 @@ target_link_libraries(core_hello PRIVATE sourcemeta::core::ip) target_link_libraries(core_hello PRIVATE sourcemeta::core::uri) target_link_libraries(core_hello PRIVATE sourcemeta::core::uritemplate) target_link_libraries(core_hello PRIVATE sourcemeta::core::json) -target_link_libraries(core_hello PRIVATE sourcemeta::core::jsonschema) target_link_libraries(core_hello PRIVATE sourcemeta::core::jsonpointer) target_link_libraries(core_hello PRIVATE sourcemeta::core::jsonl) target_link_libraries(core_hello PRIVATE sourcemeta::core::yaml) diff --git a/test/packaging/find_package/hello.cc b/test/packaging/find_package/hello.cc index 70f967c20..748264457 100644 --- a/test/packaging/find_package/hello.cc +++ b/test/packaging/find_package/hello.cc @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/vendor/jsonschema-2019-09.mask b/vendor/jsonschema-2019-09.mask deleted file mode 100644 index e1334119f..000000000 --- a/vendor/jsonschema-2019-09.mask +++ /dev/null @@ -1,9 +0,0 @@ -.travis.yml -CONTRIBUTING.md -jsonschema-core.xml -jsonschema-hyperschema.xml -jsonschema-validation.xml -Makefile -README.md -relative-json-pointer.xml -output/verbose-example.json diff --git a/vendor/jsonschema-2019-09/hyper-schema.json b/vendor/jsonschema-2019-09/hyper-schema.json deleted file mode 100644 index 28f9ad4f8..000000000 --- a/vendor/jsonschema-2019-09/hyper-schema.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/hyper-schema", - "$id": "https://json-schema.org/draft/2019-09/hyper-schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/core": true, - "https://json-schema.org/draft/2019-09/vocab/applicator": true, - "https://json-schema.org/draft/2019-09/vocab/validation": true, - "https://json-schema.org/draft/2019-09/vocab/meta-data": true, - "https://json-schema.org/draft/2019-09/vocab/format": false, - "https://json-schema.org/draft/2019-09/vocab/content": true, - "https://json-schema.org/draft/2019-09/vocab/hyper-schema": true - }, - "$recursiveAnchor": true, - - "title": "JSON Hyper-Schema", - "allOf": [ - {"$ref": "https://json-schema.org/draft/2019-09/schema"}, - {"$ref": "https://json-schema.org/draft/2019-09/meta/hyper-schema"} - ], - "links": [ - { - "rel": "self", - "href": "{+%24id}" - } - ] -} diff --git a/vendor/jsonschema-2019-09/links.json b/vendor/jsonschema-2019-09/links.json deleted file mode 100644 index 96a600fdf..000000000 --- a/vendor/jsonschema-2019-09/links.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/links", - "title": "Link Description Object", - "allOf": [ - { "required": [ "rel", "href" ] }, - { "$ref": "#/$defs/noRequiredFields" } - ], - "$defs": { - "noRequiredFields": { - "type": "object", - "properties": { - "anchor": { - "type": "string", - "format": "uri-template" - }, - "anchorPointer": { - "type": "string", - "anyOf": [ - { "format": "json-pointer" }, - { "format": "relative-json-pointer" } - ] - }, - "rel": { - "anyOf": [ - { "type": "string" }, - { - "type": "array", - "items": { "type": "string" }, - "minItems": 1 - } - ] - }, - "href": { - "type": "string", - "format": "uri-template" - }, - "hrefSchema": { - "$ref": "https://json-schema.org/draft/2019-09/hyper-schema", - "default": false - }, - "templatePointers": { - "type": "object", - "additionalProperties": { - "type": "string", - "anyOf": [ - { "format": "json-pointer" }, - { "format": "relative-json-pointer" } - ] - } - }, - "templateRequired": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "targetSchema": { - "$ref": "https://json-schema.org/draft/2019-09/hyper-schema", - "default": true - }, - "targetMediaType": { - "type": "string" - }, - "targetHints": { }, - "headerSchema": { - "$ref": "https://json-schema.org/draft/2019-09/hyper-schema", - "default": true - }, - "submissionMediaType": { - "type": "string", - "default": "application/json" - }, - "submissionSchema": { - "$ref": "https://json-schema.org/draft/2019-09/hyper-schema", - "default": true - }, - "$comment": { - "type": "string" - } - } - } - } -} diff --git a/vendor/jsonschema-2019-09/meta/applicator.json b/vendor/jsonschema-2019-09/meta/applicator.json deleted file mode 100644 index 24a1cc4f4..000000000 --- a/vendor/jsonschema-2019-09/meta/applicator.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/applicator", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/applicator": true - }, - "$recursiveAnchor": true, - - "title": "Applicator vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "additionalItems": { "$recursiveRef": "#" }, - "unevaluatedItems": { "$recursiveRef": "#" }, - "items": { - "anyOf": [ - { "$recursiveRef": "#" }, - { "$ref": "#/$defs/schemaArray" } - ] - }, - "contains": { "$recursiveRef": "#" }, - "additionalProperties": { "$recursiveRef": "#" }, - "unevaluatedProperties": { "$recursiveRef": "#" }, - "properties": { - "type": "object", - "additionalProperties": { "$recursiveRef": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$recursiveRef": "#" }, - "propertyNames": { "format": "regex" }, - "default": {} - }, - "dependentSchemas": { - "type": "object", - "additionalProperties": { - "$recursiveRef": "#" - } - }, - "propertyNames": { "$recursiveRef": "#" }, - "if": { "$recursiveRef": "#" }, - "then": { "$recursiveRef": "#" }, - "else": { "$recursiveRef": "#" }, - "allOf": { "$ref": "#/$defs/schemaArray" }, - "anyOf": { "$ref": "#/$defs/schemaArray" }, - "oneOf": { "$ref": "#/$defs/schemaArray" }, - "not": { "$recursiveRef": "#" } - }, - "$defs": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$recursiveRef": "#" } - } - } -} diff --git a/vendor/jsonschema-2019-09/meta/content.json b/vendor/jsonschema-2019-09/meta/content.json deleted file mode 100644 index f6752a8ef..000000000 --- a/vendor/jsonschema-2019-09/meta/content.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/content", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/content": true - }, - "$recursiveAnchor": true, - - "title": "Content vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "contentMediaType": { "type": "string" }, - "contentEncoding": { "type": "string" }, - "contentSchema": { "$recursiveRef": "#" } - } -} diff --git a/vendor/jsonschema-2019-09/meta/core.json b/vendor/jsonschema-2019-09/meta/core.json deleted file mode 100644 index eb708a560..000000000 --- a/vendor/jsonschema-2019-09/meta/core.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/core", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/core": true - }, - "$recursiveAnchor": true, - - "title": "Core vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference", - "$comment": "Non-empty fragments not allowed.", - "pattern": "^[^#]*#?$" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$anchor": { - "type": "string", - "pattern": "^[A-Za-z][-A-Za-z0-9.:_]*$" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$recursiveRef": { - "type": "string", - "format": "uri-reference" - }, - "$recursiveAnchor": { - "type": "boolean", - "default": false - }, - "$vocabulary": { - "type": "object", - "propertyNames": { - "type": "string", - "format": "uri" - }, - "additionalProperties": { - "type": "boolean" - } - }, - "$comment": { - "type": "string" - }, - "$defs": { - "type": "object", - "additionalProperties": { "$recursiveRef": "#" }, - "default": {} - } - } -} diff --git a/vendor/jsonschema-2019-09/meta/format.json b/vendor/jsonschema-2019-09/meta/format.json deleted file mode 100644 index 09bbfdda9..000000000 --- a/vendor/jsonschema-2019-09/meta/format.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/format", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/format": true - }, - "$recursiveAnchor": true, - - "title": "Format vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "format": { "type": "string" } - } -} diff --git a/vendor/jsonschema-2019-09/meta/hyper-schema.json b/vendor/jsonschema-2019-09/meta/hyper-schema.json deleted file mode 100644 index 3d2305893..000000000 --- a/vendor/jsonschema-2019-09/meta/hyper-schema.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/hyper-schema", - "$id": "https://json-schema.org/draft/2019-09/meta/hyper-schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/hyper-schema": true - }, - "$recursiveAnchor": true, - - "title": "JSON Hyper-Schema Vocabulary Schema", - "type": ["object", "boolean"], - "properties": { - "base": { - "type": "string", - "format": "uri-template" - }, - "links": { - "type": "array", - "items": { - "$ref": "https://json-schema.org/draft/2019-09/links" - } - } - }, - "links": [ - { - "rel": "self", - "href": "{+%24id}" - } - ] -} diff --git a/vendor/jsonschema-2019-09/meta/meta-data.json b/vendor/jsonschema-2019-09/meta/meta-data.json deleted file mode 100644 index da04cff6d..000000000 --- a/vendor/jsonschema-2019-09/meta/meta-data.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/meta-data", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/meta-data": true - }, - "$recursiveAnchor": true, - - "title": "Meta-data vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "deprecated": { - "type": "boolean", - "default": false - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - } - } -} diff --git a/vendor/jsonschema-2019-09/meta/validation.json b/vendor/jsonschema-2019-09/meta/validation.json deleted file mode 100644 index 9f59677b3..000000000 --- a/vendor/jsonschema-2019-09/meta/validation.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/meta/validation", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/validation": true - }, - "$recursiveAnchor": true, - - "title": "Validation vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, - "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, - "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, - "minContains": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 1 - }, - "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, - "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "required": { "$ref": "#/$defs/stringArray" }, - "dependentRequired": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/stringArray" - } - }, - "const": true, - "enum": { - "type": "array", - "items": true - }, - "type": { - "anyOf": [ - { "$ref": "#/$defs/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/$defs/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - } - }, - "$defs": { - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 0 - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true, - "default": [] - } - } -} diff --git a/vendor/jsonschema-2019-09/output/hyper-schema.json b/vendor/jsonschema-2019-09/output/hyper-schema.json deleted file mode 100644 index 34e67303d..000000000 --- a/vendor/jsonschema-2019-09/output/hyper-schema.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/output/hyper-schema", - "title": "JSON Hyper-Schema Output", - "type": "array", - "items": { - "allOf": [ - {"$ref": "https://json-schema.org/draft/2019-09/links#/$defs/noRequiredFields" } - ], - "type": "object", - "required": [ - "contextUri", - "contextPointer", - "rel", - "attachmentPointer" - ], - "if": { "required": [ "hrefSchema" ] }, - "then": { "required": [ "hrefInputTemplates", "hrefPrepopulatedInput" ] }, - "else": { "required": [ "targetUri" ] }, - "properties": { - "contextUri": { - "$comment": "The fully resolved URI of the link context, including a fragment if it is possible to construct one for the given media type and instance", - "type": "string", - "format": "uri" - }, - "contextPointer": { - "$comment": "The absolute JSON Pointer to the location in the instance that is the context of the link. If the context resource supports JSON Pointer fragments, this will the string form of the identical JSON Pointer", - "type": "string", - "format": "json-pointer" - }, - "rel": { - "type": "string" - }, - "targetUri": { - "$comment": "The fully resolved target URI", - "type": "string", - "format": "uri" - }, - "hrefInputTemplates": { - "$comment": "The list of partially resolved URI Templates, starting with \"href\", followed by applicable \"base\" values from nearest to furthest.", - "type": "array", - "items": { - "type": "string", - "format": "uri-template" - } - }, - "hrefPrepopulatedInput": { - "$comment": "The initial data set to be presented with the input form when URI Template input is accepted.", - "type": "object", - "propertyNames": { - "$comment": "These are all URI Template variable names, specifically the 'varname' production from RFC 6570, Section 2.3", - "pattern": "^(?:\\w|(?:%[a-f\\d]{2}))+(?:\\.(?:\\w|(?:%[a-f\\d]{2})))*$" - } - }, - "attachmentPointer": { - "$comment": "The absolute JSON Pointer, in string form, of the position to which this resolved link applies", - "type": "string", - "format": "json-pointer" - } - } - } -} diff --git a/vendor/jsonschema-2019-09/output/schema.json b/vendor/jsonschema-2019-09/output/schema.json deleted file mode 100644 index bef859356..000000000 --- a/vendor/jsonschema-2019-09/output/schema.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/output/schema", - "description": "A schema that validates the minimum requirements for validation output", - - "oneOf": [ - { "$ref": "#/$defs/flag" }, - { "$ref": "#/$defs/basic" }, - { "$ref": "#/$defs/detailed" }, - { "$ref": "#/$defs/verbose" } - ], - "$defs": { - "outputUnit":{ - "properties": { - "valid": { "type": "boolean" }, - "keywordLocation": { - "type": "string", - "format": "uri-reference" - }, - "absoluteKeywordLocation": { - "type": "string", - "format": "uri" - }, - "instanceLocation": { - "type": "string", - "format": "uri-reference" - }, - "errors": { - "$ref": "#/$defs/outputUnitArray" - }, - "annotations": { - "$ref": "#/$defs/outputUnitArray" - } - }, - "required": [ "valid", "keywordLocation", "instanceLocation" ], - "allOf": [ - { - "if": { - "properties": { - "valid": { "const": false } - } - }, - "then": { - "required": [ "errors" ] - } - }, - { - "if": { - "anyOf": [ - { - "properties": { - "keywordLocation": { - "pattern": "/\\$ref/" - } - } - }, - { - "properties": { - "keywordLocation": { - "pattern": "/\\$recursiveRef/" - } - } - } - ] - }, - "then": { - "required": [ "absoluteKeywordLocation" ] - } - } - ] - }, - "outputUnitArray": { - "type": "array", - "items": { "$ref": "#/$defs/outputUnit" } - }, - "flag": { - "properties": { - "valid": { "type": "boolean" } - }, - "required": [ "valid" ] - }, - "basic": { "$ref": "#/$defs/outputUnit" }, - "detailed": { "$ref": "#/$defs/outputUnit" }, - "verbose": { "$ref": "#/$defs/outputUnit" } - } -} diff --git a/vendor/jsonschema-2019-09/schema.json b/vendor/jsonschema-2019-09/schema.json deleted file mode 100644 index 2248a0c80..000000000 --- a/vendor/jsonschema-2019-09/schema.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - "$id": "https://json-schema.org/draft/2019-09/schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/core": true, - "https://json-schema.org/draft/2019-09/vocab/applicator": true, - "https://json-schema.org/draft/2019-09/vocab/validation": true, - "https://json-schema.org/draft/2019-09/vocab/meta-data": true, - "https://json-schema.org/draft/2019-09/vocab/format": false, - "https://json-schema.org/draft/2019-09/vocab/content": true - }, - "$recursiveAnchor": true, - - "title": "Core and Validation specifications meta-schema", - "allOf": [ - {"$ref": "meta/core"}, - {"$ref": "meta/applicator"}, - {"$ref": "meta/validation"}, - {"$ref": "meta/meta-data"}, - {"$ref": "meta/format"}, - {"$ref": "meta/content"} - ], - "type": ["object", "boolean"], - "properties": { - "definitions": { - "$comment": "While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.", - "type": "object", - "additionalProperties": { "$recursiveRef": "#" }, - "default": {} - }, - "dependencies": { - "$comment": "\"dependencies\" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to \"dependentSchemas\" and \"dependentRequired\"", - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$recursiveRef": "#" }, - { "$ref": "meta/validation#/$defs/stringArray" } - ] - } - } - } -} diff --git a/vendor/jsonschema-2020-12.mask b/vendor/jsonschema-2020-12.mask deleted file mode 100644 index 67a7045b9..000000000 --- a/vendor/jsonschema-2020-12.mask +++ /dev/null @@ -1,11 +0,0 @@ -adr -archive -.travis.yml -CONTRIBUTING.md -jsonschema-core.xml -jsonschema-validation.xml -Makefile -README.md -relative-json-pointer.xml -output/verbose-example.json -output/hyper-schema.json diff --git a/vendor/jsonschema-2020-12/hyper-schema.json b/vendor/jsonschema-2020-12/hyper-schema.json deleted file mode 100644 index eb4f0b320..000000000 --- a/vendor/jsonschema-2020-12/hyper-schema.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/hyper-schema", - "$id": "https://json-schema.org/draft/2020-12/hyper-schema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://json-schema.org/draft/2019-09/vocab/hyper-schema": true - }, - "$dynamicAnchor": "meta", - - "title": "JSON Hyper-Schema", - "allOf": [ - { "$ref": "https://json-schema.org/draft/2020-12/schema" }, - { "$ref": "https://json-schema.org/draft/2020-12/meta/hyper-schema" } - ], - "links": [ - { - "rel": "self", - "href": "{+%24id}" - } - ] -} diff --git a/vendor/jsonschema-2020-12/links.json b/vendor/jsonschema-2020-12/links.json deleted file mode 100644 index c71690ece..000000000 --- a/vendor/jsonschema-2020-12/links.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/links", - "title": "Link Description Object", - - "type": "object", - "properties": { - "anchor": { - "type": "string", - "format": "uri-template" - }, - "anchorPointer": { - "type": "string", - "anyOf": [ - { "format": "json-pointer" }, - { "format": "relative-json-pointer" } - ] - }, - "rel": { - "anyOf": [ - { "type": "string" }, - { - "type": "array", - "items": { "type": "string" }, - "minItems": 1 - } - ] - }, - "href": { - "type": "string", - "format": "uri-template" - }, - "hrefSchema": { - "$dynamicRef": "https://json-schema.org/draft/2020-12/hyper-schema#meta", - "default": false - }, - "templatePointers": { - "type": "object", - "additionalProperties": { - "type": "string", - "anyOf": [ - { "format": "json-pointer" }, - { "format": "relative-json-pointer" } - ] - } - }, - "templateRequired": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "targetSchema": { - "$dynamicRef": "https://json-schema.org/draft/2020-12/hyper-schema#meta", - "default": true - }, - "targetMediaType": { - "type": "string" - }, - "targetHints": {}, - "headerSchema": { - "$dynamicRef": "https://json-schema.org/draft/2020-12/hyper-schema#meta", - "default": true - }, - "submissionMediaType": { - "type": "string", - "default": "application/json" - }, - "submissionSchema": { - "$dynamicRef": "https://json-schema.org/draft/2020-12/hyper-schema#meta", - "default": true - }, - "$comment": { - "type": "string" - } - }, - "required": [ "rel", "href" ] -} diff --git a/vendor/jsonschema-2020-12/meta/applicator.json b/vendor/jsonschema-2020-12/meta/applicator.json deleted file mode 100644 index ca6992309..000000000 --- a/vendor/jsonschema-2020-12/meta/applicator.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/applicator", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/applicator": true - }, - "$dynamicAnchor": "meta", - - "title": "Applicator vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "prefixItems": { "$ref": "#/$defs/schemaArray" }, - "items": { "$dynamicRef": "#meta" }, - "contains": { "$dynamicRef": "#meta" }, - "additionalProperties": { "$dynamicRef": "#meta" }, - "properties": { - "type": "object", - "additionalProperties": { "$dynamicRef": "#meta" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$dynamicRef": "#meta" }, - "propertyNames": { "format": "regex" }, - "default": {} - }, - "dependentSchemas": { - "type": "object", - "additionalProperties": { "$dynamicRef": "#meta" }, - "default": {} - }, - "propertyNames": { "$dynamicRef": "#meta" }, - "if": { "$dynamicRef": "#meta" }, - "then": { "$dynamicRef": "#meta" }, - "else": { "$dynamicRef": "#meta" }, - "allOf": { "$ref": "#/$defs/schemaArray" }, - "anyOf": { "$ref": "#/$defs/schemaArray" }, - "oneOf": { "$ref": "#/$defs/schemaArray" }, - "not": { "$dynamicRef": "#meta" } - }, - "$defs": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$dynamicRef": "#meta" } - } - } -} diff --git a/vendor/jsonschema-2020-12/meta/content.json b/vendor/jsonschema-2020-12/meta/content.json deleted file mode 100644 index 2f6e056a9..000000000 --- a/vendor/jsonschema-2020-12/meta/content.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/content", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/content": true - }, - "$dynamicAnchor": "meta", - - "title": "Content vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "contentEncoding": { "type": "string" }, - "contentMediaType": { "type": "string" }, - "contentSchema": { "$dynamicRef": "#meta" } - } -} diff --git a/vendor/jsonschema-2020-12/meta/core.json b/vendor/jsonschema-2020-12/meta/core.json deleted file mode 100644 index dfc092d96..000000000 --- a/vendor/jsonschema-2020-12/meta/core.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/core", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true - }, - "$dynamicAnchor": "meta", - - "title": "Core vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "$id": { - "$ref": "#/$defs/uriReferenceString", - "$comment": "Non-empty fragments not allowed.", - "pattern": "^[^#]*#?$" - }, - "$schema": { "$ref": "#/$defs/uriString" }, - "$ref": { "$ref": "#/$defs/uriReferenceString" }, - "$anchor": { "$ref": "#/$defs/anchorString" }, - "$dynamicRef": { "$ref": "#/$defs/uriReferenceString" }, - "$dynamicAnchor": { "$ref": "#/$defs/anchorString" }, - "$vocabulary": { - "type": "object", - "propertyNames": { "$ref": "#/$defs/uriString" }, - "additionalProperties": { - "type": "boolean" - } - }, - "$comment": { - "type": "string" - }, - "$defs": { - "type": "object", - "additionalProperties": { "$dynamicRef": "#meta" } - } - }, - "$defs": { - "anchorString": { - "type": "string", - "pattern": "^[A-Za-z_][-A-Za-z0-9._]*$" - }, - "uriString": { - "type": "string", - "format": "uri" - }, - "uriReferenceString": { - "type": "string", - "format": "uri-reference" - } - } -} diff --git a/vendor/jsonschema-2020-12/meta/format-annotation.json b/vendor/jsonschema-2020-12/meta/format-annotation.json deleted file mode 100644 index 51ef7ea11..000000000 --- a/vendor/jsonschema-2020-12/meta/format-annotation.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/format-annotation", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true - }, - "$dynamicAnchor": "meta", - - "title": "Format vocabulary meta-schema for annotation results", - "type": ["object", "boolean"], - "properties": { - "format": { "type": "string" } - } -} diff --git a/vendor/jsonschema-2020-12/meta/format-assertion.json b/vendor/jsonschema-2020-12/meta/format-assertion.json deleted file mode 100644 index 5e73fd757..000000000 --- a/vendor/jsonschema-2020-12/meta/format-assertion.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/format-assertion", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/format-assertion": true - }, - "$dynamicAnchor": "meta", - - "title": "Format vocabulary meta-schema for assertion results", - "type": ["object", "boolean"], - "properties": { - "format": { "type": "string" } - } -} diff --git a/vendor/jsonschema-2020-12/meta/hyper-schema.json b/vendor/jsonschema-2020-12/meta/hyper-schema.json deleted file mode 100644 index 62a313669..000000000 --- a/vendor/jsonschema-2020-12/meta/hyper-schema.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/hyper-schema", - "$id": "https://json-schema.org/draft/2020-12/meta/hyper-schema", - "$vocabulary": { - "https://json-schema.org/draft/2019-09/vocab/hyper-schema": true - }, - "$dynamicAnchor": "meta", - - "title": "JSON Hyper-Schema Vocabulary Schema", - "type": ["object", "boolean"], - "properties": { - "base": { - "type": "string", - "format": "uri-template" - }, - "links": { - "type": "array", - "items": { - "$ref": "https://json-schema.org/draft/2020-12/links" - } - } - }, - "links": [ - { - "rel": "self", - "href": "{+%24id}" - } - ] -} diff --git a/vendor/jsonschema-2020-12/meta/meta-data.json b/vendor/jsonschema-2020-12/meta/meta-data.json deleted file mode 100644 index 05cbc22af..000000000 --- a/vendor/jsonschema-2020-12/meta/meta-data.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/meta-data", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/meta-data": true - }, - "$dynamicAnchor": "meta", - - "title": "Meta-data vocabulary meta-schema", - - "type": ["object", "boolean"], - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "deprecated": { - "type": "boolean", - "default": false - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - } - } -} diff --git a/vendor/jsonschema-2020-12/meta/unevaluated.json b/vendor/jsonschema-2020-12/meta/unevaluated.json deleted file mode 100644 index 5f62a3ffa..000000000 --- a/vendor/jsonschema-2020-12/meta/unevaluated.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/unevaluated", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true - }, - "$dynamicAnchor": "meta", - - "title": "Unevaluated applicator vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "unevaluatedItems": { "$dynamicRef": "#meta" }, - "unevaluatedProperties": { "$dynamicRef": "#meta" } - } -} diff --git a/vendor/jsonschema-2020-12/meta/validation.json b/vendor/jsonschema-2020-12/meta/validation.json deleted file mode 100644 index 606b87ba2..000000000 --- a/vendor/jsonschema-2020-12/meta/validation.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/meta/validation", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/validation": true - }, - "$dynamicAnchor": "meta", - - "title": "Validation vocabulary meta-schema", - "type": ["object", "boolean"], - "properties": { - "type": { - "anyOf": [ - { "$ref": "#/$defs/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/$defs/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "const": true, - "enum": { - "type": "array", - "items": true - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { "$ref": "#/$defs/nonNegativeInteger" }, - "minLength": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { "$ref": "#/$defs/nonNegativeInteger" }, - "minItems": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxContains": { "$ref": "#/$defs/nonNegativeInteger" }, - "minContains": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 1 - }, - "maxProperties": { "$ref": "#/$defs/nonNegativeInteger" }, - "minProperties": { "$ref": "#/$defs/nonNegativeIntegerDefault0" }, - "required": { "$ref": "#/$defs/stringArray" }, - "dependentRequired": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/stringArray" - } - } - }, - "$defs": { - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "$ref": "#/$defs/nonNegativeInteger", - "default": 0 - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true, - "default": [] - } - } -} diff --git a/vendor/jsonschema-2020-12/output/schema.json b/vendor/jsonschema-2020-12/output/schema.json deleted file mode 100644 index 1eef288ae..000000000 --- a/vendor/jsonschema-2020-12/output/schema.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/output/schema", - "description": "A schema that validates the minimum requirements for validation output", - - "anyOf": [ - { "$ref": "#/$defs/flag" }, - { "$ref": "#/$defs/basic" }, - { "$ref": "#/$defs/detailed" }, - { "$ref": "#/$defs/verbose" } - ], - "$defs": { - "outputUnit":{ - "properties": { - "valid": { "type": "boolean" }, - "keywordLocation": { - "type": "string", - "format": "json-pointer" - }, - "absoluteKeywordLocation": { - "type": "string", - "format": "uri" - }, - "instanceLocation": { - "type": "string", - "format": "json-pointer" - }, - "error": { - "type": "string" - }, - "errors": { - "$ref": "#/$defs/outputUnitArray" - }, - "annotations": { - "$ref": "#/$defs/outputUnitArray" - } - }, - "required": [ "valid", "keywordLocation", "instanceLocation" ], - "allOf": [ - { - "if": { - "properties": { - "valid": { "const": false } - } - }, - "then": { - "anyOf": [ - { - "required": [ "error" ] - }, - { - "required": [ "errors" ] - } - ] - } - }, - { - "if": { - "anyOf": [ - { - "properties": { - "keywordLocation": { - "pattern": "/\\$ref/" - } - } - }, - { - "properties": { - "keywordLocation": { - "pattern": "/\\$dynamicRef/" - } - } - } - ] - }, - "then": { - "required": [ "absoluteKeywordLocation" ] - } - } - ] - }, - "outputUnitArray": { - "type": "array", - "items": { "$ref": "#/$defs/outputUnit" } - }, - "flag": { - "properties": { - "valid": { "type": "boolean" } - }, - "required": [ "valid" ] - }, - "basic": { "$ref": "#/$defs/outputUnit" }, - "detailed": { "$ref": "#/$defs/outputUnit" }, - "verbose": { "$ref": "#/$defs/outputUnit" } - } -} diff --git a/vendor/jsonschema-2020-12/schema.json b/vendor/jsonschema-2020-12/schema.json deleted file mode 100644 index d5e2d31c3..000000000 --- a/vendor/jsonschema-2020-12/schema.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://json-schema.org/draft/2020-12/schema", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true - }, - "$dynamicAnchor": "meta", - - "title": "Core and Validation specifications meta-schema", - "allOf": [ - {"$ref": "meta/core"}, - {"$ref": "meta/applicator"}, - {"$ref": "meta/unevaluated"}, - {"$ref": "meta/validation"}, - {"$ref": "meta/meta-data"}, - {"$ref": "meta/format-annotation"}, - {"$ref": "meta/content"} - ], - "type": ["object", "boolean"], - "$comment": "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.", - "properties": { - "definitions": { - "$comment": "\"definitions\" has been replaced by \"$defs\".", - "type": "object", - "additionalProperties": { "$dynamicRef": "#meta" }, - "deprecated": true, - "default": {} - }, - "dependencies": { - "$comment": "\"dependencies\" has been split and replaced by \"dependentSchemas\" and \"dependentRequired\" in order to serve their differing semantics.", - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$dynamicRef": "#meta" }, - { "$ref": "meta/validation#/$defs/stringArray" } - ] - }, - "deprecated": true, - "default": {} - }, - "$recursiveAnchor": { - "$comment": "\"$recursiveAnchor\" has been replaced by \"$dynamicAnchor\".", - "$ref": "meta/core#/$defs/anchorString", - "deprecated": true - }, - "$recursiveRef": { - "$comment": "\"$recursiveRef\" has been replaced by \"$dynamicRef\".", - "$ref": "meta/core#/$defs/uriReferenceString", - "deprecated": true - } - } -} diff --git a/vendor/jsonschema-draft0.mask b/vendor/jsonschema-draft0.mask deleted file mode 100644 index 2f29af785..000000000 --- a/vendor/jsonschema-draft0.mask +++ /dev/null @@ -1 +0,0 @@ -jsonschema.xml diff --git a/vendor/jsonschema-draft0/hyper-schema.json b/vendor/jsonschema-draft0/hyper-schema.json deleted file mode 100644 index de80b918b..000000000 --- a/vendor/jsonschema-draft0/hyper-schema.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-00/hyper-schema#", - "id" : "http://json-schema.org/draft-00/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-00/links#"}, - "optional" : true - }, - - "fragmentResolution" : { - "type" : "string", - "optional" : true, - "default" : "dot-delimited" - }, - - "root" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "pathStart" : { - "type" : "string", - "optional" : true, - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "optional" : true, - "format" : "media-type" - }, - - "alternate" : { - "type" : "array", - "items" : {"$ref" : "#"}, - "optional" : true - } - }, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited", - "extends" : {"$ref" : "http://json-schema.org/draft-00/schema#"} -} \ No newline at end of file diff --git a/vendor/jsonschema-draft0/json-ref.json b/vendor/jsonschema-draft0/json-ref.json deleted file mode 100644 index 3a872a71c..000000000 --- a/vendor/jsonschema-draft0/json-ref.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-00/hyper-schema#", - "id" : "http://json-schema.org/draft-00/json-ref#", - - "items" : {"$ref" : "#"}, - "additionalProperties" : {"$ref" : "#"}, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited" -} \ No newline at end of file diff --git a/vendor/jsonschema-draft0/links.json b/vendor/jsonschema-draft0/links.json deleted file mode 100644 index 8a5e78072..000000000 --- a/vendor/jsonschema-draft0/links.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-00/hyper-schema#", - "id" : "http://json-schema.org/draft-00/links#", - "type" : "object", - - "properties" : { - "href" : { - "type" : "string" - }, - - "rel" : { - "type" : "string" - }, - - "method" : { - "type" : "string", - "default" : "GET", - "optional" : true - }, - - "enctype" : { - "type" : "string", - "requires" : "method", - "optional" : true - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-00/hyper-schema#"}, - "optional" : true - } - } -} \ No newline at end of file diff --git a/vendor/jsonschema-draft0/schema.json b/vendor/jsonschema-draft0/schema.json deleted file mode 100644 index 9aa2fbc57..000000000 --- a/vendor/jsonschema-draft0/schema.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-00/hyper-schema#", - "id" : "http://json-schema.org/draft-00/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "optional" : true, - "default" : "any" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "optional" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "optional" : true, - "default" : {} - }, - - "requires" : { - "type" : ["string", {"$ref" : "#"}], - "optional" : true - }, - - "minimum" : { - "type" : "number", - "optional" : true - }, - - "maximum" : { - "type" : "number", - "optional" : true - }, - - "minimumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "minimum", - "default" : true - }, - - "maximumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "maximum", - "default" : true - }, - - "minItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "pattern" : { - "type" : "string", - "optional" : true, - "format" : "regex" - }, - - "minLength" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer", - "optional" : true - }, - - "enum" : { - "type" : "array", - "optional" : true, - "minItems" : 1 - }, - - "title" : { - "type" : "string", - "optional" : true - }, - - "description" : { - "type" : "string", - "optional" : true - }, - - "format" : { - "type" : "string", - "optional" : true - }, - - "contentEncoding" : { - "type" : "string", - "optional" : true - }, - - "default" : { - "type" : "any", - "optional" : true - }, - - "maxDecimal" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : {"type" : "string"}, - "optional" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - } - }, - - "optional" : true, - "default" : {} -} \ No newline at end of file diff --git a/vendor/jsonschema-draft1.mask b/vendor/jsonschema-draft1.mask deleted file mode 100644 index 2f29af785..000000000 --- a/vendor/jsonschema-draft1.mask +++ /dev/null @@ -1 +0,0 @@ -jsonschema.xml diff --git a/vendor/jsonschema-draft1/hyper-schema.json b/vendor/jsonschema-draft1/hyper-schema.json deleted file mode 100644 index 3f6c6cc2c..000000000 --- a/vendor/jsonschema-draft1/hyper-schema.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-01/hyper-schema#", - "id" : "http://json-schema.org/draft-01/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-01/links#"}, - "optional" : true - }, - - "fragmentResolution" : { - "type" : "string", - "optional" : true, - "default" : "dot-delimited" - }, - - "root" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "pathStart" : { - "type" : "string", - "optional" : true, - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "optional" : true, - "format" : "media-type" - }, - - "alternate" : { - "type" : "array", - "items" : {"$ref" : "#"}, - "optional" : true - } - }, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited", - "extends" : {"$ref" : "http://json-schema.org/draft-01/schema#"} -} \ No newline at end of file diff --git a/vendor/jsonschema-draft1/json-ref.json b/vendor/jsonschema-draft1/json-ref.json deleted file mode 100644 index 4d26174ef..000000000 --- a/vendor/jsonschema-draft1/json-ref.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-01/hyper-schema#", - "id" : "http://json-schema.org/draft-01/json-ref#", - - "items" : {"$ref" : "#"}, - "additionalProperties" : {"$ref" : "#"}, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited" -} \ No newline at end of file diff --git a/vendor/jsonschema-draft1/links.json b/vendor/jsonschema-draft1/links.json deleted file mode 100644 index 52430a5d9..000000000 --- a/vendor/jsonschema-draft1/links.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-01/hyper-schema#", - "id" : "http://json-schema.org/draft-01/links#", - "type" : "object", - - "properties" : { - "href" : { - "type" : "string" - }, - - "rel" : { - "type" : "string" - }, - - "method" : { - "type" : "string", - "default" : "GET", - "optional" : true - }, - - "enctype" : { - "type" : "string", - "requires" : "method", - "optional" : true - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-01/hyper-schema#"}, - "optional" : true - } - } -} \ No newline at end of file diff --git a/vendor/jsonschema-draft1/schema.json b/vendor/jsonschema-draft1/schema.json deleted file mode 100644 index 7a208e680..000000000 --- a/vendor/jsonschema-draft1/schema.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-01/hyper-schema#", - "id" : "http://json-schema.org/draft-01/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "optional" : true, - "default" : "any" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "optional" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "optional" : true, - "default" : {} - }, - - "requires" : { - "type" : ["string", {"$ref" : "#"}], - "optional" : true - }, - - "minimum" : { - "type" : "number", - "optional" : true - }, - - "maximum" : { - "type" : "number", - "optional" : true - }, - - "minimumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "minimum", - "default" : true - }, - - "maximumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "maximum", - "default" : true - }, - - "minItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "pattern" : { - "type" : "string", - "optional" : true, - "format" : "regex" - }, - - "minLength" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer", - "optional" : true - }, - - "enum" : { - "type" : "array", - "optional" : true, - "minItems" : 1 - }, - - "title" : { - "type" : "string", - "optional" : true - }, - - "description" : { - "type" : "string", - "optional" : true - }, - - "format" : { - "type" : "string", - "optional" : true - }, - - "contentEncoding" : { - "type" : "string", - "optional" : true - }, - - "default" : { - "type" : "any", - "optional" : true - }, - - "maxDecimal" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : {"type" : "string"}, - "optional" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - } - }, - - "optional" : true, - "default" : {} -} \ No newline at end of file diff --git a/vendor/jsonschema-draft2.mask b/vendor/jsonschema-draft2.mask deleted file mode 100644 index 2f29af785..000000000 --- a/vendor/jsonschema-draft2.mask +++ /dev/null @@ -1 +0,0 @@ -jsonschema.xml diff --git a/vendor/jsonschema-draft2/hyper-schema.json b/vendor/jsonschema-draft2/hyper-schema.json deleted file mode 100644 index 4ec1b7569..000000000 --- a/vendor/jsonschema-draft2/hyper-schema.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-02/hyper-schema#", - "id" : "http://json-schema.org/draft-02/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-02/links#"}, - "optional" : true - }, - - "fragmentResolution" : { - "type" : "string", - "optional" : true, - "default" : "slash-delimited" - }, - - "root" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "pathStart" : { - "type" : "string", - "optional" : true, - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "optional" : true, - "format" : "media-type" - }, - - "alternate" : { - "type" : "array", - "items" : {"$ref" : "#"}, - "optional" : true - } - }, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "slash-delimited", - "extends" : {"$ref" : "http://json-schema.org/draft-02/schema#"} -} \ No newline at end of file diff --git a/vendor/jsonschema-draft2/json-ref.json b/vendor/jsonschema-draft2/json-ref.json deleted file mode 100644 index 6526c3945..000000000 --- a/vendor/jsonschema-draft2/json-ref.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-02/hyper-schema#", - "id" : "http://json-schema.org/draft-02/json-ref#", - - "items" : {"$ref" : "#"}, - "additionalProperties" : {"$ref" : "#"}, - - "links" : [ - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - }, - - { - "href" : "{id}", - "rel" : "self" - } - ], - - "fragmentResolution" : "dot-delimited" -} \ No newline at end of file diff --git a/vendor/jsonschema-draft2/links.json b/vendor/jsonschema-draft2/links.json deleted file mode 100644 index 1b176178a..000000000 --- a/vendor/jsonschema-draft2/links.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-02/hyper-schema#", - "id" : "http://json-schema.org/draft-02/links#", - "type" : "object", - - "properties" : { - "href" : { - "type" : "string" - }, - - "rel" : { - "type" : "string" - }, - - "targetSchema" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, - - "method" : { - "type" : "string", - "default" : "GET", - "optional" : true - }, - - "enctype" : { - "type" : "string", - "requires" : "method", - "optional" : true - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-02/hyper-schema#"}, - "optional" : true - } - } -} \ No newline at end of file diff --git a/vendor/jsonschema-draft2/schema.json b/vendor/jsonschema-draft2/schema.json deleted file mode 100644 index 61b8de154..000000000 --- a/vendor/jsonschema-draft2/schema.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-02/hyper-schema#", - "id" : "http://json-schema.org/draft-02/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "optional" : true, - "uniqueItems" : true, - "default" : "any" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - }, - - "optional" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "optional" : true, - "default" : {} - }, - - "requires" : { - "type" : ["string", {"$ref" : "#"}], - "optional" : true - }, - - "minimum" : { - "type" : "number", - "optional" : true - }, - - "maximum" : { - "type" : "number", - "optional" : true - }, - - "minimumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "minimum", - "default" : true - }, - - "maximumCanEqual" : { - "type" : "boolean", - "optional" : true, - "requires" : "maximum", - "default" : true - }, - - "minItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "optional" : true, - "minimum" : 0 - }, - - "uniqueItems" : { - "type" : "boolean", - "optional" : true, - "default" : false - }, - - "pattern" : { - "type" : "string", - "optional" : true, - "format" : "regex" - }, - - "minLength" : { - "type" : "integer", - "optional" : true, - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer", - "optional" : true - }, - - "enum" : { - "type" : "array", - "optional" : true, - "minItems" : 1, - "uniqueItems" : true - }, - - "title" : { - "type" : "string", - "optional" : true - }, - - "description" : { - "type" : "string", - "optional" : true - }, - - "format" : { - "type" : "string", - "optional" : true - }, - - "contentEncoding" : { - "type" : "string", - "optional" : true - }, - - "default" : { - "type" : "any", - "optional" : true - }, - - "divisibleBy" : { - "type" : "number", - "minimum" : 0, - "minimumCanEqual" : false, - "optional" : true, - "default" : 1 - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : {"type" : "string"}, - "optional" : true, - "uniqueItems" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "optional" : true, - "default" : {} - } - }, - - "optional" : true, - "default" : {} -} \ No newline at end of file diff --git a/vendor/jsonschema-draft3.mask b/vendor/jsonschema-draft3.mask deleted file mode 100644 index 2f29af785..000000000 --- a/vendor/jsonschema-draft3.mask +++ /dev/null @@ -1 +0,0 @@ -jsonschema.xml diff --git a/vendor/jsonschema-draft3/hyper-schema.json b/vendor/jsonschema-draft3/hyper-schema.json deleted file mode 100644 index c3a2003fb..000000000 --- a/vendor/jsonschema-draft3/hyper-schema.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-03/hyper-schema#", - "extends" : {"$ref" : "http://json-schema.org/draft-03/schema#"}, - "id" : "http://json-schema.org/draft-03/hyper-schema#", - - "properties" : { - "links" : { - "type" : "array", - "items" : {"$ref" : "http://json-schema.org/draft-03/links#"} - }, - - "fragmentResolution" : { - "type" : "string", - "default" : "slash-delimited" - }, - - "root" : { - "type" : "boolean", - "default" : false - }, - - "readonly" : { - "type" : "boolean", - "default" : false - }, - - "contentEncoding" : { - "type" : "string" - }, - - "pathStart" : { - "type" : "string", - "format" : "uri" - }, - - "mediaType" : { - "type" : "string", - "format" : "media-type" - } - }, - - "links" : [ - { - "href" : "{id}", - "rel" : "self" - }, - - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - } - ], - - "fragmentResolution" : "slash-delimited" -} diff --git a/vendor/jsonschema-draft3/json-ref.json b/vendor/jsonschema-draft3/json-ref.json deleted file mode 100644 index 7e491a8e8..000000000 --- a/vendor/jsonschema-draft3/json-ref.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-03/hyper-schema#", - "id" : "http://json-schema.org/draft-03/json-ref#", - - "additionalItems" : {"$ref" : "#"}, - "additionalProperties" : {"$ref" : "#"}, - - "links" : [ - { - "href" : "{id}", - "rel" : "self" - }, - - { - "href" : "{$ref}", - "rel" : "full" - }, - - { - "href" : "{$schema}", - "rel" : "describedby" - } - ], - - "fragmentResolution" : "dot-delimited" -} \ No newline at end of file diff --git a/vendor/jsonschema-draft3/links.json b/vendor/jsonschema-draft3/links.json deleted file mode 100644 index 6b0a85a62..000000000 --- a/vendor/jsonschema-draft3/links.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-03/hyper-schema#", - "id" : "http://json-schema.org/draft-03/links#", - "type" : "object", - - "properties" : { - "href" : { - "type" : "string", - "required" : true, - "format" : "link-description-object-template" - }, - - "rel" : { - "type" : "string", - "required" : true - }, - - "targetSchema" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"}, - - "method" : { - "type" : "string", - "default" : "GET" - }, - - "enctype" : { - "type" : "string", - "requires" : "method" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-03/hyper-schema#"} - } - } -} \ No newline at end of file diff --git a/vendor/jsonschema-draft3/schema.json b/vendor/jsonschema-draft3/schema.json deleted file mode 100644 index 55ae47d80..000000000 --- a/vendor/jsonschema-draft3/schema.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-03/schema#", - "id" : "http://json-schema.org/draft-03/schema#", - "type" : "object", - - "properties" : { - "type" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "uniqueItems" : true, - "default" : "any" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "default" : {} - }, - - "patternProperties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "#"}, - "default" : {} - }, - - "additionalProperties" : { - "type" : [{"$ref" : "#"}, "boolean"], - "default" : {} - }, - - "items" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "default" : {} - }, - - "additionalItems" : { - "type" : [{"$ref" : "#"}, "boolean"], - "default" : {} - }, - - "required" : { - "type" : "boolean", - "default" : false - }, - - "dependencies" : { - "type" : "object", - "additionalProperties" : { - "type" : ["string", "array", {"$ref" : "#"}], - "items" : { - "type" : "string" - } - }, - "default" : {} - }, - - "minimum" : { - "type" : "number" - }, - - "maximum" : { - "type" : "number" - }, - - "exclusiveMinimum" : { - "type" : "boolean", - "default" : false - }, - - "exclusiveMaximum" : { - "type" : "boolean", - "default" : false - }, - - "minItems" : { - "type" : "integer", - "minimum" : 0, - "default" : 0 - }, - - "maxItems" : { - "type" : "integer", - "minimum" : 0 - }, - - "uniqueItems" : { - "type" : "boolean", - "default" : false - }, - - "pattern" : { - "type" : "string", - "format" : "regex" - }, - - "minLength" : { - "type" : "integer", - "minimum" : 0, - "default" : 0 - }, - - "maxLength" : { - "type" : "integer" - }, - - "enum" : { - "type" : "array", - "minItems" : 1, - "uniqueItems" : true - }, - - "default" : { - "type" : "any" - }, - - "title" : { - "type" : "string" - }, - - "description" : { - "type" : "string" - }, - - "format" : { - "type" : "string" - }, - - "divisibleBy" : { - "type" : "number", - "minimum" : 0, - "exclusiveMinimum" : true, - "default" : 1 - }, - - "disallow" : { - "type" : ["string", "array"], - "items" : { - "type" : ["string", {"$ref" : "#"}] - }, - "uniqueItems" : true - }, - - "extends" : { - "type" : [{"$ref" : "#"}, "array"], - "items" : {"$ref" : "#"}, - "default" : {} - }, - - "id" : { - "type" : "string", - "format" : "uri" - }, - - "$ref" : { - "type" : "string", - "format" : "uri" - }, - - "$schema" : { - "type" : "string", - "format" : "uri" - } - }, - - "dependencies" : { - "exclusiveMinimum" : "minimum", - "exclusiveMaximum" : "maximum" - }, - - "default" : {} -} \ No newline at end of file diff --git a/vendor/jsonschema-draft4.mask b/vendor/jsonschema-draft4.mask deleted file mode 100644 index 8b2a0b053..000000000 --- a/vendor/jsonschema-draft4.mask +++ /dev/null @@ -1,3 +0,0 @@ -jsonschema-core.xml -jsonschema-hyperschema.xml -jsonschema-validation.xml diff --git a/vendor/jsonschema-draft4/hyper-schema.json b/vendor/jsonschema-draft4/hyper-schema.json deleted file mode 100644 index a19bb0fe5..000000000 --- a/vendor/jsonschema-draft4/hyper-schema.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/hyper-schema#", - "id": "http://json-schema.org/draft-04/hyper-schema#", - "title": "JSON Hyper-Schema", - "allOf": [ - {"$ref": "http://json-schema.org/draft-04/schema#"} - ], - "properties": { - "additionalItems": { - "anyOf": [ - {"type": "boolean"}, - {"$ref": "#"} - ] - }, - "additionalProperties": { - "anyOf": [ - {"type": "boolean"}, - {"$ref": "#"} - ] - }, - "dependencies": { - "additionalProperties": { - "anyOf": [ - {"$ref": "#"}, - {"type": "array"} - ] - } - }, - "items": { - "anyOf": [ - {"$ref": "#"}, - {"$ref": "#/definitions/schemaArray"} - ] - }, - "definitions": { - "additionalProperties": {"$ref": "#"} - }, - "patternProperties": { - "additionalProperties": {"$ref": "#"} - }, - "properties": { - "additionalProperties": {"$ref": "#"} - }, - "allOf": {"$ref": "#/definitions/schemaArray"}, - "anyOf": {"$ref": "#/definitions/schemaArray"}, - "oneOf": {"$ref": "#/definitions/schemaArray"}, - "not": { "$ref": "#" }, - - "links": { - "type": "array", - "items": {"$ref": "#/definitions/linkDescription"} - }, - "fragmentResolution": { - "type": "string" - }, - "media": { - "type": "object", - "properties": { - "type": { - "description": "A media type, as described in RFC 2046", - "type": "string" - }, - "binaryEncoding": { - "description": "A content encoding scheme, as described in RFC 2045", - "type": "string" - } - } - }, - "pathStart": { - "description": "Instances' URIs must start with this value for this schema to apply to them", - "type": "string", - "format": "uri" - } - }, - "definitions": { - "schemaArray": { - "type": "array", - "items": {"$ref": "#"} - }, - "linkDescription": { - "title": "Link Description Object", - "type": "object", - "required": ["href", "rel"], - "properties": { - "href": { - "description": "a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing", - "type": "string" - }, - "rel": { - "description": "relation to the target resource of the link", - "type": "string" - }, - "title": { - "description": "a title for the link", - "type": "string" - }, - "targetSchema": { - "description": "JSON Schema describing the link target", - "$ref": "#" - }, - "mediaType": { - "description": "media type (as defined by RFC 2046) describing the link target", - "type": "string" - }, - "method": { - "description": "method for requesting the target of the link (e.g. for HTTP this might be \"GET\" or \"DELETE\")", - "type": "string" - }, - "encType": { - "description": "The media type in which to submit data along with the request", - "type": "string", - "default": "application/json" - }, - "schema": { - "description": "Schema describing the data to submit along with the request", - "$ref": "#" - } - } - }, - "readOnly": { - "description": "If true, indicates that the value of this property is controlled by the server.", - "type": "boolean", - "default": false - } - }, - "links": [ - { - "rel": "self", - "href": "{+id}" - }, - { - "rel": "full", - "href": "{+($ref)}" - } - ] -} diff --git a/vendor/jsonschema-draft4/links.json b/vendor/jsonschema-draft4/links.json deleted file mode 100644 index 118601a9e..000000000 --- a/vendor/jsonschema-draft4/links.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "$schema" : "http://json-schema.org/draft-04/hyper-schema#", - "id" : "http://json-schema.org/draft-04/links#", - "type" : "object", - - "properties" : { - "rel" : { - "type" : "string" - }, - - "href" : { - "type" : "string" - }, - - "template" : { - "type" : "string" - }, - - "targetSchema" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"}, - - "method" : { - "type" : "string", - "default" : "GET" - }, - - "enctype" : { - "type" : "string" - }, - - "properties" : { - "type" : "object", - "additionalProperties" : {"$ref" : "http://json-schema.org/draft-04/hyper-schema#"} - } - }, - - "required" : ["rel", "href"], - - "dependencies" : { - "enctype" : ["method"] - } -} diff --git a/vendor/jsonschema-draft4/schema.json b/vendor/jsonschema-draft4/schema.json deleted file mode 100644 index bcbb84743..000000000 --- a/vendor/jsonschema-draft4/schema.json +++ /dev/null @@ -1,149 +0,0 @@ -{ - "id": "http://json-schema.org/draft-04/schema#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#" } - }, - "positiveInteger": { - "type": "integer", - "minimum": 0 - }, - "positiveIntegerDefault0": { - "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ] - }, - "simpleTypes": { - "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "minItems": 1, - "uniqueItems": true - } - }, - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "$schema": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": {}, - "multipleOf": { - "type": "number", - "minimum": 0, - "exclusiveMinimum": true - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { "$ref": "#/definitions/positiveInteger" }, - "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" } - ], - "default": {} - }, - "items": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/schemaArray" } - ], - "default": {} - }, - "maxItems": { "$ref": "#/definitions/positiveInteger" }, - "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxProperties": { "$ref": "#/definitions/positiveInteger" }, - "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, - "required": { "$ref": "#/definitions/stringArray" }, - "additionalProperties": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" } - ], - "default": {} - }, - "definitions": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/stringArray" } - ] - } - }, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - { "$ref": "#/definitions/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/definitions/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": { "type": "string" }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" } - }, - "dependencies": { - "exclusiveMaximum": [ "maximum" ], - "exclusiveMinimum": [ "minimum" ] - }, - "default": {} -} diff --git a/vendor/jsonschema-draft6.mask b/vendor/jsonschema-draft6.mask deleted file mode 100644 index 71a4ac07a..000000000 --- a/vendor/jsonschema-draft6.mask +++ /dev/null @@ -1,6 +0,0 @@ -archive/ -jsonschema-core.xml -jsonschema-hyperschema.xml -jsonschema-validation.xml -Makefile -README.md diff --git a/vendor/jsonschema-draft6/hyper-schema.json b/vendor/jsonschema-draft6/hyper-schema.json deleted file mode 100644 index a9e96c66d..000000000 --- a/vendor/jsonschema-draft6/hyper-schema.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-06/hyper-schema#", - "$id": "http://json-schema.org/draft-06/hyper-schema#", - "title": "JSON Hyper-Schema", - "definitions": { - "schemaArray": { - "allOf": [ - { "$ref": "http://json-schema.org/draft-06/schema#/definitions/schemaArray" }, - { - "items": { "$ref": "#" } - } - ] - }, - "linkDescription": { - "title": "Link Description Object", - "type": "object", - "required": [ "href" ], - "properties": { - "href": { - "description": "a URI template, as defined by RFC 6570", - "type": "string", - "format": "uri-template" - }, - "hrefSchema": { - "description": "a schema for validating user input to the URI template, where the input is in the form of a JSON object with property names matching variable names in \"href\"", - "allOf": [ {"$ref": "#"} ] - }, - "rel": { - "description": "relation to the target resource of the link", - "type": "string" - }, - "title": { - "description": "a title for the link", - "type": "string" - }, - "targetSchema": { - "description": "JSON Schema describing the link target", - "allOf": [ { "$ref": "#" } ] - }, - "mediaType": { - "description": "media type (as defined by RFC 2046) describing the link target", - "type": "string" - }, - "submissionEncType": { - "description": "The media type in which to submit data along with the request", - "type": "string", - "default": "application/json" - }, - "submissionSchema": { - "description": "Schema describing the data to submit along with the request", - "allOf": [ { "$ref": "#" } ] - } - } - } - }, - "allOf": [ { "$ref": "http://json-schema.org/draft-06/schema#" } ], - "properties": { - "additionalItems": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" } - ] - }, - "additionalProperties": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" } - ] - }, - "dependencies": { - "additionalProperties": { - "anyOf": [ - { "$ref": "#" }, - { "type": "array" } - ] - } - }, - "items": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/schemaArray" } - ] - }, - "definitions": { - "additionalProperties": { "$ref": "#" } - }, - "patternProperties": { - "additionalProperties": { "$ref": "#" } - }, - "properties": { - "additionalProperties": { "$ref": "#" } - }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" }, - - "contains": { "$ref": "#" }, - "propertyNames": { "$ref": "#" }, - "base": { - "description": "URI Template resolved as for the 'href' keyword in the Link Description Object. The resulting URI Reference is resolved against the current URI base and sets the new URI base for URI references within the instance.", - "type": "string" - }, - "links": { - "type": "array", - "items": { "$ref": "#/definitions/linkDescription" } - }, - "media": { - "type": "object", - "properties": { - "type": { - "description": "A media type, as described in RFC 2046", - "type": "string" - }, - "binaryEncoding": { - "description": "A content encoding scheme, as described in RFC 2045", - "type": "string" - } - } - }, - "readOnly": { - "description": "If true, indicates that the value of this property is controlled by the server.", - "type": "boolean", - "default": false - } - }, - "links": [ - { - "rel": "self", - "href": "{+%24id}" - } - ] -} diff --git a/vendor/jsonschema-draft6/links.json b/vendor/jsonschema-draft6/links.json deleted file mode 100644 index 7c2292c30..000000000 --- a/vendor/jsonschema-draft6/links.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-06/hyper-schema#", - "$id": "http://json-schema.org/draft-06/links#", - "title": "Link Description Object", - "type": "object", - "required": [ "href" ], - "properties": { - "href": { - "description": "a URI template, as defined by RFC 6570", - "type": "string", - "format": "uri-template" - }, - "hrefSchema": { - "description": "a schema for validating user input to the URI template, where the input is in the form of a JSON object with property names matching variable names in \"href\"", - "allOf": [ {"$ref": "#"} ] - }, - "rel": { - "description": "relation to the target resource of the link", - "type": "string" - }, - "title": { - "description": "a title for the link", - "type": "string" - }, - "targetSchema": { - "description": "JSON Schema describing the link target", - "allOf": [ { "$ref": "hyper-schema#" } ] - }, - "mediaType": { - "description": "media type (as defined by RFC 2046) describing the link target", - "type": "string" - }, - "submissionEncType": { - "description": "The media type in which to submit data along with the request", - "type": "string", - "default": "application/json" - }, - "submissionSchema": { - "description": "Schema describing the data to submit along with the request", - "allOf": [ { "$ref": "hyper-schema#" } ] - } - } -} diff --git a/vendor/jsonschema-draft6/schema.json b/vendor/jsonschema-draft6/schema.json deleted file mode 100644 index bd3e763bc..000000000 --- a/vendor/jsonschema-draft6/schema.json +++ /dev/null @@ -1,155 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "http://json-schema.org/draft-06/schema#", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#" } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { "$ref": "#/definitions/nonNegativeInteger" }, - { "default": 0 } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true, - "default": [] - } - }, - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": {}, - "examples": { - "type": "array", - "items": {} - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, - "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { "$ref": "#" }, - "items": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/schemaArray" } - ], - "default": {} - }, - "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, - "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": { "$ref": "#" }, - "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, - "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "required": { "$ref": "#/definitions/stringArray" }, - "additionalProperties": { "$ref": "#" }, - "definitions": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "propertyNames": { "format": "regex" }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/stringArray" } - ] - } - }, - "propertyNames": { "$ref": "#" }, - "const": {}, - "enum": { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - { "$ref": "#/definitions/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/definitions/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": { "type": "string" }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" } - }, - "default": {} -} diff --git a/vendor/jsonschema-draft7.mask b/vendor/jsonschema-draft7.mask deleted file mode 100644 index 208c2c463..000000000 --- a/vendor/jsonschema-draft7.mask +++ /dev/null @@ -1,8 +0,0 @@ - .travis.yml - CONTRIBUTING.md - jsonschema-core.xml - jsonschema-hyperschema.xml - jsonschema-validation.xml - Makefile - README.md - relative-json-pointer.xml diff --git a/vendor/jsonschema-draft7/hyper-schema-output.json b/vendor/jsonschema-draft7/hyper-schema-output.json deleted file mode 100644 index 91d49d5de..000000000 --- a/vendor/jsonschema-draft7/hyper-schema-output.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "$id": "http://json-schema.org/draft-07/hyper-schema-output", - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "array", - "items": { - "allOf": [ - {"$ref": "http://json-schema.org/draft-07/links#/definitions/noRequiredFields" } - ], - "type": "object", - "required": [ - "contextUri", - "contextPointer", - "rel", - "attachmentPointer" - ], - "if": { "required": [ "hrefSchema" ] }, - "then": { "required": [ "hrefInputTemplates", "hrefPrepopulatedInput" ] }, - "else": { "required": [ "targetUri" ] }, - "properties": { - "contextUri": { - "$comment": "The fully resolved URI of the link context, including a fragment if it is possible to construct one for the given media type and instance", - "type": "string", - "format": "uri" - }, - "contextPointer": { - "$comment": "The absolute JSON Pointer to the location in the instance that is the context of the link. If the context resource supports JSON Pointer fragments, this will the string form of the identical JSON Pointer", - "type": "string", - "format": "json-pointer" - }, - "rel": { - "type": "string" - }, - "targetUri": { - "$comment": "The fully resolved target URI", - "type": "string", - "format": "uri" - }, - "hrefInputTemplates": { - "$comment": "The list of partially resolved URI Templates, starting with \"href\", followed by applicable \"base\" values from nearest to furthest.", - "type": "array", - "items": { - "type": "string", - "format": "uri-template" - } - }, - "hrefPrepopulatedInput": { - "$comment": "The initial data set to be presented with the input form when URI Tempalte input is accepted.", - "type": "object", - "propertyNames": { - "$comment": "These are all URI Template variable names, specifically the 'varname' production from RFC 6570, Section 2.3", - "pattern": "^(?:\\w|(?:%[a-f\\d]{2}))+(?:\\.(?:\\w|(?:%[a-f\\d]{2})))*$" - } - }, - "attachmentPointer": { - "$comment": "The absolute JSON Pointer, in string form, of the position to which this resolved link applies", - "type": "string", - "format": "json-pointer" - } - } - } -} diff --git a/vendor/jsonschema-draft7/hyper-schema.json b/vendor/jsonschema-draft7/hyper-schema.json deleted file mode 100644 index 7ed18bc5d..000000000 --- a/vendor/jsonschema-draft7/hyper-schema.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/hyper-schema#", - "$id": "http://json-schema.org/draft-07/hyper-schema#", - "title": "JSON Hyper-Schema", - "definitions": { - "schemaArray": { - "allOf": [ - { "$ref": "http://json-schema.org/draft-07/schema#/definitions/schemaArray" }, - { - "items": { "$ref": "#" } - } - ] - } - }, - "allOf": [ { "$ref": "http://json-schema.org/draft-07/schema#" } ], - "properties": { - "additionalItems": { "$ref": "#" }, - "additionalProperties": { "$ref": "#"}, - "dependencies": { - "additionalProperties": { - "anyOf": [ - { "$ref": "#" }, - { "type": "array" } - ] - } - }, - "items": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/schemaArray" } - ] - }, - "definitions": { - "additionalProperties": { "$ref": "#" } - }, - "patternProperties": { - "additionalProperties": { "$ref": "#" } - }, - "properties": { - "additionalProperties": { "$ref": "#" } - }, - "if": { "$ref": "#" }, - "then": { "$ref": "#" }, - "else": { "$ref": "#" }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" }, - "contains": { "$ref": "#" }, - "propertyNames": { "$ref": "#" }, - "base": { - "type": "string", - "format": "uri-template" - }, - "links": { - "type": "array", - "items": { - "$ref": "http://json-schema.org/draft-07/links#" - } - } - }, - "links": [ - { - "rel": "self", - "href": "{+%24id}" - } - ] -} diff --git a/vendor/jsonschema-draft7/links.json b/vendor/jsonschema-draft7/links.json deleted file mode 100644 index 1336abbef..000000000 --- a/vendor/jsonschema-draft7/links.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/hyper-schema#", - "$id": "http://json-schema.org/draft-07/links#", - "title": "Link Description Object", - "allOf": [ - { "required": [ "rel", "href" ] }, - { "$ref": "#/definitions/noRequiredFields" } - ], - "definitions": { - "noRequiredFields": { - "type": "object", - "properties": { - "anchor": { - "type": "string", - "format": "uri-template" - }, - "anchorPointer": { - "type": "string", - "anyOf": [ - { "format": "json-pointer" }, - { "format": "relative-json-pointer" } - ] - }, - "rel": { - "type": "string" - }, - "href": { - "type": "string", - "format": "uri-template" - }, - "hrefSchema": { - "$ref": "http://json-schema.org/draft-07/hyper-schema#" - }, - "templatePointers": { - "type": "object", - "additionalProperties": { - "type": "string", - "anyOf": [ - { "format": "json-pointer" }, - { "format": "relative-json-pointer" } - ] - } - }, - "templateRequired": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "targetSchema": { - "$ref": "http://json-schema.org/draft-07/hyper-schema#" - }, - "targetMediaType": { - "type": "string" - }, - "targetHints": { }, - "headerSchema": { - "$ref": "http://json-schema.org/draft-07/hyper-schema#" - }, - "submissionMediaType": { - "type": "string", - "default": "application/json" - }, - "submissionSchema": { - "$ref": "http://json-schema.org/draft-07/hyper-schema#" - }, - "$comment": { - "type": "string" - } - } - } - } -} diff --git a/vendor/jsonschema-draft7/schema.json b/vendor/jsonschema-draft7/schema.json deleted file mode 100644 index fb92c7f75..000000000 --- a/vendor/jsonschema-draft7/schema.json +++ /dev/null @@ -1,172 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "http://json-schema.org/draft-07/schema#", - "title": "Core schema meta-schema", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#" } - }, - "nonNegativeInteger": { - "type": "integer", - "minimum": 0 - }, - "nonNegativeIntegerDefault0": { - "allOf": [ - { "$ref": "#/definitions/nonNegativeInteger" }, - { "default": 0 } - ] - }, - "simpleTypes": { - "enum": [ - "array", - "boolean", - "integer", - "null", - "number", - "object", - "string" - ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "uniqueItems": true, - "default": [] - } - }, - "type": ["object", "boolean"], - "properties": { - "$id": { - "type": "string", - "format": "uri-reference" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "$comment": { - "type": "string" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": true, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "examples": { - "type": "array", - "items": true - }, - "multipleOf": { - "type": "number", - "exclusiveMinimum": 0 - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "number" - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "number" - }, - "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, - "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "pattern": { - "type": "string", - "format": "regex" - }, - "additionalItems": { "$ref": "#" }, - "items": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/schemaArray" } - ], - "default": true - }, - "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, - "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "contains": { "$ref": "#" }, - "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, - "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, - "required": { "$ref": "#/definitions/stringArray" }, - "additionalProperties": { "$ref": "#" }, - "definitions": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "propertyNames": { "format": "regex" }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/stringArray" } - ] - } - }, - "propertyNames": { "$ref": "#" }, - "const": true, - "enum": { - "type": "array", - "items": true, - "minItems": 1, - "uniqueItems": true - }, - "type": { - "anyOf": [ - { "$ref": "#/definitions/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/definitions/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "format": { "type": "string" }, - "contentMediaType": { "type": "string" }, - "contentEncoding": { "type": "string" }, - "if": { "$ref": "#" }, - "then": { "$ref": "#" }, - "else": { "$ref": "#" }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" } - }, - "default": true -} diff --git a/vendor/openapi.mask b/vendor/openapi.mask deleted file mode 100644 index c40a5e459..000000000 --- a/vendor/openapi.mask +++ /dev/null @@ -1,38 +0,0 @@ -_includes/ -_sass/ -api/ -arazzo/ -assets/ -js/ -overlay/ -registries/ -registry/ -rss/ -_config.yml -CNAME -CONTRIBUTING.md -favicon.ico -Gemfile -Gemfile.lock -index.md -README.md -oas/latest.html -oas/v2.0.html -oas/v3.0.0.html -oas/v3.0.1.html -oas/v3.0.2.html -oas/v3.0.3.html -oas/v3.0.4.html -oas/v3.0.html -oas/v3.1.0.html -oas/v3.1.1.html -oas/v3.1.2.html -oas/v3.1.html -oas/v3.2.0.html -oas/v3.2.html -oas/2.0/schema/2017-08-27.md -oas/3.0/schema/2024-10-18.md -oas/3.1/meta/2024-11-10.md -oas/3.1/schema/2025-09-15.md -oas/3.1/schema-base/2025-09-15.md -oas/3.1/dialect/2024-11-10.md diff --git a/vendor/openapi/LICENSE b/vendor/openapi/LICENSE deleted file mode 100644 index 261eeb9e9..000000000 --- a/vendor/openapi/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/openapi/oas/2.0/schema/2017-08-27 b/vendor/openapi/oas/2.0/schema/2017-08-27 deleted file mode 100644 index a92e18f2a..000000000 --- a/vendor/openapi/oas/2.0/schema/2017-08-27 +++ /dev/null @@ -1,1607 +0,0 @@ -{ - "title": "A JSON Schema for Swagger 2.0 API.", - "id": "http://swagger.io/v2/schema.json#", - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "required": [ - "swagger", - "info", - "paths" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "swagger": { - "type": "string", - "enum": [ - "2.0" - ], - "description": "The Swagger version of this document." - }, - "info": { - "$ref": "#/definitions/info" - }, - "host": { - "type": "string", - "pattern": "^[^{}/ :\\\\]+(?::\\d+)?$", - "description": "The host (name or ip) of the API. Example: 'swagger.io'" - }, - "basePath": { - "type": "string", - "pattern": "^/", - "description": "The base path to the API. Example: '/api'." - }, - "schemes": { - "$ref": "#/definitions/schemesList" - }, - "consumes": { - "description": "A list of MIME types accepted by the API.", - "allOf": [ - { - "$ref": "#/definitions/mediaTypeList" - } - ] - }, - "produces": { - "description": "A list of MIME types the API can produce.", - "allOf": [ - { - "$ref": "#/definitions/mediaTypeList" - } - ] - }, - "paths": { - "$ref": "#/definitions/paths" - }, - "definitions": { - "$ref": "#/definitions/definitions" - }, - "parameters": { - "$ref": "#/definitions/parameterDefinitions" - }, - "responses": { - "$ref": "#/definitions/responseDefinitions" - }, - "security": { - "$ref": "#/definitions/security" - }, - "securityDefinitions": { - "$ref": "#/definitions/securityDefinitions" - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/tag" - }, - "uniqueItems": true - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "definitions": { - "info": { - "type": "object", - "description": "General information about the API.", - "required": [ - "version", - "title" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "title": { - "type": "string", - "description": "A unique and precise title of the API." - }, - "version": { - "type": "string", - "description": "A semantic version number of the API." - }, - "description": { - "type": "string", - "description": "A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed." - }, - "termsOfService": { - "type": "string", - "description": "The terms of service for the API." - }, - "contact": { - "$ref": "#/definitions/contact" - }, - "license": { - "$ref": "#/definitions/license" - } - } - }, - "contact": { - "type": "object", - "description": "Contact information for the owners of the API.", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The identifying name of the contact person/organization." - }, - "url": { - "type": "string", - "description": "The URL pointing to the contact information.", - "format": "uri" - }, - "email": { - "type": "string", - "description": "The email address of the contact person/organization.", - "format": "email" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "license": { - "type": "object", - "required": [ - "name" - ], - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "description": "The name of the license type. It's encouraged to use an OSI compatible license." - }, - "url": { - "type": "string", - "description": "The URL pointing to the license.", - "format": "uri" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "paths": { - "type": "object", - "description": "Relative paths to the individual endpoints. They must be relative to the 'basePath'.", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - }, - "^/": { - "$ref": "#/definitions/pathItem" - } - }, - "additionalProperties": false - }, - "definitions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "description": "One or more JSON objects describing the schemas being consumed and produced by the API." - }, - "parameterDefinitions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/parameter" - }, - "description": "One or more JSON representations for parameters" - }, - "responseDefinitions": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/response" - }, - "description": "One or more JSON representations for responses" - }, - "externalDocs": { - "type": "object", - "additionalProperties": false, - "description": "information about external documentation", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "examples": { - "type": "object", - "additionalProperties": true - }, - "mimeType": { - "type": "string", - "description": "The MIME type of the HTTP message." - }, - "operation": { - "type": "object", - "required": [ - "responses" - ], - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - }, - "summary": { - "type": "string", - "description": "A brief summary of the operation." - }, - "description": { - "type": "string", - "description": "A longer description of the operation, GitHub Flavored Markdown is allowed." - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "operationId": { - "type": "string", - "description": "A unique identifier of the operation." - }, - "produces": { - "description": "A list of MIME types the API can produce.", - "allOf": [ - { - "$ref": "#/definitions/mediaTypeList" - } - ] - }, - "consumes": { - "description": "A list of MIME types the API can consume.", - "allOf": [ - { - "$ref": "#/definitions/mediaTypeList" - } - ] - }, - "parameters": { - "$ref": "#/definitions/parametersList" - }, - "responses": { - "$ref": "#/definitions/responses" - }, - "schemes": { - "$ref": "#/definitions/schemesList" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "security": { - "$ref": "#/definitions/security" - } - } - }, - "pathItem": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "$ref": { - "type": "string" - }, - "get": { - "$ref": "#/definitions/operation" - }, - "put": { - "$ref": "#/definitions/operation" - }, - "post": { - "$ref": "#/definitions/operation" - }, - "delete": { - "$ref": "#/definitions/operation" - }, - "options": { - "$ref": "#/definitions/operation" - }, - "head": { - "$ref": "#/definitions/operation" - }, - "patch": { - "$ref": "#/definitions/operation" - }, - "parameters": { - "$ref": "#/definitions/parametersList" - } - } - }, - "responses": { - "type": "object", - "description": "Response objects names can either be any valid HTTP status code or 'default'.", - "minProperties": 1, - "additionalProperties": false, - "patternProperties": { - "^([0-9]{3})$|^(default)$": { - "$ref": "#/definitions/responseValue" - }, - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "not": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - } - }, - "responseValue": { - "oneOf": [ - { - "$ref": "#/definitions/response" - }, - { - "$ref": "#/definitions/jsonReference" - } - ] - }, - "response": { - "type": "object", - "required": [ - "description" - ], - "properties": { - "description": { - "type": "string" - }, - "schema": { - "oneOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "$ref": "#/definitions/fileSchema" - } - ] - }, - "headers": { - "$ref": "#/definitions/headers" - }, - "examples": { - "$ref": "#/definitions/examples" - } - }, - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/header" - } - }, - "header": { - "type": "object", - "additionalProperties": false, - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "string", - "number", - "integer", - "boolean", - "array" - ] - }, - "format": { - "type": "string" - }, - "items": { - "$ref": "#/definitions/primitivesItems" - }, - "collectionFormat": { - "$ref": "#/definitions/collectionFormat" - }, - "default": { - "$ref": "#/definitions/default" - }, - "maximum": { - "$ref": "#/definitions/maximum" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/exclusiveMaximum" - }, - "minimum": { - "$ref": "#/definitions/minimum" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/exclusiveMinimum" - }, - "maxLength": { - "$ref": "#/definitions/maxLength" - }, - "minLength": { - "$ref": "#/definitions/minLength" - }, - "pattern": { - "$ref": "#/definitions/pattern" - }, - "maxItems": { - "$ref": "#/definitions/maxItems" - }, - "minItems": { - "$ref": "#/definitions/minItems" - }, - "uniqueItems": { - "$ref": "#/definitions/uniqueItems" - }, - "enum": { - "$ref": "#/definitions/enum" - }, - "multipleOf": { - "$ref": "#/definitions/multipleOf" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "vendorExtension": { - "description": "Any property starting with x- is valid.", - "additionalProperties": true, - "additionalItems": true - }, - "bodyParameter": { - "type": "object", - "required": [ - "name", - "in", - "schema" - ], - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "in": { - "type": "string", - "description": "Determines the location of the parameter.", - "enum": [ - "body" - ] - }, - "required": { - "type": "boolean", - "description": "Determines whether or not this parameter is required or optional.", - "default": false - }, - "schema": { - "$ref": "#/definitions/schema" - } - }, - "additionalProperties": false - }, - "headerParameterSubSchema": { - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "required": { - "type": "boolean", - "description": "Determines whether or not this parameter is required or optional.", - "default": false - }, - "in": { - "type": "string", - "description": "Determines the location of the parameter.", - "enum": [ - "header" - ] - }, - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "type": { - "type": "string", - "enum": [ - "string", - "number", - "boolean", - "integer", - "array" - ] - }, - "format": { - "type": "string" - }, - "items": { - "$ref": "#/definitions/primitivesItems" - }, - "collectionFormat": { - "$ref": "#/definitions/collectionFormat" - }, - "default": { - "$ref": "#/definitions/default" - }, - "maximum": { - "$ref": "#/definitions/maximum" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/exclusiveMaximum" - }, - "minimum": { - "$ref": "#/definitions/minimum" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/exclusiveMinimum" - }, - "maxLength": { - "$ref": "#/definitions/maxLength" - }, - "minLength": { - "$ref": "#/definitions/minLength" - }, - "pattern": { - "$ref": "#/definitions/pattern" - }, - "maxItems": { - "$ref": "#/definitions/maxItems" - }, - "minItems": { - "$ref": "#/definitions/minItems" - }, - "uniqueItems": { - "$ref": "#/definitions/uniqueItems" - }, - "enum": { - "$ref": "#/definitions/enum" - }, - "multipleOf": { - "$ref": "#/definitions/multipleOf" - } - } - }, - "queryParameterSubSchema": { - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "required": { - "type": "boolean", - "description": "Determines whether or not this parameter is required or optional.", - "default": false - }, - "in": { - "type": "string", - "description": "Determines the location of the parameter.", - "enum": [ - "query" - ] - }, - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "allowEmptyValue": { - "type": "boolean", - "default": false, - "description": "allows sending a parameter by name only or with an empty value." - }, - "type": { - "type": "string", - "enum": [ - "string", - "number", - "boolean", - "integer", - "array" - ] - }, - "format": { - "type": "string" - }, - "items": { - "$ref": "#/definitions/primitivesItems" - }, - "collectionFormat": { - "$ref": "#/definitions/collectionFormatWithMulti" - }, - "default": { - "$ref": "#/definitions/default" - }, - "maximum": { - "$ref": "#/definitions/maximum" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/exclusiveMaximum" - }, - "minimum": { - "$ref": "#/definitions/minimum" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/exclusiveMinimum" - }, - "maxLength": { - "$ref": "#/definitions/maxLength" - }, - "minLength": { - "$ref": "#/definitions/minLength" - }, - "pattern": { - "$ref": "#/definitions/pattern" - }, - "maxItems": { - "$ref": "#/definitions/maxItems" - }, - "minItems": { - "$ref": "#/definitions/minItems" - }, - "uniqueItems": { - "$ref": "#/definitions/uniqueItems" - }, - "enum": { - "$ref": "#/definitions/enum" - }, - "multipleOf": { - "$ref": "#/definitions/multipleOf" - } - } - }, - "formDataParameterSubSchema": { - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "required": { - "type": "boolean", - "description": "Determines whether or not this parameter is required or optional.", - "default": false - }, - "in": { - "type": "string", - "description": "Determines the location of the parameter.", - "enum": [ - "formData" - ] - }, - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "allowEmptyValue": { - "type": "boolean", - "default": false, - "description": "allows sending a parameter by name only or with an empty value." - }, - "type": { - "type": "string", - "enum": [ - "string", - "number", - "boolean", - "integer", - "array", - "file" - ] - }, - "format": { - "type": "string" - }, - "items": { - "$ref": "#/definitions/primitivesItems" - }, - "collectionFormat": { - "$ref": "#/definitions/collectionFormatWithMulti" - }, - "default": { - "$ref": "#/definitions/default" - }, - "maximum": { - "$ref": "#/definitions/maximum" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/exclusiveMaximum" - }, - "minimum": { - "$ref": "#/definitions/minimum" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/exclusiveMinimum" - }, - "maxLength": { - "$ref": "#/definitions/maxLength" - }, - "minLength": { - "$ref": "#/definitions/minLength" - }, - "pattern": { - "$ref": "#/definitions/pattern" - }, - "maxItems": { - "$ref": "#/definitions/maxItems" - }, - "minItems": { - "$ref": "#/definitions/minItems" - }, - "uniqueItems": { - "$ref": "#/definitions/uniqueItems" - }, - "enum": { - "$ref": "#/definitions/enum" - }, - "multipleOf": { - "$ref": "#/definitions/multipleOf" - } - } - }, - "pathParameterSubSchema": { - "additionalProperties": false, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "required": [ - "required" - ], - "properties": { - "required": { - "type": "boolean", - "enum": [ - true - ], - "description": "Determines whether or not this parameter is required or optional." - }, - "in": { - "type": "string", - "description": "Determines the location of the parameter.", - "enum": [ - "path" - ] - }, - "description": { - "type": "string", - "description": "A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed." - }, - "name": { - "type": "string", - "description": "The name of the parameter." - }, - "type": { - "type": "string", - "enum": [ - "string", - "number", - "boolean", - "integer", - "array" - ] - }, - "format": { - "type": "string" - }, - "items": { - "$ref": "#/definitions/primitivesItems" - }, - "collectionFormat": { - "$ref": "#/definitions/collectionFormat" - }, - "default": { - "$ref": "#/definitions/default" - }, - "maximum": { - "$ref": "#/definitions/maximum" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/exclusiveMaximum" - }, - "minimum": { - "$ref": "#/definitions/minimum" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/exclusiveMinimum" - }, - "maxLength": { - "$ref": "#/definitions/maxLength" - }, - "minLength": { - "$ref": "#/definitions/minLength" - }, - "pattern": { - "$ref": "#/definitions/pattern" - }, - "maxItems": { - "$ref": "#/definitions/maxItems" - }, - "minItems": { - "$ref": "#/definitions/minItems" - }, - "uniqueItems": { - "$ref": "#/definitions/uniqueItems" - }, - "enum": { - "$ref": "#/definitions/enum" - }, - "multipleOf": { - "$ref": "#/definitions/multipleOf" - } - } - }, - "nonBodyParameter": { - "type": "object", - "required": [ - "name", - "in", - "type" - ], - "oneOf": [ - { - "$ref": "#/definitions/headerParameterSubSchema" - }, - { - "$ref": "#/definitions/formDataParameterSubSchema" - }, - { - "$ref": "#/definitions/queryParameterSubSchema" - }, - { - "$ref": "#/definitions/pathParameterSubSchema" - } - ] - }, - "parameter": { - "oneOf": [ - { - "$ref": "#/definitions/bodyParameter" - }, - { - "$ref": "#/definitions/nonBodyParameter" - } - ] - }, - "schema": { - "type": "object", - "description": "A deterministic version of a JSON Schema object.", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "properties": { - "$ref": { - "type": "string" - }, - "format": { - "type": "string" - }, - "title": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/title" - }, - "description": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/description" - }, - "default": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/default" - }, - "multipleOf": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" - }, - "maximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" - }, - "exclusiveMaximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" - }, - "minimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" - }, - "exclusiveMinimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" - }, - "maxLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "pattern": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" - }, - "maxItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "uniqueItems": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" - }, - "maxProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minProperties": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "required": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" - }, - "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" - }, - "additionalProperties": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "boolean" - } - ], - "default": {} - }, - "type": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/type" - }, - "items": { - "anyOf": [ - { - "$ref": "#/definitions/schema" - }, - { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - } - ], - "default": {} - }, - "allOf": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "properties": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/schema" - }, - "default": {} - }, - "discriminator": { - "type": "string" - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "#/definitions/xml" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "example": {} - }, - "additionalProperties": false - }, - "fileSchema": { - "type": "object", - "description": "A deterministic version of a JSON Schema object.", - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - }, - "required": [ - "type" - ], - "properties": { - "format": { - "type": "string" - }, - "title": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/title" - }, - "description": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/description" - }, - "default": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/default" - }, - "required": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/stringArray" - }, - "type": { - "type": "string", - "enum": [ - "file" - ] - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - }, - "example": {} - }, - "additionalProperties": false - }, - "primitivesItems": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "enum": [ - "string", - "number", - "integer", - "boolean", - "array" - ] - }, - "format": { - "type": "string" - }, - "items": { - "$ref": "#/definitions/primitivesItems" - }, - "collectionFormat": { - "$ref": "#/definitions/collectionFormat" - }, - "default": { - "$ref": "#/definitions/default" - }, - "maximum": { - "$ref": "#/definitions/maximum" - }, - "exclusiveMaximum": { - "$ref": "#/definitions/exclusiveMaximum" - }, - "minimum": { - "$ref": "#/definitions/minimum" - }, - "exclusiveMinimum": { - "$ref": "#/definitions/exclusiveMinimum" - }, - "maxLength": { - "$ref": "#/definitions/maxLength" - }, - "minLength": { - "$ref": "#/definitions/minLength" - }, - "pattern": { - "$ref": "#/definitions/pattern" - }, - "maxItems": { - "$ref": "#/definitions/maxItems" - }, - "minItems": { - "$ref": "#/definitions/minItems" - }, - "uniqueItems": { - "$ref": "#/definitions/uniqueItems" - }, - "enum": { - "$ref": "#/definitions/enum" - }, - "multipleOf": { - "$ref": "#/definitions/multipleOf" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/securityRequirement" - }, - "uniqueItems": true - }, - "securityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true - } - }, - "xml": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean", - "default": false - }, - "wrapped": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "tag": { - "type": "object", - "additionalProperties": false, - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/externalDocs" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "securityDefinitions": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/basicAuthenticationSecurity" - }, - { - "$ref": "#/definitions/apiKeySecurity" - }, - { - "$ref": "#/definitions/oauth2ImplicitSecurity" - }, - { - "$ref": "#/definitions/oauth2PasswordSecurity" - }, - { - "$ref": "#/definitions/oauth2ApplicationSecurity" - }, - { - "$ref": "#/definitions/oauth2AccessCodeSecurity" - } - ] - } - }, - "basicAuthenticationSecurity": { - "type": "object", - "additionalProperties": false, - "required": [ - "type" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "basic" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "apiKeySecurity": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "name": { - "type": "string" - }, - "in": { - "type": "string", - "enum": [ - "header", - "query" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "oauth2ImplicitSecurity": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "flow", - "authorizationUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "flow": { - "type": "string", - "enum": [ - "implicit" - ] - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - }, - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "oauth2PasswordSecurity": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "flow", - "tokenUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "flow": { - "type": "string", - "enum": [ - "password" - ] - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "oauth2ApplicationSecurity": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "flow", - "tokenUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "flow": { - "type": "string", - "enum": [ - "application" - ] - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "oauth2AccessCodeSecurity": { - "type": "object", - "additionalProperties": false, - "required": [ - "type", - "flow", - "authorizationUrl", - "tokenUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "flow": { - "type": "string", - "enum": [ - "accessCode" - ] - }, - "scopes": { - "$ref": "#/definitions/oauth2Scopes" - }, - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - "$ref": "#/definitions/vendorExtension" - } - } - }, - "oauth2Scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "mediaTypeList": { - "type": "array", - "items": { - "$ref": "#/definitions/mimeType" - }, - "uniqueItems": true - }, - "parametersList": { - "type": "array", - "description": "The parameters needed to send a valid API call.", - "additionalItems": false, - "items": { - "oneOf": [ - { - "$ref": "#/definitions/parameter" - }, - { - "$ref": "#/definitions/jsonReference" - } - ] - }, - "uniqueItems": true - }, - "schemesList": { - "type": "array", - "description": "The transfer protocol of the API.", - "items": { - "type": "string", - "enum": [ - "http", - "https", - "ws", - "wss" - ] - }, - "uniqueItems": true - }, - "collectionFormat": { - "type": "string", - "enum": [ - "csv", - "ssv", - "tsv", - "pipes" - ], - "default": "csv" - }, - "collectionFormatWithMulti": { - "type": "string", - "enum": [ - "csv", - "ssv", - "tsv", - "pipes", - "multi" - ], - "default": "csv" - }, - "title": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/title" - }, - "description": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/description" - }, - "default": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/default" - }, - "multipleOf": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/multipleOf" - }, - "maximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/maximum" - }, - "exclusiveMaximum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMaximum" - }, - "minimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/minimum" - }, - "exclusiveMinimum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/exclusiveMinimum" - }, - "maxLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minLength": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "pattern": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/pattern" - }, - "maxItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveInteger" - }, - "minItems": { - "$ref": "http://json-schema.org/draft-04/schema#/definitions/positiveIntegerDefault0" - }, - "uniqueItems": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/uniqueItems" - }, - "enum": { - "$ref": "http://json-schema.org/draft-04/schema#/properties/enum" - }, - "jsonReference": { - "type": "object", - "required": [ - "$ref" - ], - "additionalProperties": false, - "properties": { - "$ref": { - "type": "string" - } - } - } - } -} \ No newline at end of file diff --git a/vendor/openapi/oas/3.0/schema/2021-09-28 b/vendor/openapi/oas/3.0/schema/2021-09-28 deleted file mode 100644 index 4360553fe..000000000 --- a/vendor/openapi/oas/3.0/schema/2021-09-28 +++ /dev/null @@ -1,1662 +0,0 @@ -{ - "id": "https://spec.openapis.org/oas/3.0/schema/2021-09-28", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "The description of OpenAPI v3.0.x documents, as defined by https://spec.openapis.org/oas/v3.0.3", - "type": "object", - "required": [ - "openapi", - "info", - "paths" - ], - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.0\\.\\d(-.+)?$" - }, - "info": { - "$ref": "#/definitions/Info" - }, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/Server" - } - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/Tag" - }, - "uniqueItems": true - }, - "paths": { - "$ref": "#/definitions/Paths" - }, - "components": { - "$ref": "#/definitions/Components" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "definitions": { - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "patternProperties": { - "^\\$ref$": { - "type": "string", - "format": "uri-reference" - } - } - }, - "Info": { - "type": "object", - "required": [ - "title", - "version" - ], - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri-reference" - }, - "contact": { - "$ref": "#/definitions/Contact" - }, - "license": { - "$ref": "#/definitions/License" - }, - "version": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Contact": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "License": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Server": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ServerVariable" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ServerVariable": { - "type": "object", - "required": [ - "default" - ], - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - } - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Components": { - "type": "object", - "properties": { - "schemas": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "responses": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Response" - } - ] - } - } - }, - "parameters": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Parameter" - } - ] - } - } - }, - "examples": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Example" - } - ] - } - } - }, - "requestBodies": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/RequestBody" - } - ] - } - } - }, - "headers": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Header" - } - ] - } - } - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } - } - }, - "links": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Link" - } - ] - } - } - }, - "callbacks": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Callback" - } - ] - } - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Schema": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "multipleOf": { - "type": "number", - "minimum": 0, - "exclusiveMinimum": true - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { - "type": "integer", - "minimum": 0 - }, - "minLength": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { - "type": "integer", - "minimum": 0 - }, - "minItems": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxProperties": { - "type": "integer", - "minimum": 0 - }, - "minProperties": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "required": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true - }, - "enum": { - "type": "array", - "items": { - }, - "minItems": 1, - "uniqueItems": false - }, - "type": { - "type": "string", - "enum": [ - "array", - "boolean", - "integer", - "number", - "object", - "string" - ] - }, - "not": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "allOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "oneOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "anyOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "properties": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - }, - { - "type": "boolean" - } - ], - "default": true - }, - "description": { - "type": "string" - }, - "format": { - "type": "string" - }, - "default": { - }, - "nullable": { - "type": "boolean", - "default": false - }, - "discriminator": { - "$ref": "#/definitions/Discriminator" - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "example": { - }, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "#/definitions/XML" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "XML": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string", - "format": "uri" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean", - "default": false - }, - "wrapped": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Response": { - "type": "object", - "required": [ - "description" - ], - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Header" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Link" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "MediaType": { - "type": "object", - "properties": { - "schema": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "example": { - }, - "examples": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Example" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Encoding" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/definitions/ExampleXORExamples" - } - ] - }, - "Example": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": { - }, - "externalValue": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Header": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "type": "boolean", - "default": false - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "allowEmptyValue": { - "type": "boolean", - "default": false - }, - "style": { - "type": "string", - "enum": [ - "simple" - ], - "default": "simple" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean", - "default": false - }, - "schema": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "example": { - }, - "examples": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Example" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/definitions/ExampleXORExamples" - }, - { - "$ref": "#/definitions/SchemaXORContent" - } - ] - }, - "Paths": { - "type": "object", - "patternProperties": { - "^\\/": { - "$ref": "#/definitions/PathItem" - }, - "^x-": { - } - }, - "additionalProperties": false - }, - "PathItem": { - "type": "object", - "properties": { - "$ref": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/Server" - } - }, - "parameters": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Parameter" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "uniqueItems": true - } - }, - "patternProperties": { - "^(get|put|post|delete|options|head|patch|trace)$": { - "$ref": "#/definitions/Operation" - }, - "^x-": { - } - }, - "additionalProperties": false - }, - "Operation": { - "type": "object", - "required": [ - "responses" - ], - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Parameter" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "uniqueItems": true - }, - "requestBody": { - "oneOf": [ - { - "$ref": "#/definitions/RequestBody" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "responses": { - "$ref": "#/definitions/Responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Callback" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/Server" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Responses": { - "type": "object", - "properties": { - "default": { - "oneOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "patternProperties": { - "^[1-5](?:\\d{2}|XX)$": { - "oneOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "^x-": { - } - }, - "minProperties": 1, - "additionalProperties": false - }, - "SecurityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Tag": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ExampleXORExamples": { - "description": "Example and examples are mutually exclusive", - "not": { - "required": [ - "example", - "examples" - ] - } - }, - "SchemaXORContent": { - "description": "Schema and content are mutually exclusive, at least one is required", - "not": { - "required": [ - "schema", - "content" - ] - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ], - "description": "Some properties are not allowed if content is present", - "allOf": [ - { - "not": { - "required": [ - "style" - ] - } - }, - { - "not": { - "required": [ - "explode" - ] - } - }, - { - "not": { - "required": [ - "allowReserved" - ] - } - }, - { - "not": { - "required": [ - "example" - ] - } - }, - { - "not": { - "required": [ - "examples" - ] - } - } - ] - } - ] - }, - "Parameter": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean", - "default": false - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "allowEmptyValue": { - "type": "boolean", - "default": false - }, - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean", - "default": false - }, - "schema": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "example": { - }, - "examples": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Example" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "required": [ - "name", - "in" - ], - "allOf": [ - { - "$ref": "#/definitions/ExampleXORExamples" - }, - { - "$ref": "#/definitions/SchemaXORContent" - }, - { - "$ref": "#/definitions/ParameterLocation" - } - ] - }, - "ParameterLocation": { - "description": "Parameter location", - "oneOf": [ - { - "description": "Parameter in path", - "required": [ - "required" - ], - "properties": { - "in": { - "enum": [ - "path" - ] - }, - "style": { - "enum": [ - "matrix", - "label", - "simple" - ], - "default": "simple" - }, - "required": { - "enum": [ - true - ] - } - } - }, - { - "description": "Parameter in query", - "properties": { - "in": { - "enum": [ - "query" - ] - }, - "style": { - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ], - "default": "form" - } - } - }, - { - "description": "Parameter in header", - "properties": { - "in": { - "enum": [ - "header" - ] - }, - "style": { - "enum": [ - "simple" - ], - "default": "simple" - } - } - }, - { - "description": "Parameter in cookie", - "properties": { - "in": { - "enum": [ - "cookie" - ] - }, - "style": { - "enum": [ - "form" - ], - "default": "form" - } - } - } - ] - }, - "RequestBody": { - "type": "object", - "required": [ - "content" - ], - "properties": { - "description": { - "type": "string" - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - } - }, - "required": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "SecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/APIKeySecurityScheme" - }, - { - "$ref": "#/definitions/HTTPSecurityScheme" - }, - { - "$ref": "#/definitions/OAuth2SecurityScheme" - }, - { - "$ref": "#/definitions/OpenIdConnectSecurityScheme" - } - ] - }, - "APIKeySecurityScheme": { - "type": "object", - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "name": { - "type": "string" - }, - "in": { - "type": "string", - "enum": [ - "header", - "query", - "cookie" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "HTTPSecurityScheme": { - "type": "object", - "required": [ - "scheme", - "type" - ], - "properties": { - "scheme": { - "type": "string" - }, - "bearerFormat": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "oneOf": [ - { - "description": "Bearer", - "properties": { - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - } - }, - { - "description": "Non Bearer", - "not": { - "required": [ - "bearerFormat" - ] - }, - "properties": { - "scheme": { - "not": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - } - } - } - ] - }, - "OAuth2SecurityScheme": { - "type": "object", - "required": [ - "type", - "flows" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "flows": { - "$ref": "#/definitions/OAuthFlows" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "OpenIdConnectSecurityScheme": { - "type": "object", - "required": [ - "type", - "openIdConnectUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "openIdConnect" - ] - }, - "openIdConnectUrl": { - "type": "string", - "format": "uri-reference" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "OAuthFlows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/definitions/ImplicitOAuthFlow" - }, - "password": { - "$ref": "#/definitions/PasswordOAuthFlow" - }, - "clientCredentials": { - "$ref": "#/definitions/ClientCredentialsFlow" - }, - "authorizationCode": { - "$ref": "#/definitions/AuthorizationCodeOAuthFlow" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ImplicitOAuthFlow": { - "type": "object", - "required": [ - "authorizationUrl", - "scopes" - ], - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "PasswordOAuthFlow": { - "type": "object", - "required": [ - "tokenUrl", - "scopes" - ], - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "ClientCredentialsFlow": { - "type": "object", - "required": [ - "tokenUrl", - "scopes" - ], - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "AuthorizationCodeOAuthFlow": { - "type": "object", - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false - }, - "Link": { - "type": "object", - "properties": { - "operationId": { - "type": "string" - }, - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "parameters": { - "type": "object", - "additionalProperties": { - } - }, - "requestBody": { - }, - "description": { - "type": "string" - }, - "server": { - "$ref": "#/definitions/Server" - } - }, - "patternProperties": { - "^x-": { - } - }, - "additionalProperties": false, - "not": { - "description": "Operation Id and Operation Ref are mutually exclusive", - "required": [ - "operationId", - "operationRef" - ] - } - }, - "Callback": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/PathItem" - }, - "patternProperties": { - "^x-": { - } - } - }, - "Encoding": { - "type": "object", - "properties": { - "contentType": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Header" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "style": { - "type": "string", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean", - "default": false - } - }, - "additionalProperties": false - } - } -} diff --git a/vendor/openapi/oas/3.0/schema/2024-10-18 b/vendor/openapi/oas/3.0/schema/2024-10-18 deleted file mode 100644 index a9cd94157..000000000 --- a/vendor/openapi/oas/3.0/schema/2024-10-18 +++ /dev/null @@ -1,1651 +0,0 @@ -{ - "id": "https://spec.openapis.org/oas/3.0/schema/2024-10-18", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "The description of OpenAPI v3.0.x Documents", - "type": "object", - "required": [ - "openapi", - "info", - "paths" - ], - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.0\\.\\d(-.+)?$" - }, - "info": { - "$ref": "#/definitions/Info" - }, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/Server" - } - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/definitions/Tag" - }, - "uniqueItems": true - }, - "paths": { - "$ref": "#/definitions/Paths" - }, - "components": { - "$ref": "#/definitions/Components" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false, - "definitions": { - "Reference": { - "type": "object", - "required": [ - "$ref" - ], - "patternProperties": { - "^\\$ref$": { - "type": "string", - "format": "uri-reference" - } - } - }, - "Info": { - "type": "object", - "required": [ - "title", - "version" - ], - "properties": { - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri-reference" - }, - "contact": { - "$ref": "#/definitions/Contact" - }, - "license": { - "$ref": "#/definitions/License" - }, - "version": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Contact": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "License": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Server": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/ServerVariable" - } - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "ServerVariable": { - "type": "object", - "required": [ - "default" - ], - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - } - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Components": { - "type": "object", - "properties": { - "schemas": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "responses": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Response" - } - ] - } - } - }, - "parameters": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Parameter" - } - ] - } - } - }, - "examples": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Example" - } - ] - } - } - }, - "requestBodies": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/RequestBody" - } - ] - } - } - }, - "headers": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Header" - } - ] - } - } - }, - "securitySchemes": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/SecurityScheme" - } - ] - } - } - }, - "links": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Link" - } - ] - } - } - }, - "callbacks": { - "type": "object", - "patternProperties": { - "^[a-zA-Z0-9\\.\\-_]+$": { - "oneOf": [ - { - "$ref": "#/definitions/Reference" - }, - { - "$ref": "#/definitions/Callback" - } - ] - } - } - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Schema": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "multipleOf": { - "type": "number", - "minimum": 0, - "exclusiveMinimum": true - }, - "maximum": { - "type": "number" - }, - "exclusiveMaximum": { - "type": "boolean", - "default": false - }, - "minimum": { - "type": "number" - }, - "exclusiveMinimum": { - "type": "boolean", - "default": false - }, - "maxLength": { - "type": "integer", - "minimum": 0 - }, - "minLength": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "pattern": { - "type": "string", - "format": "regex" - }, - "maxItems": { - "type": "integer", - "minimum": 0 - }, - "minItems": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "uniqueItems": { - "type": "boolean", - "default": false - }, - "maxProperties": { - "type": "integer", - "minimum": 0 - }, - "minProperties": { - "type": "integer", - "minimum": 0, - "default": 0 - }, - "required": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1, - "uniqueItems": true - }, - "enum": { - "type": "array", - "items": {}, - "minItems": 1, - "uniqueItems": false - }, - "type": { - "type": "string", - "enum": [ - "array", - "boolean", - "integer", - "number", - "object", - "string" - ] - }, - "not": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "allOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "oneOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "anyOf": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "properties": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - }, - { - "type": "boolean" - } - ], - "default": true - }, - "description": { - "type": "string" - }, - "format": { - "type": "string" - }, - "default": {}, - "nullable": { - "type": "boolean", - "default": false - }, - "discriminator": { - "$ref": "#/definitions/Discriminator" - }, - "readOnly": { - "type": "boolean", - "default": false - }, - "writeOnly": { - "type": "boolean", - "default": false - }, - "example": {}, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "xml": { - "$ref": "#/definitions/XML" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Discriminator": { - "type": "object", - "required": [ - "propertyName" - ], - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "XML": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string", - "format": "uri" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean", - "default": false - }, - "wrapped": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Response": { - "type": "object", - "required": [ - "description" - ], - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Header" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Link" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "MediaType": { - "type": "object", - "properties": { - "schema": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "example": {}, - "examples": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Example" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Encoding" - } - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/definitions/ExampleXORExamples" - } - ] - }, - "Example": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": {}, - "externalValue": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Header": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "type": "boolean", - "default": false - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "allowEmptyValue": { - "type": "boolean", - "default": false - }, - "style": { - "type": "string", - "enum": [ - "simple" - ], - "default": "simple" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean", - "default": false - }, - "schema": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "example": {}, - "examples": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Example" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false, - "allOf": [ - { - "$ref": "#/definitions/ExampleXORExamples" - }, - { - "$ref": "#/definitions/SchemaXORContent" - } - ] - }, - "Paths": { - "type": "object", - "patternProperties": { - "^\\/": { - "$ref": "#/definitions/PathItem" - }, - "^x-": {} - }, - "additionalProperties": false - }, - "PathItem": { - "type": "object", - "properties": { - "$ref": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "get": { - "$ref": "#/definitions/Operation" - }, - "put": { - "$ref": "#/definitions/Operation" - }, - "post": { - "$ref": "#/definitions/Operation" - }, - "delete": { - "$ref": "#/definitions/Operation" - }, - "options": { - "$ref": "#/definitions/Operation" - }, - "head": { - "$ref": "#/definitions/Operation" - }, - "patch": { - "$ref": "#/definitions/Operation" - }, - "trace": { - "$ref": "#/definitions/Operation" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/Server" - } - }, - "parameters": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Parameter" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "uniqueItems": true - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Operation": { - "type": "object", - "required": [ - "responses" - ], - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "oneOf": [ - { - "$ref": "#/definitions/Parameter" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "uniqueItems": true - }, - "requestBody": { - "oneOf": [ - { - "$ref": "#/definitions/RequestBody" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "responses": { - "$ref": "#/definitions/Responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Callback" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "security": { - "type": "array", - "items": { - "$ref": "#/definitions/SecurityRequirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/Server" - } - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Responses": { - "type": "object", - "properties": { - "default": { - "oneOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "patternProperties": { - "^[1-5](?:\\d{2}|XX)$": { - "oneOf": [ - { - "$ref": "#/definitions/Response" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "^x-": {} - }, - "minProperties": 1, - "additionalProperties": false - }, - "SecurityRequirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "Tag": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/definitions/ExternalDocumentation" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "ExternalDocumentation": { - "type": "object", - "required": [ - "url" - ], - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "ExampleXORExamples": { - "description": "Example and examples are mutually exclusive", - "not": { - "required": [ - "example", - "examples" - ] - } - }, - "SchemaXORContent": { - "description": "Schema and content are mutually exclusive, at least one is required", - "not": { - "required": [ - "schema", - "content" - ] - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ], - "description": "Some properties are not allowed if content is present", - "allOf": [ - { - "not": { - "required": [ - "style" - ] - } - }, - { - "not": { - "required": [ - "explode" - ] - } - }, - { - "not": { - "required": [ - "allowReserved" - ] - } - }, - { - "not": { - "required": [ - "example" - ] - } - }, - { - "not": { - "required": [ - "examples" - ] - } - } - ] - } - ] - }, - "Parameter": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "type": "string" - }, - "description": { - "type": "string" - }, - "required": { - "type": "boolean", - "default": false - }, - "deprecated": { - "type": "boolean", - "default": false - }, - "allowEmptyValue": { - "type": "boolean", - "default": false - }, - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean", - "default": false - }, - "schema": { - "oneOf": [ - { - "$ref": "#/definitions/Schema" - }, - { - "$ref": "#/definitions/Reference" - } - ] - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - }, - "minProperties": 1, - "maxProperties": 1 - }, - "example": {}, - "examples": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Example" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false, - "required": [ - "name", - "in" - ], - "allOf": [ - { - "$ref": "#/definitions/ExampleXORExamples" - }, - { - "$ref": "#/definitions/SchemaXORContent" - } - ], - "oneOf": [ - { - "$ref": "#/definitions/PathParameter" - }, - { - "$ref": "#/definitions/QueryParameter" - }, - { - "$ref": "#/definitions/HeaderParameter" - }, - { - "$ref": "#/definitions/CookieParameter" - } - ] - }, - "PathParameter": { - "description": "Parameter in path", - "required": [ - "required" - ], - "properties": { - "in": { - "enum": [ - "path" - ] - }, - "style": { - "enum": [ - "matrix", - "label", - "simple" - ], - "default": "simple" - }, - "required": { - "enum": [ - true - ] - } - } - }, - "QueryParameter": { - "description": "Parameter in query", - "properties": { - "in": { - "enum": [ - "query" - ] - }, - "style": { - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ], - "default": "form" - } - } - }, - "HeaderParameter": { - "description": "Parameter in header", - "properties": { - "in": { - "enum": [ - "header" - ] - }, - "style": { - "enum": [ - "simple" - ], - "default": "simple" - } - } - }, - "CookieParameter": { - "description": "Parameter in cookie", - "properties": { - "in": { - "enum": [ - "cookie" - ] - }, - "style": { - "enum": [ - "form" - ], - "default": "form" - } - } - }, - "RequestBody": { - "type": "object", - "required": [ - "content" - ], - "properties": { - "description": { - "type": "string" - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/MediaType" - } - }, - "required": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "SecurityScheme": { - "oneOf": [ - { - "$ref": "#/definitions/APIKeySecurityScheme" - }, - { - "$ref": "#/definitions/HTTPSecurityScheme" - }, - { - "$ref": "#/definitions/OAuth2SecurityScheme" - }, - { - "$ref": "#/definitions/OpenIdConnectSecurityScheme" - } - ] - }, - "APIKeySecurityScheme": { - "type": "object", - "required": [ - "type", - "name", - "in" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "apiKey" - ] - }, - "name": { - "type": "string" - }, - "in": { - "type": "string", - "enum": [ - "header", - "query", - "cookie" - ] - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "HTTPSecurityScheme": { - "type": "object", - "required": [ - "scheme", - "type" - ], - "properties": { - "scheme": { - "type": "string" - }, - "bearerFormat": { - "type": "string" - }, - "description": { - "type": "string" - }, - "type": { - "type": "string", - "enum": [ - "http" - ] - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false, - "oneOf": [ - { - "description": "Bearer", - "properties": { - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - } - }, - { - "description": "Non Bearer", - "not": { - "required": [ - "bearerFormat" - ] - }, - "properties": { - "scheme": { - "not": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - } - } - } - ] - }, - "OAuth2SecurityScheme": { - "type": "object", - "required": [ - "type", - "flows" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "oauth2" - ] - }, - "flows": { - "$ref": "#/definitions/OAuthFlows" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "OpenIdConnectSecurityScheme": { - "type": "object", - "required": [ - "type", - "openIdConnectUrl" - ], - "properties": { - "type": { - "type": "string", - "enum": [ - "openIdConnect" - ] - }, - "openIdConnectUrl": { - "type": "string", - "format": "uri-reference" - }, - "description": { - "type": "string" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "OAuthFlows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/definitions/ImplicitOAuthFlow" - }, - "password": { - "$ref": "#/definitions/PasswordOAuthFlow" - }, - "clientCredentials": { - "$ref": "#/definitions/ClientCredentialsFlow" - }, - "authorizationCode": { - "$ref": "#/definitions/AuthorizationCodeOAuthFlow" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "ImplicitOAuthFlow": { - "type": "object", - "required": [ - "authorizationUrl", - "scopes" - ], - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "PasswordOAuthFlow": { - "type": "object", - "required": [ - "tokenUrl", - "scopes" - ], - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "ClientCredentialsFlow": { - "type": "object", - "required": [ - "tokenUrl", - "scopes" - ], - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "AuthorizationCodeOAuthFlow": { - "type": "object", - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - }, - "Link": { - "type": "object", - "properties": { - "operationId": { - "type": "string" - }, - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "parameters": { - "type": "object", - "additionalProperties": {} - }, - "requestBody": {}, - "description": { - "type": "string" - }, - "server": { - "$ref": "#/definitions/Server" - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false, - "not": { - "description": "Operation Id and Operation Ref are mutually exclusive", - "required": [ - "operationId", - "operationRef" - ] - } - }, - "Callback": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/PathItem" - }, - "patternProperties": { - "^x-": {} - } - }, - "Encoding": { - "type": "object", - "properties": { - "contentType": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "oneOf": [ - { - "$ref": "#/definitions/Header" - }, - { - "$ref": "#/definitions/Reference" - } - ] - } - }, - "style": { - "type": "string", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean", - "default": false - } - }, - "patternProperties": { - "^x-": {} - }, - "additionalProperties": false - } - } -} \ No newline at end of file diff --git a/vendor/openapi/oas/3.1/dialect/2024-10-25 b/vendor/openapi/oas/3.1/dialect/2024-10-25 deleted file mode 100644 index 0f43b31f4..000000000 --- a/vendor/openapi/oas/3.1/dialect/2024-10-25 +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/dialect/2024-10-25", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "OpenAPI 3.1 Schema Object Dialect", - "description": "A JSON Schema dialect describing schemas found in OpenAPI v3.1 Descriptions", - "$dynamicAnchor": "meta", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - "allOf": [ - { - "$ref": "https://json-schema.org/draft/2020-12/schema" - }, - { - "$ref": "https://spec.openapis.org/oas/3.1/meta/2024-10-25" - } - ] -} \ No newline at end of file diff --git a/vendor/openapi/oas/3.1/dialect/2024-11-10 b/vendor/openapi/oas/3.1/dialect/2024-11-10 deleted file mode 100644 index bfcab856a..000000000 --- a/vendor/openapi/oas/3.1/dialect/2024-11-10 +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/dialect/2024-11-10", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "OpenAPI 3.1 Schema Object Dialect", - "description": "A JSON Schema dialect describing schemas found in OpenAPI v3.1 Descriptions", - "$dynamicAnchor": "meta", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - "allOf": [ - { - "$ref": "https://json-schema.org/draft/2020-12/schema" - }, - { - "$ref": "https://spec.openapis.org/oas/3.1/meta/2024-11-10" - } - ] -} diff --git a/vendor/openapi/oas/3.1/dialect/base b/vendor/openapi/oas/3.1/dialect/base deleted file mode 100644 index eae8386e8..000000000 --- a/vendor/openapi/oas/3.1/dialect/base +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/dialect/base", - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "title": "OpenAPI 3.1 Schema Object Dialect", - "description": "A JSON Schema dialect describing schemas found in OpenAPI documents", - - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://spec.openapis.org/oas/3.1/vocab/base": false - }, - - "$dynamicAnchor": "meta", - - "allOf": [ - { "$ref": "https://json-schema.org/draft/2020-12/schema" }, - { "$ref": "https://spec.openapis.org/oas/3.1/meta/base" } - ] -} diff --git a/vendor/openapi/oas/3.1/meta/2024-10-25 b/vendor/openapi/oas/3.1/meta/2024-10-25 deleted file mode 100644 index 54dcac0d0..000000000 --- a/vendor/openapi/oas/3.1/meta/2024-10-25 +++ /dev/null @@ -1,92 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/meta/2024-10-25", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "OAS Base Vocabulary", - "description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect", - "$dynamicAnchor": "meta", - "$vocabulary": { - "https://spec.openapis.org/oas/3.1/vocab/base": true - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "discriminator": { - "$ref": "#/$defs/discriminator" - }, - "example": true, - "externalDocs": { - "$ref": "#/$defs/external-docs" - }, - "xml": { - "$ref": "#/$defs/xml" - } - }, - "$defs": { - "discriminator": { - "$ref": "#/$defs/extensible", - "properties": { - "mapping": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "propertyName": { - "type": "string" - } - }, - "required": [ - "propertyName" - ], - "type": "object", - "unevaluatedProperties": false - }, - "extensible": { - "patternProperties": { - "^x-": true - } - }, - "external-docs": { - "$ref": "#/$defs/extensible", - "properties": { - "description": { - "type": "string" - }, - "url": { - "format": "uri-reference", - "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object", - "unevaluatedProperties": false - }, - "xml": { - "$ref": "#/$defs/extensible", - "properties": { - "attribute": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "namespace": { - "format": "uri", - "type": "string" - }, - "prefix": { - "type": "string" - }, - "wrapped": { - "type": "boolean" - } - }, - "type": "object", - "unevaluatedProperties": false - } - } -} \ No newline at end of file diff --git a/vendor/openapi/oas/3.1/meta/2024-11-10 b/vendor/openapi/oas/3.1/meta/2024-11-10 deleted file mode 100644 index 9e3ca41b0..000000000 --- a/vendor/openapi/oas/3.1/meta/2024-11-10 +++ /dev/null @@ -1,92 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/meta/2024-11-10", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "OAS Base Vocabulary", - "description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect", - "$dynamicAnchor": "meta", - "$vocabulary": { - "https://spec.openapis.org/oas/3.1/vocab/base": true - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "discriminator": { - "$ref": "#/$defs/discriminator" - }, - "example": true, - "externalDocs": { - "$ref": "#/$defs/external-docs" - }, - "xml": { - "$ref": "#/$defs/xml" - } - }, - "$defs": { - "discriminator": { - "$ref": "#/$defs/extensible", - "properties": { - "mapping": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "propertyName": { - "type": "string" - } - }, - "required": [ - "propertyName" - ], - "type": "object", - "unevaluatedProperties": false - }, - "extensible": { - "patternProperties": { - "^x-": true - } - }, - "external-docs": { - "$ref": "#/$defs/extensible", - "properties": { - "description": { - "type": "string" - }, - "url": { - "format": "uri-reference", - "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object", - "unevaluatedProperties": false - }, - "xml": { - "$ref": "#/$defs/extensible", - "properties": { - "attribute": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "namespace": { - "format": "uri", - "type": "string" - }, - "prefix": { - "type": "string" - }, - "wrapped": { - "type": "boolean" - } - }, - "type": "object", - "unevaluatedProperties": false - } - } -} diff --git a/vendor/openapi/oas/3.1/meta/base b/vendor/openapi/oas/3.1/meta/base deleted file mode 100644 index a7a59f1c7..000000000 --- a/vendor/openapi/oas/3.1/meta/base +++ /dev/null @@ -1,87 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/meta/base", - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "title": "OAS Base vocabulary", - "description": "A JSON Schema Vocabulary used in the OpenAPI Schema Dialect", - - "$vocabulary": { - "https://spec.openapis.org/oas/3.1/vocab/base": true - }, - - "$dynamicAnchor": "meta", - - "type": ["object", "boolean"], - "properties": { - "example": true, - "discriminator": { "$ref": "#/$defs/discriminator" }, - "externalDocs": { "$ref": "#/$defs/external-docs" }, - "xml": { "$ref": "#/$defs/xml" } - }, - - "$defs": { - "extensible": { - "patternProperties": { - "^x-": true - } - }, - - "discriminator": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "propertyName": { - "type": "string" - }, - "mapping": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - }, - "required": ["propertyName"], - "unevaluatedProperties": false - }, - - "external-docs": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri-reference" - }, - "description": { - "type": "string" - } - }, - "required": ["url"], - "unevaluatedProperties": false - }, - - "xml": { - "$ref": "#/$defs/extensible", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "namespace": { - "type": "string", - "format": "uri" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean" - }, - "wrapped": { - "type": "boolean" - } - }, - "unevaluatedProperties": false - } - } -} diff --git a/vendor/openapi/oas/3.1/schema-base/2021-03-02 b/vendor/openapi/oas/3.1/schema-base/2021-03-02 deleted file mode 100644 index 03a580818..000000000 --- a/vendor/openapi/oas/3.1/schema-base/2021-03-02 +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-03-02", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://spec.openapis.org/oas/3.1/schema/2021-03-02", - "properties": { - "jsonSchemaDialect": { - "$ref": "#/$defs/dialect" - } - }, - "$defs": { - "dialect": { - "const": "https://spec.openapis.org/oas/3.1/dialect/base" - }, - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { - "$ref": "#/$defs/dialect" - } - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema-base/2021-04-15 b/vendor/openapi/oas/3.1/schema-base/2021-04-15 deleted file mode 100644 index cb973912a..000000000 --- a/vendor/openapi/oas/3.1/schema-base/2021-04-15 +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-04-15", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://spec.openapis.org/oas/3.1/schema/2021-04-15", - "properties": { - "jsonSchemaDialect": { - "$ref": "#/$defs/dialect" - } - }, - "$defs": { - "dialect": { - "const": "https://spec.openapis.org/oas/3.1/dialect/base" - }, - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { - "$ref": "#/$defs/dialect" - } - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema-base/2021-05-20 b/vendor/openapi/oas/3.1/schema-base/2021-05-20 deleted file mode 100644 index 9796fa385..000000000 --- a/vendor/openapi/oas/3.1/schema-base/2021-05-20 +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-05-20", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://spec.openapis.org/oas/3.1/schema/2021-05-20", - "properties": { - "jsonSchemaDialect": { - "$ref": "#/$defs/dialect" - } - }, - "$defs": { - "dialect": { - "const": "https://spec.openapis.org/oas/3.1/dialect/base" - }, - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { - "$ref": "#/$defs/dialect" - } - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema-base/2021-09-28 b/vendor/openapi/oas/3.1/schema-base/2021-09-28 deleted file mode 100644 index f75bf16c5..000000000 --- a/vendor/openapi/oas/3.1/schema-base/2021-09-28 +++ /dev/null @@ -1,24 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2021-09-28", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$ref": "https://spec.openapis.org/oas/3.1/schema/2021-09-28", - "properties": { - "jsonSchemaDialect": { - "$ref": "#/$defs/dialect" - } - }, - "$defs": { - "dialect": { - "const": "https://spec.openapis.org/oas/3.1/dialect/base" - }, - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { - "$ref": "#/$defs/dialect" - } - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema-base/2022-02-27 b/vendor/openapi/oas/3.1/schema-base/2022-02-27 deleted file mode 100644 index 04c9f6020..000000000 --- a/vendor/openapi/oas/3.1/schema-base/2022-02-27 +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2022-02-27", - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "description": "The description of OpenAPI v3.1.x documents using the OpenAPI JSON Schema dialect, as defined by https://spec.openapis.org/oas/v3.1.0", - - "$ref": "https://spec.openapis.org/oas/3.1/schema/2022-02-27", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://spec.openapis.org/oas/3.1/dialect/base" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema-base/2022-10-07 b/vendor/openapi/oas/3.1/schema-base/2022-10-07 deleted file mode 100644 index 752e98be4..000000000 --- a/vendor/openapi/oas/3.1/schema-base/2022-10-07 +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2022-10-07", - "$schema": "https://json-schema.org/draft/2020-12/schema", - - "description": "The description of OpenAPI v3.1.x documents using the OpenAPI JSON Schema dialect, as defined by https://spec.openapis.org/oas/v3.1.0", - - "$ref": "https://spec.openapis.org/oas/3.1/schema/2022-10-07", - "properties": { - "jsonSchemaDialect": { "$ref": "#/$defs/dialect" } - }, - - "$defs": { - "dialect": { "const": "https://spec.openapis.org/oas/3.1/dialect/base" }, - - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/base", - "properties": { - "$schema": { "$ref": "#/$defs/dialect" } - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema-base/2024-11-14 b/vendor/openapi/oas/3.1/schema-base/2024-11-14 deleted file mode 100644 index 5a885899a..000000000 --- a/vendor/openapi/oas/3.1/schema-base/2024-11-14 +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2024-11-14", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.1.x Documents using the OpenAPI JSON Schema dialect", - "$ref": "https://spec.openapis.org/oas/3.1/schema/2024-11-14", - "properties": { - "jsonSchemaDialect": { - "$ref": "#/$defs/dialect" - } - }, - "$defs": { - "dialect": { - "const": "https://spec.openapis.org/oas/3.1/dialect/2024-10-25" - }, - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/2024-10-25", - "properties": { - "$schema": { - "$ref": "#/$defs/dialect" - } - } - } - } -} \ No newline at end of file diff --git a/vendor/openapi/oas/3.1/schema-base/2025-02-13 b/vendor/openapi/oas/3.1/schema-base/2025-02-13 deleted file mode 100644 index 38cf6510b..000000000 --- a/vendor/openapi/oas/3.1/schema-base/2025-02-13 +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2025-02-13", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.1.x Documents using the OpenAPI JSON Schema dialect", - "$ref": "https://spec.openapis.org/oas/3.1/schema/2025-02-13", - "properties": { - "jsonSchemaDialect": { - "$ref": "#/$defs/dialect" - } - }, - "$defs": { - "dialect": { - "const": "https://spec.openapis.org/oas/3.1/dialect/2024-11-10" - }, - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/2024-11-10", - "properties": { - "$schema": { - "$ref": "#/$defs/dialect" - } - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema-base/2025-08-31 b/vendor/openapi/oas/3.1/schema-base/2025-08-31 deleted file mode 100644 index 6e3eab1eb..000000000 --- a/vendor/openapi/oas/3.1/schema-base/2025-08-31 +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2025-08-31", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.1.x Documents using the OpenAPI JSON Schema dialect", - "$ref": "https://spec.openapis.org/oas/3.1/schema/2025-08-31", - "properties": { - "jsonSchemaDialect": { - "$ref": "#/$defs/dialect" - } - }, - "$defs": { - "dialect": { - "const": "https://spec.openapis.org/oas/3.1/dialect/2024-11-10" - }, - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/2024-11-10", - "properties": { - "$schema": { - "$ref": "#/$defs/dialect" - } - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema-base/2025-09-15 b/vendor/openapi/oas/3.1/schema-base/2025-09-15 deleted file mode 100644 index 901f8c355..000000000 --- a/vendor/openapi/oas/3.1/schema-base/2025-09-15 +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema-base/2025-09-15", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.1.x Documents using the OpenAPI JSON Schema dialect", - "$ref": "https://spec.openapis.org/oas/3.1/schema/2025-09-15", - "properties": { - "jsonSchemaDialect": { - "$ref": "#/$defs/dialect" - } - }, - "$defs": { - "dialect": { - "const": "https://spec.openapis.org/oas/3.1/dialect/2024-11-10" - }, - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.1/dialect/2024-11-10", - "properties": { - "$schema": { - "$ref": "#/$defs/dialect" - } - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema/2021-03-02 b/vendor/openapi/oas/3.1/schema/2021-03-02 deleted file mode 100644 index fa987c12d..000000000 --- a/vendor/openapi/oas/3.1/schema/2021-03-02 +++ /dev/null @@ -1,1340 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema/2021-03-02", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.1\\.\\d+(-.+)?$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "$ref": "#/$defs/uri", - "default": "https://spec.openapis.org/oas/3.1/dialect/base" - }, - "servers": { - "$ref": "#/$defs/server" - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "$ref": "#/$defs/uri" - } - }, - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "identifier" - ] - }, - { - "required": [ - "url" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "type": "object", - "properties": { - "url": { - "$ref": "#/$defs/uri" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "descriptions": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - } - }, - "patternProperties": { - "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - } - }, - "patternProperties": { - "^(get|post|delete|options|head|patch|trace)$": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/path-item" - } - }, - "operation": { - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "$ref": "#/$defs/uri" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "allowEmptyValue": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content" - } - }, - "required": [ - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "simple" - ] - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form" - ] - } - } - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "type": "object", - "properties": { - "schema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/examples" - } - ], - "unevaluatedProperties": false - }, - "encoding": { - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/encoding/$defs/explode-default" - } - ], - "unevaluatedProperties": false, - "$defs": { - "explode-default": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } - }, - "responses": { - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5][0-9X]{2}$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "required": [ - "description" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - }, - "callbacks-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": true, - "externalValue": { - "$ref": "#/$defs/uri" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "type": "object", - "properties": { - "operationRef": { - "$ref": "#/$defs/uri" - }, - "operationId": true, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "body": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - }, - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "simple" - ] - }, - "explode": { - "default": false, - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - } - }, - "$ref": "#/$defs/examples" - }, - "content": { - "properties": { - "content": { - "$ref": "#/$defs/content" - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "type": "object", - "properties": { - "$ref": { - "$ref": "#/$defs/uri" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "unevaluatedProperties": false - }, - "schema": { - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "const": "bearer" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "openIdConnectUrl": { - "$ref": "#/$defs/uri" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string" - }, - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - } - }, - "uri": { - "type": "string", - "format": "uri" - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema/2021-04-15 b/vendor/openapi/oas/3.1/schema/2021-04-15 deleted file mode 100644 index a79883424..000000000 --- a/vendor/openapi/oas/3.1/schema/2021-04-15 +++ /dev/null @@ -1,1343 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema/2021-04-15", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.1\\.\\d+(-.+)?$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "$ref": "#/$defs/uri", - "default": "https://spec.openapis.org/oas/3.1/dialect/base" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "$ref": "#/$defs/uri" - } - }, - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "identifier" - ] - }, - { - "required": [ - "url" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "type": "object", - "properties": { - "url": { - "$ref": "#/$defs/uri" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "descriptions": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - } - }, - "patternProperties": { - "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - } - }, - "patternProperties": { - "^(get|put|post|delete|options|head|patch|trace)$": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/path-item" - } - }, - "operation": { - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "$ref": "#/$defs/uri" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "allowEmptyValue": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content" - } - }, - "required": [ - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "simple" - ] - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form" - ] - } - } - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "type": "object", - "properties": { - "schema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/examples" - } - ], - "unevaluatedProperties": false - }, - "encoding": { - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/encoding/$defs/explode-default" - } - ], - "unevaluatedProperties": false, - "$defs": { - "explode-default": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } - }, - "responses": { - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5][0-9X]{2}$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "required": [ - "description" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - }, - "callbacks-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": true, - "externalValue": { - "$ref": "#/$defs/uri" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "type": "object", - "properties": { - "operationRef": { - "$ref": "#/$defs/uri" - }, - "operationId": true, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "body": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - }, - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "simple" - ] - }, - "explode": { - "default": false, - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - } - }, - "$ref": "#/$defs/examples" - }, - "content": { - "properties": { - "content": { - "$ref": "#/$defs/content" - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "type": "object", - "properties": { - "$ref": { - "$ref": "#/$defs/uri" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "unevaluatedProperties": false - }, - "schema": { - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "const": "bearer" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "openIdConnectUrl": { - "$ref": "#/$defs/uri" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string" - }, - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - } - }, - "uri": { - "type": "string", - "format": "uri" - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema/2021-05-20 b/vendor/openapi/oas/3.1/schema/2021-05-20 deleted file mode 100644 index 44fdbb92b..000000000 --- a/vendor/openapi/oas/3.1/schema/2021-05-20 +++ /dev/null @@ -1,1347 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema/2021-05-20", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.1\\.\\d+(-.+)?$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "type": "string", - "format": "uri", - "default": "https://spec.openapis.org/oas/3.1/dialect/base" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "identifier" - ] - }, - { - "required": [ - "url" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri-reference" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "descriptions": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - } - }, - "patternProperties": { - "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - } - }, - "patternProperties": { - "^(get|put|post|delete|options|head|patch|trace)$": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/path-item" - } - }, - "operation": { - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "allowEmptyValue": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content" - } - }, - "required": [ - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "simple" - ] - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form" - ] - } - } - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "type": "object", - "properties": { - "schema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/examples" - } - ], - "unevaluatedProperties": false - }, - "encoding": { - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/encoding/$defs/explode-default" - } - ], - "unevaluatedProperties": false, - "$defs": { - "explode-default": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } - }, - "responses": { - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5][0-9X]{2}$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "required": [ - "description" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - }, - "callbacks-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": true, - "externalValue": { - "type": "string", - "format": "uri" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "type": "object", - "properties": { - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "operationId": true, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "body": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - }, - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "simple" - ] - }, - "explode": { - "default": false, - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - } - }, - "$ref": "#/$defs/examples" - }, - "content": { - "properties": { - "content": { - "$ref": "#/$defs/content" - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "unevaluatedProperties": false - }, - "schema": { - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "const": "bearer" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "openIdConnectUrl": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string" - }, - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - } - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema/2021-09-28 b/vendor/openapi/oas/3.1/schema/2021-09-28 deleted file mode 100644 index 4ea4da67b..000000000 --- a/vendor/openapi/oas/3.1/schema/2021-09-28 +++ /dev/null @@ -1,1351 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema/2021-09-28", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.1\\.\\d+(-.+)?$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "type": "string", - "format": "uri", - "default": "https://spec.openapis.org/oas/3.1/dialect/base" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "email": { - "type": "string" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "identifier" - ] - }, - { - "required": [ - "url" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri-reference" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "descriptions": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - } - }, - "patternProperties": { - "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - } - }, - "patternProperties": { - "^(get|put|post|delete|options|head|patch|trace)$": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/path-item" - } - }, - "operation": { - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "allowEmptyValue": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content" - } - }, - "required": [ - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "name": { - "pattern": "[^/#?]+$" - }, - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "const": "form" - } - } - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "type": "object", - "properties": { - "schema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/examples" - } - ], - "unevaluatedProperties": false - }, - "encoding": { - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/encoding/$defs/explode-default" - } - ], - "unevaluatedProperties": false, - "$defs": { - "explode-default": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } - }, - "responses": { - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "required": [ - "description" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - }, - "callbacks-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": true, - "externalValue": { - "type": "string", - "format": "uri" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "type": "object", - "properties": { - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "operationId": true, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "body": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content" - } - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - }, - "explode": { - "default": false, - "type": "boolean" - } - }, - "$ref": "#/$defs/examples" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "unevaluatedProperties": false - }, - "schema": { - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - } - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "openIdConnectUrl": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string" - }, - "tokenUrl": { - "type": "string" - }, - "refreshUrl": { - "type": "string" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - } - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema/2022-02-27 b/vendor/openapi/oas/3.1/schema/2022-02-27 deleted file mode 100644 index ed0fd49a6..000000000 --- a/vendor/openapi/oas/3.1/schema/2022-02-27 +++ /dev/null @@ -1,1420 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema/2022-02-27", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.1\\.\\d+(-.+)?$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "type": "string", - "format": "uri", - "default": "https://spec.openapis.org/oas/3.1/dialect/base" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - }, - "default": [ - { "url": "/" } - ] - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#info-object", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#contact-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#license-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "name" - ], - "oneOf": [ - { - "required": [ - "identifier" - ] - }, - { - "required": [ - "url" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#server-object", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri-reference" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#server-variable-object", - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#components-object", - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - } - }, - "patternProperties": { - "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#paths-object", - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#path-item-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - } - }, - "patternProperties": { - "^(get|put|post|delete|options|head|patch|trace)$": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/path-item" - } - }, - "operation": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#operation-object", - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#external-documentation-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#parameter-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "required": [ - "name", - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - } - }, - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "name": { - "pattern": "[^/#?]+$" - }, - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "const": "form" - } - } - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#request-body-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#fixed-fields-10", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#media-type-object", - "type": "object", - "properties": { - "schema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/examples" - } - ], - "unevaluatedProperties": false - }, - "encoding": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#encoding-object", - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/encoding/$defs/explode-default" - } - ], - "unevaluatedProperties": false, - "$defs": { - "explode-default": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } - }, - "responses": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#responses-object", - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "minProperties": 1, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#response-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "required": [ - "description" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#callback-object", - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - }, - "callbacks-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#example-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": true, - "externalValue": { - "type": "string", - "format": "uri" - } - }, - "not": { - "required": [ - "value", - "externalValue" - ] - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#link-object", - "type": "object", - "properties": { - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "operationId": true, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "body": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#header-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - }, - "explode": { - "default": false, - "type": "boolean" - } - }, - "$ref": "#/$defs/examples" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#tag-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#reference-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "unevaluatedProperties": false - }, - "schema": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#schema-object", - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#security-scheme-object", - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - } - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "openIdConnectUrl": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#security-requirement-object", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#specification-extensions", - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - } - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema/2022-10-07 b/vendor/openapi/oas/3.1/schema/2022-10-07 deleted file mode 100644 index 468bc7e5f..000000000 --- a/vendor/openapi/oas/3.1/schema/2022-10-07 +++ /dev/null @@ -1,1440 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema/2022-10-07", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.1.x documents without schema validation, as defined by https://spec.openapis.org/oas/v3.1.0", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.1\\.\\d+(-.+)?$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "type": "string", - "format": "uri", - "default": "https://spec.openapis.org/oas/3.1/dialect/base" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - }, - "default": [ - { - "url": "/" - } - ] - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#info-object", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#contact-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#license-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "name" - ], - "dependentSchemas": { - "identifier": { - "not": { - "required": [ - "url" - ] - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#server-object", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri-reference" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#server-variable-object", - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#components-object", - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - } - }, - "patternProperties": { - "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#paths-object", - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#path-item-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "get": { - "$ref": "#/$defs/operation" - }, - "put": { - "$ref": "#/$defs/operation" - }, - "post": { - "$ref": "#/$defs/operation" - }, - "delete": { - "$ref": "#/$defs/operation" - }, - "options": { - "$ref": "#/$defs/operation" - }, - "head": { - "$ref": "#/$defs/operation" - }, - "patch": { - "$ref": "#/$defs/operation" - }, - "trace": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/path-item" - } - }, - "operation": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#operation-object", - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#external-documentation-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#parameter-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "required": [ - "name", - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - } - }, - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "name": { - "pattern": "[^/#?]+$" - }, - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "const": "form" - } - } - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#request-body-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#fixed-fields-10", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#media-type-object", - "type": "object", - "properties": { - "schema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/examples" - } - ], - "unevaluatedProperties": false - }, - "encoding": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#encoding-object", - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/encoding/$defs/explode-default" - } - ], - "unevaluatedProperties": false, - "$defs": { - "explode-default": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } - }, - "responses": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#responses-object", - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "minProperties": 1, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#response-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "required": [ - "description" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#callback-object", - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item-or-reference" - } - }, - "callbacks-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#example-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": true, - "externalValue": { - "type": "string", - "format": "uri" - } - }, - "not": { - "required": [ - "value", - "externalValue" - ] - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#link-object", - "type": "object", - "properties": { - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "body": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#header-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - }, - "explode": { - "default": false, - "type": "boolean" - } - }, - "$ref": "#/$defs/examples" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#tag-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#reference-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "unevaluatedProperties": false - }, - "schema": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#schema-object", - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#security-scheme-object", - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - } - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "openIdConnectUrl": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#security-requirement-object", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "$comment": "https://spec.openapis.org/oas/v3.1.0#specification-extensions", - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - } - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema/2024-11-14 b/vendor/openapi/oas/3.1/schema/2024-11-14 deleted file mode 100644 index 0b2efe18b..000000000 --- a/vendor/openapi/oas/3.1/schema/2024-11-14 +++ /dev/null @@ -1,1408 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema/2024-11-14", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.1.x Documents without Schema Object validation", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.1\\.\\d+(-.+)?$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "type": "string", - "format": "uri", - "default": "https://spec.openapis.org/oas/3.1/dialect/2024-10-25" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - }, - "default": [ - { - "url": "/" - } - ] - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "$comment": "https://spec.openapis.org/oas/v3.1#info-object", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "$comment": "https://spec.openapis.org/oas/v3.1#contact-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "$comment": "https://spec.openapis.org/oas/v3.1#license-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "name" - ], - "dependentSchemas": { - "identifier": { - "not": { - "required": [ - "url" - ] - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "$comment": "https://spec.openapis.org/oas/v3.1#server-object", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "$comment": "https://spec.openapis.org/oas/v3.1#server-variable-object", - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "$comment": "https://spec.openapis.org/oas/v3.1#components-object", - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - } - }, - "patternProperties": { - "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "$comment": "https://spec.openapis.org/oas/v3.1#paths-object", - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "$comment": "https://spec.openapis.org/oas/v3.1#path-item-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "get": { - "$ref": "#/$defs/operation" - }, - "put": { - "$ref": "#/$defs/operation" - }, - "post": { - "$ref": "#/$defs/operation" - }, - "delete": { - "$ref": "#/$defs/operation" - }, - "options": { - "$ref": "#/$defs/operation" - }, - "head": { - "$ref": "#/$defs/operation" - }, - "patch": { - "$ref": "#/$defs/operation" - }, - "trace": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "operation": { - "$comment": "https://spec.openapis.org/oas/v3.1#operation-object", - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "$comment": "https://spec.openapis.org/oas/v3.1#external-documentation-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter": { - "$comment": "https://spec.openapis.org/oas/v3.1#parameter-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "required": [ - "name", - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - } - }, - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "const": "form" - } - } - } - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "$comment": "https://spec.openapis.org/oas/v3.1#request-body-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "$comment": "https://spec.openapis.org/oas/v3.1#fixed-fields-10", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "$comment": "https://spec.openapis.org/oas/v3.1#media-type-object", - "type": "object", - "properties": { - "schema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/examples" - } - ], - "unevaluatedProperties": false - }, - "encoding": { - "$comment": "https://spec.openapis.org/oas/v3.1#encoding-object", - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "unevaluatedProperties": false - }, - "responses": { - "$comment": "https://spec.openapis.org/oas/v3.1#responses-object", - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "minProperties": 1, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "if": { - "$comment": "either default, or at least one response code property must exist", - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": false - } - }, - "then": { - "required": [ - "default" - ] - } - }, - "response": { - "$comment": "https://spec.openapis.org/oas/v3.1#response-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "required": [ - "description" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "$comment": "https://spec.openapis.org/oas/v3.1#callback-object", - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "callbacks-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "$comment": "https://spec.openapis.org/oas/v3.1#example-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": true, - "externalValue": { - "type": "string", - "format": "uri" - } - }, - "not": { - "required": [ - "value", - "externalValue" - ] - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "$comment": "https://spec.openapis.org/oas/v3.1#link-object", - "type": "object", - "properties": { - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "body": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "$comment": "https://spec.openapis.org/oas/v3.1#header-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - }, - "explode": { - "default": false, - "type": "boolean" - } - }, - "$ref": "#/$defs/examples" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "$comment": "https://spec.openapis.org/oas/v3.1#tag-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "$comment": "https://spec.openapis.org/oas/v3.1#reference-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "schema": { - "$comment": "https://spec.openapis.org/oas/v3.1#schema-object", - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "$comment": "https://spec.openapis.org/oas/v3.1#security-scheme-object", - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - } - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "openIdConnectUrl": { - "type": "string", - "format": "uri" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri" - }, - "tokenUrl": { - "type": "string", - "format": "uri" - }, - "refreshUrl": { - "type": "string", - "format": "uri" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "$comment": "https://spec.openapis.org/oas/v3.1#security-requirement-object", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "$comment": "https://spec.openapis.org/oas/v3.1#specification-extensions", - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - } - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } -} \ No newline at end of file diff --git a/vendor/openapi/oas/3.1/schema/2025-02-13 b/vendor/openapi/oas/3.1/schema/2025-02-13 deleted file mode 100644 index acaedecbc..000000000 --- a/vendor/openapi/oas/3.1/schema/2025-02-13 +++ /dev/null @@ -1,1408 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema/2025-02-13", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.1.x Documents without Schema Object validation", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.1\\.\\d+(-.+)?$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "type": "string", - "format": "uri-reference", - "default": "https://spec.openapis.org/oas/3.1/dialect/2024-11-10" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - }, - "default": [ - { - "url": "/" - } - ] - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "$comment": "https://spec.openapis.org/oas/v3.1#info-object", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri-reference" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "$comment": "https://spec.openapis.org/oas/v3.1#contact-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "$comment": "https://spec.openapis.org/oas/v3.1#license-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "name" - ], - "dependentSchemas": { - "identifier": { - "not": { - "required": [ - "url" - ] - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "$comment": "https://spec.openapis.org/oas/v3.1#server-object", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "$comment": "https://spec.openapis.org/oas/v3.1#server-variable-object", - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "$comment": "https://spec.openapis.org/oas/v3.1#components-object", - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - } - }, - "patternProperties": { - "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "$comment": "https://spec.openapis.org/oas/v3.1#paths-object", - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "$comment": "https://spec.openapis.org/oas/v3.1#path-item-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "get": { - "$ref": "#/$defs/operation" - }, - "put": { - "$ref": "#/$defs/operation" - }, - "post": { - "$ref": "#/$defs/operation" - }, - "delete": { - "$ref": "#/$defs/operation" - }, - "options": { - "$ref": "#/$defs/operation" - }, - "head": { - "$ref": "#/$defs/operation" - }, - "patch": { - "$ref": "#/$defs/operation" - }, - "trace": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "operation": { - "$comment": "https://spec.openapis.org/oas/v3.1#operation-object", - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "$comment": "https://spec.openapis.org/oas/v3.1#external-documentation-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter": { - "$comment": "https://spec.openapis.org/oas/v3.1#parameter-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "required": [ - "name", - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - } - }, - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "const": "form" - } - } - } - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "$comment": "https://spec.openapis.org/oas/v3.1#request-body-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "$comment": "https://spec.openapis.org/oas/v3.1#fixed-fields-10", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "$comment": "https://spec.openapis.org/oas/v3.1#media-type-object", - "type": "object", - "properties": { - "schema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/examples" - } - ], - "unevaluatedProperties": false - }, - "encoding": { - "$comment": "https://spec.openapis.org/oas/v3.1#encoding-object", - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "unevaluatedProperties": false - }, - "responses": { - "$comment": "https://spec.openapis.org/oas/v3.1#responses-object", - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "minProperties": 1, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "if": { - "$comment": "either default, or at least one response code property must exist", - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": false - } - }, - "then": { - "required": [ - "default" - ] - } - }, - "response": { - "$comment": "https://spec.openapis.org/oas/v3.1#response-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "required": [ - "description" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "$comment": "https://spec.openapis.org/oas/v3.1#callback-object", - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "callbacks-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "$comment": "https://spec.openapis.org/oas/v3.1#example-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": true, - "externalValue": { - "type": "string", - "format": "uri-reference" - } - }, - "not": { - "required": [ - "value", - "externalValue" - ] - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "$comment": "https://spec.openapis.org/oas/v3.1#link-object", - "type": "object", - "properties": { - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "body": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "$comment": "https://spec.openapis.org/oas/v3.1#header-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - }, - "explode": { - "default": false, - "type": "boolean" - } - }, - "$ref": "#/$defs/examples" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "$comment": "https://spec.openapis.org/oas/v3.1#tag-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "$comment": "https://spec.openapis.org/oas/v3.1#reference-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "schema": { - "$comment": "https://spec.openapis.org/oas/v3.1#schema-object", - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "$comment": "https://spec.openapis.org/oas/v3.1#security-scheme-object", - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - } - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "openIdConnectUrl": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "$comment": "https://spec.openapis.org/oas/v3.1#security-requirement-object", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "$comment": "https://spec.openapis.org/oas/v3.1#specification-extensions", - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - } - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema/2025-08-31 b/vendor/openapi/oas/3.1/schema/2025-08-31 deleted file mode 100644 index 58f6a33c1..000000000 --- a/vendor/openapi/oas/3.1/schema/2025-08-31 +++ /dev/null @@ -1,1414 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema/2025-08-31", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.1.x Documents without Schema Object validation", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.1\\.\\d+(-.+)?$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "type": "string", - "format": "uri-reference", - "default": "https://spec.openapis.org/oas/3.1/dialect/2024-11-10" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - }, - "default": [ - { - "url": "/" - } - ] - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "$comment": "https://spec.openapis.org/oas/v3.1#info-object", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri-reference" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "$comment": "https://spec.openapis.org/oas/v3.1#contact-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "$comment": "https://spec.openapis.org/oas/v3.1#license-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "name" - ], - "dependentSchemas": { - "identifier": { - "not": { - "required": [ - "url" - ] - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "$comment": "https://spec.openapis.org/oas/v3.1#server-object", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "$comment": "https://spec.openapis.org/oas/v3.1#server-variable-object", - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "$comment": "https://spec.openapis.org/oas/v3.1#components-object", - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - } - }, - "patternProperties": { - "^(schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "$comment": "https://spec.openapis.org/oas/v3.1#paths-object", - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "$comment": "https://spec.openapis.org/oas/v3.1#path-item-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "get": { - "$ref": "#/$defs/operation" - }, - "put": { - "$ref": "#/$defs/operation" - }, - "post": { - "$ref": "#/$defs/operation" - }, - "delete": { - "$ref": "#/$defs/operation" - }, - "options": { - "$ref": "#/$defs/operation" - }, - "head": { - "$ref": "#/$defs/operation" - }, - "patch": { - "$ref": "#/$defs/operation" - }, - "trace": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "operation": { - "$comment": "https://spec.openapis.org/oas/v3.1#operation-object", - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "$comment": "https://spec.openapis.org/oas/v3.1#external-documentation-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter": { - "$comment": "https://spec.openapis.org/oas/v3.1#parameter-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "required": [ - "name", - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - } - }, - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - }, - "required": [ - "in" - ] - }, - "then": { - "properties": { - "style": { - "default": "form", - "const": "form" - } - } - } - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "$comment": "https://spec.openapis.org/oas/v3.1#request-body-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "$comment": "https://spec.openapis.org/oas/v3.1#fixed-fields-10", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "$comment": "https://spec.openapis.org/oas/v3.1#media-type-object", - "type": "object", - "properties": { - "schema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/examples" - } - ], - "unevaluatedProperties": false - }, - "encoding": { - "$comment": "https://spec.openapis.org/oas/v3.1#encoding-object", - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "unevaluatedProperties": false - }, - "responses": { - "$comment": "https://spec.openapis.org/oas/v3.1#responses-object", - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "minProperties": 1, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "if": { - "$comment": "either default, or at least one response code property must exist", - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": false - } - }, - "then": { - "required": [ - "default" - ] - } - }, - "response": { - "$comment": "https://spec.openapis.org/oas/v3.1#response-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "required": [ - "description" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "$comment": "https://spec.openapis.org/oas/v3.1#callback-object", - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "callbacks-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "$comment": "https://spec.openapis.org/oas/v3.1#example-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": true, - "externalValue": { - "type": "string", - "format": "uri-reference" - } - }, - "not": { - "required": [ - "value", - "externalValue" - ] - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "$comment": "https://spec.openapis.org/oas/v3.1#link-object", - "type": "object", - "properties": { - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "server": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "$comment": "https://spec.openapis.org/oas/v3.1#header-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - }, - "explode": { - "default": false, - "type": "boolean" - } - }, - "$ref": "#/$defs/examples" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "$comment": "https://spec.openapis.org/oas/v3.1#tag-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "$comment": "https://spec.openapis.org/oas/v3.1#reference-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "schema": { - "$comment": "https://spec.openapis.org/oas/v3.1#schema-object", - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "$comment": "https://spec.openapis.org/oas/v3.1#security-scheme-object", - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - } - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - }, - "required": [ - "type" - ] - }, - "then": { - "properties": { - "openIdConnectUrl": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "$comment": "https://spec.openapis.org/oas/v3.1#security-requirement-object", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "$comment": "https://spec.openapis.org/oas/v3.1#specification-extensions", - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - }, - "not": { - "required": [ - "example", - "examples" - ] - } - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } -} diff --git a/vendor/openapi/oas/3.1/schema/2025-09-15 b/vendor/openapi/oas/3.1/schema/2025-09-15 deleted file mode 100644 index 54ddf62ea..000000000 --- a/vendor/openapi/oas/3.1/schema/2025-09-15 +++ /dev/null @@ -1,1411 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.1/schema/2025-09-15", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.1.x Documents without Schema Object validation", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.1\\.\\d+(-.+)?$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "type": "string", - "format": "uri-reference", - "default": "https://spec.openapis.org/oas/3.1/dialect/2024-11-10" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - }, - "default": [ - { - "url": "/" - } - ] - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "$comment": "https://spec.openapis.org/oas/v3.1#info-object", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri-reference" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "$comment": "https://spec.openapis.org/oas/v3.1#contact-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "$comment": "https://spec.openapis.org/oas/v3.1#license-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "name" - ], - "dependentSchemas": { - "identifier": { - "not": { - "required": [ - "url" - ] - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "$comment": "https://spec.openapis.org/oas/v3.1#server-object", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "$comment": "https://spec.openapis.org/oas/v3.1#server-variable-object", - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "$comment": "https://spec.openapis.org/oas/v3.1#components-object", - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - } - }, - "patternProperties": { - "^(?:schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "$comment": "https://spec.openapis.org/oas/v3.1#paths-object", - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "$comment": "https://spec.openapis.org/oas/v3.1#path-item-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "get": { - "$ref": "#/$defs/operation" - }, - "put": { - "$ref": "#/$defs/operation" - }, - "post": { - "$ref": "#/$defs/operation" - }, - "delete": { - "$ref": "#/$defs/operation" - }, - "options": { - "$ref": "#/$defs/operation" - }, - "head": { - "$ref": "#/$defs/operation" - }, - "patch": { - "$ref": "#/$defs/operation" - }, - "trace": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "operation": { - "$comment": "https://spec.openapis.org/oas/v3.1#operation-object", - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "$comment": "https://spec.openapis.org/oas/v3.1#external-documentation-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter": { - "$comment": "https://spec.openapis.org/oas/v3.1#parameter-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "required": [ - "name", - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "if": { - "properties": { - "in": { - "const": "query" - } - } - }, - "then": { - "properties": { - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - } - }, - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - } - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - } - }, - "then": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - } - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - } - }, - "then": { - "properties": { - "style": { - "default": "form", - "const": "form" - } - } - } - } - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "$comment": "https://spec.openapis.org/oas/v3.1#request-body-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "$comment": "https://spec.openapis.org/oas/v3.1#fixed-fields-10", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "$comment": "https://spec.openapis.org/oas/v3.1#media-type-object", - "type": "object", - "properties": { - "schema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/examples" - } - ], - "unevaluatedProperties": false - }, - "encoding": { - "$comment": "https://spec.openapis.org/oas/v3.1#encoding-object", - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean" - } - }, - "dependentSchemas": { - "style": { - "properties": { - "allowReserved": { - "default": false - } - } - }, - "explode": { - "properties": { - "style": { - "default": "form" - }, - "allowReserved": { - "default": false - } - } - }, - "allowReserved": { - "properties": { - "style": { - "default": "form" - } - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "unevaluatedProperties": false - }, - "responses": { - "$comment": "https://spec.openapis.org/oas/v3.1#responses-object", - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "minProperties": 1, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "if": { - "$comment": "either default, or at least one response code property must exist", - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": false - } - }, - "then": { - "required": [ - "default" - ] - } - }, - "response": { - "$comment": "https://spec.openapis.org/oas/v3.1#response-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "required": [ - "description" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "$comment": "https://spec.openapis.org/oas/v3.1#callback-object", - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "callbacks-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "$comment": "https://spec.openapis.org/oas/v3.1#example-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "value": true, - "externalValue": { - "type": "string", - "format": "uri-reference" - } - }, - "not": { - "required": [ - "value", - "externalValue" - ] - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "$comment": "https://spec.openapis.org/oas/v3.1#link-object", - "type": "object", - "properties": { - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "server": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "$comment": "https://spec.openapis.org/oas/v3.1#header-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - }, - "explode": { - "default": false, - "type": "boolean" - } - }, - "$ref": "#/$defs/examples" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "$comment": "https://spec.openapis.org/oas/v3.1#tag-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "$comment": "https://spec.openapis.org/oas/v3.1#reference-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "schema": { - "$comment": "https://spec.openapis.org/oas/v3.1#schema-object", - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "$comment": "https://spec.openapis.org/oas/v3.1#security-scheme-object", - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - } - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - } - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - } - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - } - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - } - }, - "then": { - "properties": { - "openIdConnectUrl": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "$comment": "https://spec.openapis.org/oas/v3.1#security-requirement-object", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "$comment": "https://spec.openapis.org/oas/v3.1#specification-extensions", - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - }, - "not": { - "required": [ - "example", - "examples" - ] - } - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } -} diff --git a/vendor/openapi/oas/3.2/dialect/2025-09-17 b/vendor/openapi/oas/3.2/dialect/2025-09-17 deleted file mode 100644 index 9598a0833..000000000 --- a/vendor/openapi/oas/3.2/dialect/2025-09-17 +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.2/dialect/2025-09-17", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "OpenAPI 3.2 Schema Object Dialect", - "description": "A JSON Schema dialect describing schemas found in OpenAPI v3.2.x Descriptions", - "$dynamicAnchor": "meta", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/applicator": true, - "https://json-schema.org/draft/2020-12/vocab/content": true, - "https://json-schema.org/draft/2020-12/vocab/core": true, - "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, - "https://json-schema.org/draft/2020-12/vocab/meta-data": true, - "https://json-schema.org/draft/2020-12/vocab/unevaluated": true, - "https://json-schema.org/draft/2020-12/vocab/validation": true, - "https://spec.openapis.org/oas/3.2/vocab/base": false - }, - "allOf": [ - { - "$ref": "https://json-schema.org/draft/2020-12/schema" - }, - { - "$ref": "https://spec.openapis.org/oas/3.2/meta/2025-09-17" - } - ] -} diff --git a/vendor/openapi/oas/3.2/meta/2025-09-17 b/vendor/openapi/oas/3.2/meta/2025-09-17 deleted file mode 100644 index 556b682d5..000000000 --- a/vendor/openapi/oas/3.2/meta/2025-09-17 +++ /dev/null @@ -1,114 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.2/meta/2025-09-17", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "title": "OAS Base Vocabulary", - "description": "A JSON Schema Vocabulary used in the OpenAPI JSON Schema Dialect", - "$dynamicAnchor": "meta", - "$vocabulary": { - "https://spec.openapis.org/oas/3.2/vocab/base": true - }, - "type": [ - "object", - "boolean" - ], - "properties": { - "discriminator": { - "$ref": "#/$defs/discriminator" - }, - "example": { - "deprecated": true - }, - "externalDocs": { - "$ref": "#/$defs/external-docs" - }, - "xml": { - "$ref": "#/$defs/xml" - } - }, - "$defs": { - "discriminator": { - "$ref": "#/$defs/extensible", - "properties": { - "mapping": { - "additionalProperties": { - "type": "string" - }, - "type": "object" - }, - "defaultMapping": { - "type": "string" - }, - "propertyName": { - "type": "string" - } - }, - "type": "object", - "unevaluatedProperties": false - }, - "extensible": { - "patternProperties": { - "^x-": true - } - }, - "external-docs": { - "$ref": "#/$defs/extensible", - "properties": { - "description": { - "type": "string" - }, - "url": { - "format": "uri-reference", - "type": "string" - } - }, - "required": [ - "url" - ], - "type": "object", - "unevaluatedProperties": false - }, - "xml": { - "$ref": "#/$defs/extensible", - "properties": { - "nodeType": { - "type": "string", - "enum": [ - "element", - "attribute", - "text", - "cdata", - "none" - ] - }, - "name": { - "type": "string" - }, - "namespace": { - "format": "iri", - "type": "string" - }, - "prefix": { - "type": "string" - }, - "attribute": { - "type": "boolean", - "deprecated": true - }, - "wrapped": { - "type": "boolean", - "deprecated": true - } - }, - "type": "object", - "dependentSchemas": { - "nodeType": { - "properties": { - "attribute": false, - "wrapped": false - } - } - }, - "unevaluatedProperties": false - } - } -} diff --git a/vendor/openapi/oas/3.2/schema-base/2025-09-17 b/vendor/openapi/oas/3.2/schema-base/2025-09-17 deleted file mode 100644 index 009847d32..000000000 --- a/vendor/openapi/oas/3.2/schema-base/2025-09-17 +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.2/schema-base/2025-09-17", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.2.x Documents using the OpenAPI JSON Schema dialect", - "$ref": "https://spec.openapis.org/oas/3.2/schema/2025-09-17", - "properties": { - "jsonSchemaDialect": { - "$ref": "#/$defs/dialect" - } - }, - "$defs": { - "dialect": { - "const": "https://spec.openapis.org/oas/3.2/dialect/2025-09-17" - }, - "schema": { - "$dynamicAnchor": "meta", - "$ref": "https://spec.openapis.org/oas/3.2/dialect/2025-09-17", - "properties": { - "$schema": { - "$ref": "#/$defs/dialect" - } - } - } - } -} diff --git a/vendor/openapi/oas/3.2/schema/2025-09-17 b/vendor/openapi/oas/3.2/schema/2025-09-17 deleted file mode 100644 index 9453eeb20..000000000 --- a/vendor/openapi/oas/3.2/schema/2025-09-17 +++ /dev/null @@ -1,1666 +0,0 @@ -{ - "$id": "https://spec.openapis.org/oas/3.2/schema/2025-09-17", - "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "The description of OpenAPI v3.2.x Documents without Schema Object validation", - "type": "object", - "properties": { - "openapi": { - "type": "string", - "pattern": "^3\\.2\\.\\d+(-.+)?$" - }, - "$self": { - "type": "string", - "format": "uri-reference", - "$comment": "MUST NOT contain a fragment", - "pattern": "^[^#]*$" - }, - "info": { - "$ref": "#/$defs/info" - }, - "jsonSchemaDialect": { - "type": "string", - "format": "uri-reference", - "default": "https://spec.openapis.org/oas/3.2/dialect/2025-09-17" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - }, - "default": [ - { - "url": "/" - } - ] - }, - "paths": { - "$ref": "#/$defs/paths" - }, - "webhooks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "components": { - "$ref": "#/$defs/components" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "tags": { - "type": "array", - "items": { - "$ref": "#/$defs/tag" - } - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - } - }, - "required": [ - "openapi", - "info" - ], - "anyOf": [ - { - "required": [ - "paths" - ] - }, - { - "required": [ - "components" - ] - }, - { - "required": [ - "webhooks" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "info": { - "$comment": "https://spec.openapis.org/oas/v3.2#info-object", - "type": "object", - "properties": { - "title": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "termsOfService": { - "type": "string", - "format": "uri-reference" - }, - "contact": { - "$ref": "#/$defs/contact" - }, - "license": { - "$ref": "#/$defs/license" - }, - "version": { - "type": "string" - } - }, - "required": [ - "title", - "version" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "contact": { - "$comment": "https://spec.openapis.org/oas/v3.2#contact-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - }, - "email": { - "type": "string", - "format": "email" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "license": { - "$comment": "https://spec.openapis.org/oas/v3.2#license-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "identifier": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "name" - ], - "dependentSchemas": { - "identifier": { - "not": { - "required": [ - "url" - ] - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server": { - "$comment": "https://spec.openapis.org/oas/v3.2#server-object", - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - }, - "name": { - "type": "string" - }, - "variables": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/server-variable" - } - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "server-variable": { - "$comment": "https://spec.openapis.org/oas/v3.2#server-variable-object", - "type": "object", - "properties": { - "enum": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "default": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "default" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "components": { - "$comment": "https://spec.openapis.org/oas/v3.2#components-object", - "type": "object", - "properties": { - "schemas": { - "type": "object", - "additionalProperties": { - "$dynamicRef": "#meta" - } - }, - "responses": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/response-or-reference" - } - }, - "parameters": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/parameter-or-reference" - } - }, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - }, - "requestBodies": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/request-body-or-reference" - } - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "securitySchemes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/security-scheme-or-reference" - } - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "pathItems": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "mediaTypes": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type-or-reference" - } - } - }, - "patternProperties": { - "^(?:schemas|responses|parameters|examples|requestBodies|headers|securitySchemes|links|callbacks|pathItems|mediaTypes)$": { - "$comment": "Enumerating all of the property names in the regex above is necessary for unevaluatedProperties to work as expected", - "propertyNames": { - "pattern": "^[a-zA-Z0-9._-]+$" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "paths": { - "$comment": "https://spec.openapis.org/oas/v3.2#paths-object", - "type": "object", - "patternProperties": { - "^/": { - "$ref": "#/$defs/path-item" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "path-item": { - "$comment": "https://spec.openapis.org/oas/v3.2#path-item-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - }, - "parameters": { - "$ref": "#/$defs/parameters" - }, - "additionalOperations": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/operation" - }, - "propertyNames": { - "$comment": "RFC9110 restricts methods to \"1*tchar\" in ABNF", - "pattern": "^[a-zA-Z0-9!#$%&'*+.^_`|~-]+$", - "not": { - "enum": [ - "GET", - "PUT", - "POST", - "DELETE", - "OPTIONS", - "HEAD", - "PATCH", - "TRACE", - "QUERY" - ] - } - } - }, - "get": { - "$ref": "#/$defs/operation" - }, - "put": { - "$ref": "#/$defs/operation" - }, - "post": { - "$ref": "#/$defs/operation" - }, - "delete": { - "$ref": "#/$defs/operation" - }, - "options": { - "$ref": "#/$defs/operation" - }, - "head": { - "$ref": "#/$defs/operation" - }, - "patch": { - "$ref": "#/$defs/operation" - }, - "trace": { - "$ref": "#/$defs/operation" - }, - "query": { - "$ref": "#/$defs/operation" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "operation": { - "$comment": "https://spec.openapis.org/oas/v3.2#operation-object", - "type": "object", - "properties": { - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "$ref": "#/$defs/parameters" - }, - "requestBody": { - "$ref": "#/$defs/request-body-or-reference" - }, - "responses": { - "$ref": "#/$defs/responses" - }, - "callbacks": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/callbacks-or-reference" - } - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "security": { - "type": "array", - "items": { - "$ref": "#/$defs/security-requirement" - } - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/$defs/server" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "external-documentation": { - "$comment": "https://spec.openapis.org/oas/v3.2#external-documentation-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "url" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "parameters": { - "type": "array", - "items": { - "$ref": "#/$defs/parameter-or-reference" - }, - "not": { - "allOf": [ - { - "contains": { - "type": "object", - "properties": { - "in": { - "const": "query" - } - }, - "required": [ - "in" - ] - } - }, - { - "contains": { - "type": "object", - "properties": { - "in": { - "const": "querystring" - } - }, - "required": [ - "in" - ] - } - } - ] - }, - "contains": { - "type": "object", - "properties": { - "in": { - "const": "querystring" - } - }, - "required": [ - "in" - ] - }, - "minContains": 0, - "maxContains": 1 - }, - "parameter": { - "$comment": "https://spec.openapis.org/oas/v3.2#parameter-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "querystring", - "header", - "path", - "cookie" - ] - }, - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "required": [ - "name", - "in" - ], - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/specification-extensions" - }, - { - "if": { - "properties": { - "in": { - "const": "query" - } - } - }, - "then": { - "properties": { - "allowEmptyValue": { - "default": false, - "type": "boolean" - } - } - } - }, - { - "if": { - "properties": { - "in": { - "const": "querystring" - } - } - }, - "then": { - "required": [ - "content" - ] - } - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "type": "string" - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - }, - "allOf": [ - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-path" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-header" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-query" - }, - { - "$ref": "#/$defs/parameter/dependentSchemas/schema/$defs/styles-for-cookie" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "$defs": { - "styles-for-path": { - "if": { - "properties": { - "in": { - "const": "path" - } - } - }, - "then": { - "properties": { - "style": { - "default": "simple", - "enum": [ - "matrix", - "label", - "simple" - ] - }, - "required": { - "const": true - } - }, - "required": [ - "required" - ] - } - }, - "styles-for-header": { - "if": { - "properties": { - "in": { - "const": "header" - } - } - }, - "then": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - } - } - } - }, - "styles-for-query": { - "if": { - "properties": { - "in": { - "const": "query" - } - } - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - } - } - } - }, - "styles-for-cookie": { - "if": { - "properties": { - "in": { - "const": "cookie" - } - } - }, - "then": { - "properties": { - "style": { - "default": "form", - "enum": [ - "form", - "cookie" - ] - } - } - } - } - } - } - }, - "unevaluatedProperties": false - }, - "parameter-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/parameter" - } - }, - "request-body": { - "$comment": "https://spec.openapis.org/oas/v3.2#request-body-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "content": { - "$ref": "#/$defs/content" - }, - "required": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "content" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "request-body-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/request-body" - } - }, - "content": { - "$comment": "https://spec.openapis.org/oas/v3.2#fixed-fields-10", - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/media-type-or-reference" - }, - "propertyNames": { - "format": "media-range" - } - }, - "media-type": { - "$comment": "https://spec.openapis.org/oas/v3.2#media-type-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "itemSchema": { - "$dynamicRef": "#meta" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - }, - "prefixEncoding": { - "type": "array", - "items": { - "$ref": "#/$defs/encoding" - } - }, - "itemEncoding": { - "$ref": "#/$defs/encoding" - } - }, - "dependentSchemas": { - "encoding": { - "properties": { - "prefixEncoding": false, - "itemEncoding": false - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/specification-extensions" - } - ], - "unevaluatedProperties": false - }, - "media-type-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/media-type" - } - }, - "encoding": { - "$comment": "https://spec.openapis.org/oas/v3.2#encoding-object", - "type": "object", - "properties": { - "contentType": { - "type": "string", - "format": "media-range" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "style": { - "enum": [ - "form", - "spaceDelimited", - "pipeDelimited", - "deepObject" - ] - }, - "explode": { - "type": "boolean" - }, - "allowReserved": { - "type": "boolean" - }, - "encoding": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/encoding" - } - }, - "prefixEncoding": { - "type": "array", - "items": { - "$ref": "#/$defs/encoding" - } - }, - "itemEncoding": { - "$ref": "#/$defs/encoding" - } - }, - "dependentSchemas": { - "encoding": { - "properties": { - "prefixEncoding": false, - "itemEncoding": false - } - }, - "style": { - "properties": { - "allowReserved": { - "default": false - } - } - }, - "explode": { - "properties": { - "style": { - "default": "form" - }, - "allowReserved": { - "default": false - } - } - }, - "allowReserved": { - "properties": { - "style": { - "default": "form" - } - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/styles-for-form" - } - ], - "unevaluatedProperties": false - }, - "responses": { - "$comment": "https://spec.openapis.org/oas/v3.2#responses-object", - "type": "object", - "properties": { - "default": { - "$ref": "#/$defs/response-or-reference" - } - }, - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": { - "$ref": "#/$defs/response-or-reference" - } - }, - "minProperties": 1, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "if": { - "$comment": "either default, or at least one response code property must exist", - "patternProperties": { - "^[1-5](?:[0-9]{2}|XX)$": false - } - }, - "then": { - "required": [ - "default" - ] - } - }, - "response": { - "$comment": "https://spec.openapis.org/oas/v3.2#response-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "headers": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/header-or-reference" - } - }, - "content": { - "$ref": "#/$defs/content" - }, - "links": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/link-or-reference" - } - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "response-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/response" - } - }, - "callbacks": { - "$comment": "https://spec.openapis.org/oas/v3.2#callback-object", - "type": "object", - "$ref": "#/$defs/specification-extensions", - "additionalProperties": { - "$ref": "#/$defs/path-item" - } - }, - "callbacks-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/callbacks" - } - }, - "example": { - "$comment": "https://spec.openapis.org/oas/v3.2#example-object", - "type": "object", - "properties": { - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "dataValue": true, - "serializedValue": { - "type": "string" - }, - "value": true, - "externalValue": { - "type": "string", - "format": "uri-reference" - } - }, - "allOf": [ - { - "not": { - "required": [ - "value", - "externalValue" - ] - } - }, - { - "not": { - "required": [ - "value", - "dataValue" - ] - } - }, - { - "not": { - "required": [ - "value", - "serializedValue" - ] - } - }, - { - "not": { - "required": [ - "serializedValue", - "externalValue" - ] - } - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "example-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/example" - } - }, - "link": { - "$comment": "https://spec.openapis.org/oas/v3.2#link-object", - "type": "object", - "properties": { - "operationRef": { - "type": "string", - "format": "uri-reference" - }, - "operationId": { - "type": "string" - }, - "parameters": { - "$ref": "#/$defs/map-of-strings" - }, - "requestBody": true, - "description": { - "type": "string" - }, - "server": { - "$ref": "#/$defs/server" - } - }, - "oneOf": [ - { - "required": [ - "operationRef" - ] - }, - { - "required": [ - "operationId" - ] - } - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "link-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/link" - } - }, - "header": { - "$comment": "https://spec.openapis.org/oas/v3.2#header-object", - "type": "object", - "properties": { - "description": { - "type": "string" - }, - "required": { - "default": false, - "type": "boolean" - }, - "deprecated": { - "default": false, - "type": "boolean" - }, - "schema": { - "$dynamicRef": "#meta" - }, - "content": { - "$ref": "#/$defs/content", - "minProperties": 1, - "maxProperties": 1 - } - }, - "oneOf": [ - { - "required": [ - "schema" - ] - }, - { - "required": [ - "content" - ] - } - ], - "dependentSchemas": { - "schema": { - "properties": { - "style": { - "default": "simple", - "const": "simple" - }, - "explode": { - "default": false, - "type": "boolean" - }, - "allowReserved": { - "default": false, - "type": "boolean" - } - } - } - }, - "allOf": [ - { - "$ref": "#/$defs/examples" - }, - { - "$ref": "#/$defs/specification-extensions" - } - ], - "unevaluatedProperties": false - }, - "header-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/header" - } - }, - "tag": { - "$comment": "https://spec.openapis.org/oas/v3.2#tag-object", - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - }, - "externalDocs": { - "$ref": "#/$defs/external-documentation" - }, - "parent": { - "type": "string" - }, - "kind": { - "type": "string" - } - }, - "required": [ - "name" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "reference": { - "$comment": "https://spec.openapis.org/oas/v3.2#reference-object", - "type": "object", - "properties": { - "$ref": { - "type": "string", - "format": "uri-reference" - }, - "summary": { - "type": "string" - }, - "description": { - "type": "string" - } - } - }, - "schema": { - "$comment": "https://spec.openapis.org/oas/v3.2#schema-object", - "$dynamicAnchor": "meta", - "type": [ - "object", - "boolean" - ] - }, - "security-scheme": { - "$comment": "https://spec.openapis.org/oas/v3.2#security-scheme-object", - "type": "object", - "properties": { - "type": { - "enum": [ - "apiKey", - "http", - "mutualTLS", - "oauth2", - "openIdConnect" - ] - }, - "description": { - "type": "string" - }, - "deprecated": { - "default": false, - "type": "boolean" - } - }, - "required": [ - "type" - ], - "allOf": [ - { - "$ref": "#/$defs/specification-extensions" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-apikey" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-http-bearer" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oauth2" - }, - { - "$ref": "#/$defs/security-scheme/$defs/type-oidc" - } - ], - "unevaluatedProperties": false, - "$defs": { - "type-apikey": { - "if": { - "properties": { - "type": { - "const": "apiKey" - } - } - }, - "then": { - "properties": { - "name": { - "type": "string" - }, - "in": { - "enum": [ - "query", - "header", - "cookie" - ] - } - }, - "required": [ - "name", - "in" - ] - } - }, - "type-http": { - "if": { - "properties": { - "type": { - "const": "http" - } - } - }, - "then": { - "properties": { - "scheme": { - "type": "string" - } - }, - "required": [ - "scheme" - ] - } - }, - "type-http-bearer": { - "if": { - "properties": { - "type": { - "const": "http" - }, - "scheme": { - "type": "string", - "pattern": "^[Bb][Ee][Aa][Rr][Ee][Rr]$" - } - }, - "required": [ - "type", - "scheme" - ] - }, - "then": { - "properties": { - "bearerFormat": { - "type": "string" - } - } - } - }, - "type-oauth2": { - "if": { - "properties": { - "type": { - "const": "oauth2" - } - } - }, - "then": { - "properties": { - "flows": { - "$ref": "#/$defs/oauth-flows" - }, - "oauth2MetadataUrl": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "flows" - ] - } - }, - "type-oidc": { - "if": { - "properties": { - "type": { - "const": "openIdConnect" - } - } - }, - "then": { - "properties": { - "openIdConnectUrl": { - "type": "string", - "format": "uri-reference" - } - }, - "required": [ - "openIdConnectUrl" - ] - } - } - } - }, - "security-scheme-or-reference": { - "if": { - "type": "object", - "required": [ - "$ref" - ] - }, - "then": { - "$ref": "#/$defs/reference" - }, - "else": { - "$ref": "#/$defs/security-scheme" - } - }, - "oauth-flows": { - "type": "object", - "properties": { - "implicit": { - "$ref": "#/$defs/oauth-flows/$defs/implicit" - }, - "password": { - "$ref": "#/$defs/oauth-flows/$defs/password" - }, - "clientCredentials": { - "$ref": "#/$defs/oauth-flows/$defs/client-credentials" - }, - "authorizationCode": { - "$ref": "#/$defs/oauth-flows/$defs/authorization-code" - }, - "deviceAuthorization": { - "$ref": "#/$defs/oauth-flows/$defs/device-authorization" - } - }, - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false, - "$defs": { - "implicit": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "password": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "client-credentials": { - "type": "object", - "properties": { - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "authorization-code": { - "type": "object", - "properties": { - "authorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "authorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - }, - "device-authorization": { - "type": "object", - "properties": { - "deviceAuthorizationUrl": { - "type": "string", - "format": "uri-reference" - }, - "tokenUrl": { - "type": "string", - "format": "uri-reference" - }, - "refreshUrl": { - "type": "string", - "format": "uri-reference" - }, - "scopes": { - "$ref": "#/$defs/map-of-strings" - } - }, - "required": [ - "deviceAuthorizationUrl", - "tokenUrl", - "scopes" - ], - "$ref": "#/$defs/specification-extensions", - "unevaluatedProperties": false - } - } - }, - "security-requirement": { - "$comment": "https://spec.openapis.org/oas/v3.2#security-requirement-object", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "specification-extensions": { - "$comment": "https://spec.openapis.org/oas/v3.2#specification-extensions", - "patternProperties": { - "^x-": true - } - }, - "examples": { - "properties": { - "example": true, - "examples": { - "type": "object", - "additionalProperties": { - "$ref": "#/$defs/example-or-reference" - } - } - }, - "not": { - "required": [ - "example", - "examples" - ] - } - }, - "map-of-strings": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "styles-for-form": { - "if": { - "properties": { - "style": { - "const": "form" - } - }, - "required": [ - "style" - ] - }, - "then": { - "properties": { - "explode": { - "default": true - } - } - }, - "else": { - "properties": { - "explode": { - "default": false - } - } - } - } - } -} diff --git a/vendor/referencing-suite.mask b/vendor/referencing-suite.mask deleted file mode 100644 index 48c9dde62..000000000 --- a/vendor/referencing-suite.mask +++ /dev/null @@ -1,8 +0,0 @@ -.markdownlint.jsonc -.pre-commit-config.yaml -noxfile.py -pyproject.toml -README.md -test-schema.json -test_sanity.py -tests/specifications.json diff --git a/vendor/referencing-suite/LICENSE b/vendor/referencing-suite/LICENSE deleted file mode 100644 index a9f853e43..000000000 --- a/vendor/referencing-suite/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2022 Julian Berman - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/bad-future-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-03/bad-future-anchor.json deleted file mode 100644 index 05dca4fde..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/bad-future-anchor.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "properties": { - "foo": { - "$anchor": "foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "#foo", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/bad-future-id.json b/vendor/referencing-suite/tests/json-schema-draft-03/bad-future-id.json deleted file mode 100644 index f3ebdd8e4..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/bad-future-id.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "properties": { - "foo": { - "$id": "http://example.com/great-scott", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/great-scott", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-03/empty-fragment.json deleted file mode 100644 index 680015de9..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/empty-fragment.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": "bar" } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/external-absolute-uri.json b/vendor/referencing-suite/tests/json-schema-draft-03/external-absolute-uri.json deleted file mode 100644 index 209d97bbc..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/external-absolute-uri.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/ignored-siblings.json b/vendor/referencing-suite/tests/json-schema-draft-03/ignored-siblings.json deleted file mode 100644 index 203be9f4a..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/ignored-siblings.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "id": "http://example.com/", - "extends": [{ "id": "ignored-id.json", "$ref": "foo.json" }] - } - }, - "tests": [ - { - "ref": "http://example.com/ignored-id.json", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-additionalItems-boolean.json b/vendor/referencing-suite/tests/json-schema-draft-03/keywords-additionalItems-boolean.json deleted file mode 100644 index 4da55d860..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-additionalItems-boolean.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalItems": false, - "properties": { - "foo": { "id": "urn:example:foo" } - } - } - }, - "tests": [ - { - "ref": "urn:example:foo", - "target": { "id": "urn:example:foo" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-additionalItems-schema.json b/vendor/referencing-suite/tests/json-schema-draft-03/keywords-additionalItems-schema.json deleted file mode 100644 index 598dc5932..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-additionalItems-schema.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalItems": { - "id": "http://example.com/oh-hey-an-additionalItems", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-additionalItems", - "target": { - "id": "http://example.com/oh-hey-an-additionalItems", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-additionalProperties-boolean.json b/vendor/referencing-suite/tests/json-schema-draft-03/keywords-additionalProperties-boolean.json deleted file mode 100644 index 7457b692a..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-additionalProperties-boolean.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": false, - "properties": { - "foo": { "id": "urn:example:foo" } - } - } - }, - "tests": [ - { - "ref": "urn:example:foo", - "target": { "id": "urn:example:foo" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-additionalProperties-schema.json b/vendor/referencing-suite/tests/json-schema-draft-03/keywords-additionalProperties-schema.json deleted file mode 100644 index 86ad51b71..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-additionalProperties-schema.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": { - "id": "http://example.com/oh-hey-an-additionalProperties", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-additionalProperties", - "target": { - "id": "http://example.com/oh-hey-an-additionalProperties", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-dependencies-array.json b/vendor/referencing-suite/tests/json-schema-draft-03/keywords-dependencies-array.json deleted file mode 100644 index 0c6da196f..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-dependencies-array.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependencies": { "foo": ["bar"] } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-dependencies-object.json b/vendor/referencing-suite/tests/json-schema-draft-03/keywords-dependencies-object.json deleted file mode 100644 index a679ef414..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-dependencies-object.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependencies": { - "foo": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-extends.json b/vendor/referencing-suite/tests/json-schema-draft-03/keywords-extends.json deleted file mode 100644 index 007cfa274..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-extends.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "extends": [{ "id": "http://example.com/0", "title": "First!" }] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "id": "http://example.com/0", "title": "First!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-items-array.json b/vendor/referencing-suite/tests/json-schema-draft-03/keywords-items-array.json deleted file mode 100644 index dc512224e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-items-array.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": [ - { "title": "First!" }, - { "id": "http://example.com/0", "title": "Second!" }, - { "title": "Third!" }, - { "id": "http://example.com/1", "title": "Fourth!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "id": "http://example.com/0", "title": "Second!" } - }, - { - "ref": "http://example.com/1", - "target": { "id": "http://example.com/1", "title": "Fourth!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-items-object.json b/vendor/referencing-suite/tests/json-schema-draft-03/keywords-items-object.json deleted file mode 100644 index 384bfd99f..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-items-object.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": { - "id": "http://example.com/oh-hey-an-items", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-items", - "target": { - "id": "http://example.com/oh-hey-an-items", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-patternProperties.json b/vendor/referencing-suite/tests/json-schema-draft-03/keywords-patternProperties.json deleted file mode 100644 index f7004c746..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-patternProperties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "patternProperties": { - "foo": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-properties.json b/vendor/referencing-suite/tests/json-schema-draft-03/keywords-properties.json deleted file mode 100644 index 5f7bed75a..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/keywords-properties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "properties": { - "foo": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/multiple-lookup-pointer.json b/vendor/referencing-suite/tests/json-schema-draft-03/multiple-lookup-pointer.json deleted file mode 100644 index d7adb4ae8..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/multiple-lookup-pointer.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": {}, - "http://example.com/foo/": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo/", - "target": { "foo": "bar" }, - "then": { - "ref": "#/foo", - "target": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/multiple-lookup.json b/vendor/referencing-suite/tests/json-schema-draft-03/multiple-lookup.json deleted file mode 100644 index a5c30f012..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/multiple-lookup.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": {}, - "http://example.com/foo/": { "foo": "bar" }, - "http://example.com/foo/bar": { "baz": "quux" } - }, - "tests": [ - { - "ref": "http://example.com/", - "target": {}, - "then": { - "ref": "foo/", - "target": { "foo": "bar" }, - "then": { - "ref": "bar", - "target": { "baz": "quux" } - } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/nonreferencing-keywords-default.json b/vendor/referencing-suite/tests/json-schema-draft-03/nonreferencing-keywords-default.json deleted file mode 100644 index 8f9efb5ae..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/nonreferencing-keywords-default.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "default": { "id": "http://example.com/oh-hey-not-an-id" } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/nonreferencing-keywords-enum.json b/vendor/referencing-suite/tests/json-schema-draft-03/nonreferencing-keywords-enum.json deleted file mode 100644 index c7f9e2dc2..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/nonreferencing-keywords-enum.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "enum": [{ "id": "http://example.com/oh-hey-not-an-id" }] - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-id-in-dependencies-object.json b/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-id-in-dependencies-object.json deleted file mode 100644 index b90948a14..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-id-in-dependencies-object.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependencies": { - "foo": { - "id": "http://example.com/oh-hey-a-subschema", - "properties": { - "id": {}, - "foo": { - "id": "foo", - "bar": "baz" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/dependencies/foo/properties/foo", - "target": { "id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-id-in-items-array.json b/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-id-in-items-array.json deleted file mode 100644 index ba99d27b9..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-id-in-items-array.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": [ - { - "id": "http://example.com/oh-hey-an-items", - "properties": { - "id": {}, - "foo": { - "id": "foo", - "bar": "baz" - } - } - } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/#/items/0/properties/foo", - "target": { "id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-id-in-items-object.json b/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-id-in-items-object.json deleted file mode 100644 index 2b3baf901..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-id-in-items-object.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": { - "id": "http://example.com/oh-hey-an-items", - "properties": { - "id": {}, - "foo": { - "id": "foo", - "bar": "baz" - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/items/properties/foo", - "target": { "id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-non-keyword-id-in-subvalue.json b/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-non-keyword-id-in-subvalue.json deleted file mode 100644 index 774f43a22..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-non-keyword-id-in-subvalue.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "properties": { - "id": { "type": "string" }, - "foo": { "bar": "baz" } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/properties/foo", - "target": { "bar": "baz" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-non-keyword-id.json b/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-non-keyword-id.json deleted file mode 100644 index 27bf9f528..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/pointer-crossing-non-keyword-id.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": { - "properties": { - "id": { "type": "string" }, - "foo": { "bar": "baz" } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/additionalProperties/properties/foo", - "target": { "bar": "baz" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/relative-pointer-array.json b/vendor/referencing-suite/tests/json-schema-draft-03/relative-pointer-array.json deleted file mode 100644 index f8726cdc0..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/relative-pointer-array.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": [2, 4, 6] } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/1", - "target": 4 - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/relative-pointer-escapes.json b/vendor/referencing-suite/tests/json-schema-draft-03/relative-pointer-escapes.json deleted file mode 100644 index d0c8e5ff3..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/relative-pointer-escapes.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { - "foo": { - "tilde~field": "bar", - "slash/field": "baz", - "percent%field": "quux" - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/tilde~0field", - "target": "bar" - }, - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/slash~1field", - "target": "baz" - }, - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/percent%25field", - "target": "quux" - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/relative-pointer-object.json b/vendor/referencing-suite/tests/json-schema-draft-03/relative-pointer-object.json deleted file mode 100644 index e5ccf194e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/relative-pointer-object.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": { "bar": { "baz": 12 } } } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/bar", - "target": { "baz": 12 } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/rfc3986-normalization-on-insertion.json b/vendor/referencing-suite/tests/json-schema-draft-03/rfc3986-normalization-on-insertion.json deleted file mode 100644 index 541b04db2..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/rfc3986-normalization-on-insertion.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "hTtP://example.com/case-insensitive-scheme": { "foo": "bar" }, - "http://exAmpLe.com/case-insensitive-host": { "baz": "quux" }, - "hTtP://exAmpLe.com/case-SENSITIVE-path": {}, - "http://example.com/escapes/a%c2%b1b": { "spam": "eggs" }, - "http://example.com/unreserved/%7Efoo": { "snap": "crackle" }, - "http://example.com:80/default/port": { "pop": 37 } - }, - "tests": [ - { - "ref": "http://example.com/case-insensitive-scheme", - "target": { "foo": "bar" } - }, - { - "ref": "http://example.com/case-insensitive-host", - "target": { "baz": "quux" } - }, - { - "ref": "http://example.com/case-sensitive-path", - "error": true - }, - { - "ref": "http://example.com/escapes/a%C2%B1b", - "target": { "spam": "eggs" } - }, - { - "ref": "http://example.com/unreserved/~foo", - "target": { "snap": "crackle" } - }, - { - "ref": "http://example.com/default/port", - "target": { "pop": 37 } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/rfc3986-normalization-on-retrieval.json b/vendor/referencing-suite/tests/json-schema-draft-03/rfc3986-normalization-on-retrieval.json deleted file mode 100644 index 87a1ff6e0..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/rfc3986-normalization-on-retrieval.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/case-insensitive-scheme": { "foo": "bar" }, - "http://example.com/case-insensitive-host": { "baz": "quux" }, - "http://example.com/case-sensitive-path": {}, - "http://example.com/escapes/a%C2%B1b": { "spam": "eggs" }, - "http://example.com/unreserved/~foo": { "snap": "crackle" }, - "http://example.com/default/port": { "pop": 37 } - }, - "tests": [ - { - "ref": "hTtP://example.com/case-insensitive-scheme", - "target": { "foo": "bar" } - }, - { - "ref": "http://exAmpLe.com/case-insensitive-host", - "target": { "baz": "quux" } - }, - { - "ref": "hTtP://exAmpLe.com/case-SENSITIVE-path", - "error": true - }, - { - "ref": "http://example.com/escapes/a%c2%b1b", - "target": { "spam": "eggs" } - }, - { - "ref": "http://example.com/unreserved/%7Efoo", - "target": { "snap": "crackle" } - }, - { - "ref": "http://example.com:80/default/port", - "target": { "pop": 37 } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-03/unknown-keyword.json b/vendor/referencing-suite/tests/json-schema-draft-03/unknown-keyword.json deleted file mode 100644 index 58d534dd1..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-03/unknown-keyword.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "unknownKeyword": { - "id": "http://example.com/oh-hey-not-a-real-known-id", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-a-real-known-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/absolute-uri-empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-04/absolute-uri-empty-fragment.json deleted file mode 100644 index 07ccf9473..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/absolute-uri-empty-fragment.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "id": "http://example.com/foo#", - "foo": "bar" - } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { - "id": "http://example.com/foo#", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/anchor.json b/vendor/referencing-suite/tests/json-schema-draft-04/anchor.json deleted file mode 100644 index 031822b1b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/anchor.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "#foo", - "target": { - "id": "#foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/bad-future-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-04/bad-future-anchor.json deleted file mode 100644 index cca6650e1..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/bad-future-anchor.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$anchor": "foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "#foo", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/bad-future-id.json b/vendor/referencing-suite/tests/json-schema-draft-04/bad-future-id.json deleted file mode 100644 index dabc23d6b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/bad-future-id.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "http://example.com/great-scott", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/great-scott", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-04/empty-fragment.json deleted file mode 100644 index 680015de9..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/empty-fragment.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": "bar" } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-uri-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-uri-anchor.json deleted file mode 100644 index 7175e7de7..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-uri-anchor.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "id": "#foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-uri-empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-uri-empty-fragment.json deleted file mode 100644 index 1e2375bde..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-uri-empty-fragment.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo#": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-uri-with-different-id-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-uri-with-different-id-anchor.json deleted file mode 100644 index d00595a19..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-uri-with-different-id-anchor.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "id": "http://example.org/internal", - "definitions": { - "foo": { - "id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "id": "#foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-uri.json b/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-uri.json deleted file mode 100644 index 209d97bbc..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-uri.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-urn-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-urn-anchor.json deleted file mode 100644 index 9e2a2ddb1..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-urn-anchor.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "urn:example:schema": { - "definitions": { - "foo": { - "id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "urn:example:schema#foo", - "target": { - "id": "#foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-urn.json b/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-urn.json deleted file mode 100644 index 170e0bcb8..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/external-absolute-urn.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "urn:example:schema": { "foo": "bar" } - }, - "tests": [ - { - "ref": "urn:example:schema", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/external-uri-with-nested-relative-uri-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-04/external-uri-with-nested-relative-uri-anchor.json deleted file mode 100644 index 3260d9875..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/external-uri-with-nested-relative-uri-anchor.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "id": "foo", - "definitions": { - "spam": { - "id": "#bar", - "baz": "quux" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/foo#bar", - "target": { - "id": "#bar", - "baz": "quux" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/ignored-siblings.json b/vendor/referencing-suite/tests/json-schema-draft-04/ignored-siblings.json deleted file mode 100644 index 3c1966aea..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/ignored-siblings.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "id": "http://example.com/", - "allOf": [ - { - "id": "ignored-id.json", - "$ref": "foo.json" - }, - { "id": "foo.json" }, - { "id": "ignored-id.json/foo.json" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/ignored-id.json", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/invalid-anchor-with-pointer.json b/vendor/referencing-suite/tests/json-schema-draft-04/invalid-anchor-with-pointer.json deleted file mode 100644 index 0c90ee094..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/invalid-anchor-with-pointer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "id": "#foo", - "definitions": { - "bar": { "baz": "quux" } - } - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "#foo/definitions/bar", - "error": true - }, - { - "base_uri": "http://example.com/", - "ref": "#foo#/definitions/bar", - "error": true - }, - { - "ref": "http://example.com/#foo/definitions/bar", - "error": true - }, - { - "ref": "http://example.com#foo/definitions/bar", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-additionalItems-boolean.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-additionalItems-boolean.json deleted file mode 100644 index bba02706e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-additionalItems-boolean.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalItems": false, - "definitions": { - "foo": { "id": "urn:example:foo" } - } - } - }, - "tests": [ - { - "ref": "urn:example:foo", - "target": { "id": "urn:example:foo" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-additionalItems-schema.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-additionalItems-schema.json deleted file mode 100644 index 598dc5932..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-additionalItems-schema.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalItems": { - "id": "http://example.com/oh-hey-an-additionalItems", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-additionalItems", - "target": { - "id": "http://example.com/oh-hey-an-additionalItems", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-additionalProperties-boolean.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-additionalProperties-boolean.json deleted file mode 100644 index 30d24a49e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-additionalProperties-boolean.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": false, - "definitions": { - "foo": { "id": "urn:example:foo" } - } - } - }, - "tests": [ - { - "ref": "urn:example:foo", - "target": { "id": "urn:example:foo" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-additionalProperties-schema.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-additionalProperties-schema.json deleted file mode 100644 index 86ad51b71..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-additionalProperties-schema.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": { - "id": "http://example.com/oh-hey-an-additionalProperties", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-additionalProperties", - "target": { - "id": "http://example.com/oh-hey-an-additionalProperties", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-allOf.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-allOf.json deleted file mode 100644 index 923f1657a..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-allOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "allOf": [ - { "id": "http://example.com/0", "title": "First!" }, - { "id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-anyOf.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-anyOf.json deleted file mode 100644 index bef50ec5b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-anyOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "anyOf": [ - { "id": "http://example.com/0", "title": "First!" }, - { "id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-definitions.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-definitions.json deleted file mode 100644 index 523ef2804..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-definitions.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-dependencies-array.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-dependencies-array.json deleted file mode 100644 index 0c6da196f..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-dependencies-array.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependencies": { "foo": ["bar"] } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-dependencies-object.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-dependencies-object.json deleted file mode 100644 index a679ef414..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-dependencies-object.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependencies": { - "foo": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-items-array.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-items-array.json deleted file mode 100644 index dc512224e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-items-array.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": [ - { "title": "First!" }, - { "id": "http://example.com/0", "title": "Second!" }, - { "title": "Third!" }, - { "id": "http://example.com/1", "title": "Fourth!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "id": "http://example.com/0", "title": "Second!" } - }, - { - "ref": "http://example.com/1", - "target": { "id": "http://example.com/1", "title": "Fourth!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-items-object.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-items-object.json deleted file mode 100644 index 384bfd99f..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-items-object.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": { - "id": "http://example.com/oh-hey-an-items", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-items", - "target": { - "id": "http://example.com/oh-hey-an-items", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-not.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-not.json deleted file mode 100644 index e22b123c7..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-not.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "not": { - "id": "http://example.com/oh-hey-a-not", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-not", - "target": { - "id": "http://example.com/oh-hey-a-not", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-oneOf.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-oneOf.json deleted file mode 100644 index 4dd2dbc61..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-oneOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "oneOf": [ - { "id": "http://example.com/0", "title": "First!" }, - { "id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-patternProperties.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-patternProperties.json deleted file mode 100644 index f7004c746..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-patternProperties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "patternProperties": { - "foo": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-properties.json b/vendor/referencing-suite/tests/json-schema-draft-04/keywords-properties.json deleted file mode 100644 index 5f7bed75a..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/keywords-properties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "properties": { - "foo": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/multiple-lookup-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-04/multiple-lookup-anchor.json deleted file mode 100644 index 096f211eb..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/multiple-lookup-anchor.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { "id": "#foo", "bar": "baz" } - } - } - }, - "tests": [ - { - "ref": "http://example.com/", - "target": { "definitions": { "foo": { "id": "#foo", "bar": "baz" } } }, - "then": { - "ref": "#foo", - "target": { "id": "#foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/multiple-lookup-external-absolute-uri-with-different-id-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-04/multiple-lookup-external-absolute-uri-with-different-id-anchor.json deleted file mode 100644 index 3cde370d2..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/multiple-lookup-external-absolute-uri-with-different-id-anchor.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "id": "http://example.org/foo", - "definitions": { - "bar": { - "id": "#baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/definitions/foo", - "target": { - "id": "http://example.org/foo", - "definitions": { "bar": { "id": "#baz", "quux": "eggs" } } - }, - "then": { - "ref": "#baz", - "target": { "id": "#baz", "quux": "eggs" } - } - }, - { - "ref": "http://example.com/#/definitions/foo", - "target": { - "id": "http://example.org/foo", - "definitions": { "bar": { "id": "#baz", "quux": "eggs" } } - }, - "then": { - "ref": "http://example.org/foo#baz", - "target": { "id": "#baz", "quux": "eggs" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/multiple-lookup-pointer.json b/vendor/referencing-suite/tests/json-schema-draft-04/multiple-lookup-pointer.json deleted file mode 100644 index d7adb4ae8..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/multiple-lookup-pointer.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": {}, - "http://example.com/foo/": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo/", - "target": { "foo": "bar" }, - "then": { - "ref": "#/foo", - "target": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/multiple-lookup.json b/vendor/referencing-suite/tests/json-schema-draft-04/multiple-lookup.json deleted file mode 100644 index a5c30f012..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/multiple-lookup.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": {}, - "http://example.com/foo/": { "foo": "bar" }, - "http://example.com/foo/bar": { "baz": "quux" } - }, - "tests": [ - { - "ref": "http://example.com/", - "target": {}, - "then": { - "ref": "foo/", - "target": { "foo": "bar" }, - "then": { - "ref": "bar", - "target": { "baz": "quux" } - } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/nested-absolute-id.json b/vendor/referencing-suite/tests/json-schema-draft-04/nested-absolute-id.json deleted file mode 100644 index 650ae12b3..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/nested-absolute-id.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "id": "http://example.com/", - "definitions": { - "foo": { - "id": "http://example.com/nested", - "definitions": { - "inner": { "foo": "bar" } - } - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/nested", - "ref": "#/definitions/inner", - "target": { "foo": "bar" } - }, - { - "base_uri": "http://example.com/", - "ref": "nested", - "target": { - "id": "http://example.com/nested", - "definitions": { - "inner": { "foo": "bar" } - } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/nested-relative-id-only-retrieval-uri.json b/vendor/referencing-suite/tests/json-schema-draft-04/nested-relative-id-only-retrieval-uri.json deleted file mode 100644 index b5734decf..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/nested-relative-id-only-retrieval-uri.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "id": "nested.json", - "title": "Hi!" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/nested.json", - "target": { "id": "nested.json", "title": "Hi!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/nested-relative-id.json b/vendor/referencing-suite/tests/json-schema-draft-04/nested-relative-id.json deleted file mode 100644 index 374668081..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/nested-relative-id.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "id": "http://example.com/", - "definitions": { - "foo": { - "id": "nested.json", - "title": "Hi!" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/nested.json", - "target": { "id": "nested.json", "title": "Hi!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/nonreferencing-keywords-default.json b/vendor/referencing-suite/tests/json-schema-draft-04/nonreferencing-keywords-default.json deleted file mode 100644 index 8f9efb5ae..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/nonreferencing-keywords-default.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "default": { "id": "http://example.com/oh-hey-not-an-id" } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/nonreferencing-keywords-enum.json b/vendor/referencing-suite/tests/json-schema-draft-04/nonreferencing-keywords-enum.json deleted file mode 100644 index c7f9e2dc2..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/nonreferencing-keywords-enum.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "enum": [{ "id": "http://example.com/oh-hey-not-an-id" }] - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-id-in-dependencies-object.json b/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-id-in-dependencies-object.json deleted file mode 100644 index 04b10e195..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-id-in-dependencies-object.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependencies": { - "foo": { - "id": "http://example.com/oh-hey-a-subschema", - "definitions": { - "id": {}, - "foo": { - "id": "foo", - "bar": "baz" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/dependencies/foo/definitions/foo", - "target": { "id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-id-in-items-array.json b/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-id-in-items-array.json deleted file mode 100644 index f1f13f503..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-id-in-items-array.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": [ - { - "id": "http://example.com/oh-hey-an-items", - "definitions": { - "id": {}, - "foo": { - "id": "foo", - "bar": "baz" - } - } - } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/#/items/0/definitions/foo", - "target": { "id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-id-in-items-object.json b/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-id-in-items-object.json deleted file mode 100644 index a24e68f55..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-id-in-items-object.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": { - "id": "http://example.com/oh-hey-an-items", - "definitions": { - "id": {}, - "foo": { - "id": "foo", - "bar": "baz" - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/items/definitions/foo", - "target": { "id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-non-keyword-id-in-subvalue.json b/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-non-keyword-id-in-subvalue.json deleted file mode 100644 index c45719ec5..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-non-keyword-id-in-subvalue.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "id": { "type": "string" }, - "foo": { "bar": "baz" } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/definitions/foo", - "target": { "bar": "baz" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-non-keyword-id.json b/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-non-keyword-id.json deleted file mode 100644 index 2321cc5f4..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/pointer-crossing-non-keyword-id.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": { - "definitions": { - "id": { "type": "string" }, - "foo": { "bar": "baz" } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/additionalProperties/definitions/foo", - "target": { "bar": "baz" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/relative-pointer-array.json b/vendor/referencing-suite/tests/json-schema-draft-04/relative-pointer-array.json deleted file mode 100644 index f8726cdc0..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/relative-pointer-array.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": [2, 4, 6] } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/1", - "target": 4 - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/relative-pointer-escapes.json b/vendor/referencing-suite/tests/json-schema-draft-04/relative-pointer-escapes.json deleted file mode 100644 index d0c8e5ff3..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/relative-pointer-escapes.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { - "foo": { - "tilde~field": "bar", - "slash/field": "baz", - "percent%field": "quux" - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/tilde~0field", - "target": "bar" - }, - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/slash~1field", - "target": "baz" - }, - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/percent%25field", - "target": "quux" - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/relative-pointer-object.json b/vendor/referencing-suite/tests/json-schema-draft-04/relative-pointer-object.json deleted file mode 100644 index e5ccf194e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/relative-pointer-object.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": { "bar": { "baz": 12 } } } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/bar", - "target": { "baz": 12 } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/rfc3986-normalization-on-insertion.json b/vendor/referencing-suite/tests/json-schema-draft-04/rfc3986-normalization-on-insertion.json deleted file mode 100644 index 444cdc027..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/rfc3986-normalization-on-insertion.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "hTtP://example.com/case-insensitive-scheme": { "foo": "bar" }, - "http://exAmpLe.com/case-insensitive-host": { "baz": "quux" }, - "hTtP://exAmpLe.com/case-SENSITIVE-path": {}, - "http://example.com/escapes/a%c2%b1b": { "spam": "eggs" }, - "http://example.com/unreserved/%7Efoo": { "snap": "crackle" }, - "http://example.com:80/default/port": { "pop": 37 }, - "http://example.com/internal-ids": { - "definitions": { - "scheme": { - "id": "hTtP://example.com/id/case-insensitive-scheme", - "foo": "bar" - }, - "host": { - "id": "http://exAmpLe.com/id/case-insensitive-host", - "baz": "quux" - }, - "path": { - "id": "hTtP://exAmpLe.com/id/case-SENSITIVE-path" - }, - "escapes": { - "id": "http://example.com/id/escapes/a%c2%b1b", - "spam": "eggs" - }, - "unreserved": { - "id": "http://example.com/id/unreserved/%7Efoo", - "snap": "crackle" - }, - "port": { - "id": "http://example.com:80/id/default/port", - "pop": 37 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/case-insensitive-scheme", - "target": { "foo": "bar" } - }, - { - "ref": "http://example.com/case-insensitive-host", - "target": { "baz": "quux" } - }, - { - "ref": "http://example.com/case-sensitive-path", - "error": true - }, - { - "ref": "http://example.com/escapes/a%C2%B1b", - "target": { "spam": "eggs" } - }, - { - "ref": "http://example.com/unreserved/~foo", - "target": { "snap": "crackle" } - }, - { - "ref": "http://example.com/default/port", - "target": { "pop": 37 } - }, - { - "ref": "http://example.com/id/case-insensitive-scheme", - "target": { - "id": "hTtP://example.com/id/case-insensitive-scheme", - "foo": "bar" - } - }, - { - "ref": "http://example.com/id/case-insensitive-host", - "target": { - "id": "http://exAmpLe.com/id/case-insensitive-host", - "baz": "quux" - } - }, - { - "ref": "http://example.com/id/case-sensitive-path", - "error": true - }, - { - "ref": "http://example.com/id/escapes/a%C2%B1b", - "target": { - "id": "http://example.com/id/escapes/a%c2%b1b", - "spam": "eggs" - } - }, - { - "ref": "http://example.com/id/unreserved/~foo", - "target": { - "id": "http://example.com/id/unreserved/%7Efoo", - "snap": "crackle" - } - }, - { - "ref": "http://example.com/id/default/port", - "target": { - "id": "http://example.com:80/id/default/port", - "pop": 37 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/rfc3986-normalization-on-retrieval.json b/vendor/referencing-suite/tests/json-schema-draft-04/rfc3986-normalization-on-retrieval.json deleted file mode 100644 index 8ca3eabf5..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/rfc3986-normalization-on-retrieval.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/case-insensitive-scheme": { "foo": "bar" }, - "http://example.com/case-insensitive-host": { "baz": "quux" }, - "http://example.com/case-sensitive-path": {}, - "http://example.com/escapes/a%C2%B1b": { "spam": "eggs" }, - "http://example.com/unreserved/~foo": { "snap": "crackle" }, - "http://example.com/default/port": { "pop": 37 }, - "http://example.com/internal-ids": { - "definitions": { - "scheme": { - "id": "http://example.com/id/case-insensitive-scheme", - "foo": "bar" - }, - "host": { - "id": "http://example.com/id/case-insensitive-host", - "baz": "quux" - }, - "path": { - "id": "http://example.com/id/case-sensitive-path" - }, - "escapes": { - "id": "http://example.com/id/escapes/a%C2%B1b", - "spam": "eggs" - }, - "unreserved": { - "id": "http://example.com/id/unreserved/~foo", - "snap": "crackle" - }, - "port": { - "id": "http://example.com/id/default/port", - "pop": 37 - } - } - } - }, - "tests": [ - { - "ref": "hTtP://example.com/case-insensitive-scheme", - "target": { "foo": "bar" } - }, - { - "ref": "http://exAmpLe.com/case-insensitive-host", - "target": { "baz": "quux" } - }, - { - "ref": "hTtP://exAmpLe.com/case-SENSITIVE-path", - "error": true - }, - { - "ref": "http://example.com/escapes/a%c2%b1b", - "target": { "spam": "eggs" } - }, - { - "ref": "http://example.com/unreserved/%7Efoo", - "target": { "snap": "crackle" } - }, - { - "ref": "http://example.com:80/default/port", - "target": { "pop": 37 } - }, - { - "ref": "hTtP://example.com/id/case-insensitive-scheme", - "target": { - "id": "http://example.com/id/case-insensitive-scheme", - "foo": "bar" - } - }, - { - "ref": "http://exAmpLe.com/id/case-insensitive-host", - "target": { - "id": "http://example.com/id/case-insensitive-host", - "baz": "quux" - } - }, - { - "ref": "hTtP://exAmpLe.com/id/case-SENSITIVE-path", - "error": true - }, - { - "ref": "http://example.com/id/escapes/a%c2%b1b", - "target": { - "id": "http://example.com/id/escapes/a%C2%B1b", - "spam": "eggs" - } - }, - { - "ref": "http://example.com/id/unreserved/%7Efoo", - "target": { - "id": "http://example.com/id/unreserved/~foo", - "snap": "crackle" - } - }, - { - "ref": "http://example.com:80/id/default/port", - "target": { - "id": "http://example.com/id/default/port", - "pop": 37 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/tag-uris.json b/vendor/referencing-suite/tests/json-schema-draft-04/tag-uris.json deleted file mode 100644 index c854ff89d..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/tag-uris.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": { - "definitions": { - "foo": { - "id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "definitions": { - "bar": { - "id": "#baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "target": { - "id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "definitions": { - "bar": { - "id": "#baz", - "quux": "eggs" - } - } - }, - "then": { - "ref": "#baz", - "target": { "id": "#baz", "quux": "eggs" } - } - }, - { - "ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id", - "error": true, - "why": { - "summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.", - "specifications": [ - { - "rfc": 4151, - "section": "2.2", - "link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2" - } - ] - } - }, - { - "ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id", - "error": true, - "why": { - "summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.", - "specifications": [ - { - "rfc": 4151, - "section": "2.1", - "link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1" - } - ] - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-04/unknown-keyword.json b/vendor/referencing-suite/tests/json-schema-draft-04/unknown-keyword.json deleted file mode 100644 index 58d534dd1..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-04/unknown-keyword.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "unknownKeyword": { - "id": "http://example.com/oh-hey-not-a-real-known-id", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-a-real-known-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/absolute-uri-empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-06/absolute-uri-empty-fragment.json deleted file mode 100644 index 6351edb54..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/absolute-uri-empty-fragment.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/foo#", - "foo": "bar" - } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { - "$id": "http://example.com/foo#", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/anchor.json b/vendor/referencing-suite/tests/json-schema-draft-06/anchor.json deleted file mode 100644 index a494a1d1b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/anchor.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "#foo", - "target": { - "$id": "#foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/boolean-schemas.json b/vendor/referencing-suite/tests/json-schema-draft-06/boolean-schemas.json deleted file mode 100644 index 736b5c917..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/boolean-schemas.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalItems": true, - "additionalProperties": true, - "contains": true, - "items": true, - "not": false, - "propertyNames": true, - "allOf": [true], - "anyOf": [true], - "oneOf": [true], - "definitions": { - "foo": true, - "bar": { "$id": "bar" } - }, - "dependencies": { "foo": true }, - "patternProperties": { "foo": true }, - "properties": { "foo": true } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "bar", - "target": { "$id": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-06/empty-fragment.json deleted file mode 100644 index 680015de9..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/empty-fragment.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": "bar" } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-uri-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-uri-anchor.json deleted file mode 100644 index ffe96fa18..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-uri-anchor.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "$id": "#foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-uri-empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-uri-empty-fragment.json deleted file mode 100644 index 1e2375bde..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-uri-empty-fragment.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo#": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-uri-with-different-id-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-uri-with-different-id-anchor.json deleted file mode 100644 index 13e8415f2..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-uri-with-different-id-anchor.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.org/internal", - "definitions": { - "foo": { - "$id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "$id": "#foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-uri.json b/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-uri.json deleted file mode 100644 index 209d97bbc..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-uri.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-urn-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-urn-anchor.json deleted file mode 100644 index 32efdf8ec..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-urn-anchor.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "urn:example:schema": { - "definitions": { - "foo": { - "$id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "urn:example:schema#foo", - "target": { - "$id": "#foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-urn.json b/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-urn.json deleted file mode 100644 index 170e0bcb8..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/external-absolute-urn.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "urn:example:schema": { "foo": "bar" } - }, - "tests": [ - { - "ref": "urn:example:schema", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/external-uri-with-nested-relative-uri-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-06/external-uri-with-nested-relative-uri-anchor.json deleted file mode 100644 index b59375207..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/external-uri-with-nested-relative-uri-anchor.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "foo", - "definitions": { - "spam": { - "$id": "#bar", - "baz": "quux" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/foo#bar", - "target": { - "$id": "#bar", - "baz": "quux" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/ignored-siblings.json b/vendor/referencing-suite/tests/json-schema-draft-06/ignored-siblings.json deleted file mode 100644 index 9e0d655c6..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/ignored-siblings.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/", - "allOf": [ - { - "$id": "ignored-id.json", - "$ref": "foo.json" - }, - { "$id": "foo.json" }, - { "$id": "ignored-id.json/foo.json" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/ignored-id.json", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/invalid-anchor-with-pointer.json b/vendor/referencing-suite/tests/json-schema-draft-06/invalid-anchor-with-pointer.json deleted file mode 100644 index 8c0724f34..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/invalid-anchor-with-pointer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "#foo", - "definitions": { - "bar": { "baz": "quux" } - } - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "#foo/definitions/bar", - "error": true - }, - { - "base_uri": "http://example.com/", - "ref": "#foo#/definitions/bar", - "error": true - }, - { - "ref": "http://example.com/#foo/definitions/bar", - "error": true - }, - { - "ref": "http://example.com#foo/definitions/bar", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-additionalItems.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-additionalItems.json deleted file mode 100644 index a2eba2974..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-additionalItems.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalItems": { - "$id": "http://example.com/oh-hey-an-additionalItems", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-additionalItems", - "target": { - "$id": "http://example.com/oh-hey-an-additionalItems", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-additionalProperties.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-additionalProperties.json deleted file mode 100644 index cf69a34fd..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-additionalProperties.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": { - "$id": "http://example.com/oh-hey-an-additionalProperties", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-additionalProperties", - "target": { - "$id": "http://example.com/oh-hey-an-additionalProperties", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-allOf.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-allOf.json deleted file mode 100644 index af3610516..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-allOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "allOf": [ - { "$id": "http://example.com/0", "title": "First!" }, - { "$id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-anyOf.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-anyOf.json deleted file mode 100644 index 41e2bea12..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-anyOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "anyOf": [ - { "$id": "http://example.com/0", "title": "First!" }, - { "$id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-contains.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-contains.json deleted file mode 100644 index bbd65e299..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-contains.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "contains": { - "$id": "http://example.com/oh-hey-a-contains", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-contains", - "target": { - "$id": "http://example.com/oh-hey-a-contains", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-definitions.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-definitions.json deleted file mode 100644 index d6533349b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-definitions.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-dependencies-array.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-dependencies-array.json deleted file mode 100644 index 0c6da196f..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-dependencies-array.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependencies": { "foo": ["bar"] } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-dependencies-object.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-dependencies-object.json deleted file mode 100644 index 3b8ffc1e3..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-dependencies-object.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependencies": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-items-array.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-items-array.json deleted file mode 100644 index 3e2b89904..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-items-array.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": [ - { "title": "First!" }, - { "$id": "http://example.com/0", "title": "Second!" }, - { "title": "Third!" }, - { "$id": "http://example.com/1", "title": "Fourth!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "Second!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Fourth!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-items-object.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-items-object.json deleted file mode 100644 index 20f7a5895..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-items-object.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": { - "$id": "http://example.com/oh-hey-an-items", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-items", - "target": { - "$id": "http://example.com/oh-hey-an-items", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-not.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-not.json deleted file mode 100644 index 09a7bd6dc..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-not.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "not": { - "$id": "http://example.com/oh-hey-a-not", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-not", - "target": { - "$id": "http://example.com/oh-hey-a-not", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-oneOf.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-oneOf.json deleted file mode 100644 index 2d6e5545b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-oneOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "oneOf": [ - { "$id": "http://example.com/0", "title": "First!" }, - { "$id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-patternProperties.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-patternProperties.json deleted file mode 100644 index 6f760f086..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-patternProperties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "patternProperties": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-properties.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-properties.json deleted file mode 100644 index c4bf8300e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-properties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "properties": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-propertyNames.json b/vendor/referencing-suite/tests/json-schema-draft-06/keywords-propertyNames.json deleted file mode 100644 index 785130556..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/keywords-propertyNames.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "propertyNames": { - "$id": "http://example.com/oh-hey-a-propertyNames", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-propertyNames", - "target": { - "$id": "http://example.com/oh-hey-a-propertyNames", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/multiple-lookup-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-06/multiple-lookup-anchor.json deleted file mode 100644 index 959f83a91..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/multiple-lookup-anchor.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { "$id": "#foo", "bar": "baz" } - } - } - }, - "tests": [ - { - "ref": "http://example.com/", - "target": { "definitions": { "foo": { "$id": "#foo", "bar": "baz" } } }, - "then": { - "ref": "#foo", - "target": { "$id": "#foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/multiple-lookup-external-absolute-uri-with-different-id-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-06/multiple-lookup-external-absolute-uri-with-different-id-anchor.json deleted file mode 100644 index 88538f9bf..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/multiple-lookup-external-absolute-uri-with-different-id-anchor.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "http://example.org/foo", - "definitions": { - "bar": { - "$id": "#baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/definitions/foo", - "target": { - "$id": "http://example.org/foo", - "definitions": { "bar": { "$id": "#baz", "quux": "eggs" } } - }, - "then": { - "ref": "#baz", - "target": { "$id": "#baz", "quux": "eggs" } - } - }, - { - "ref": "http://example.com/#/definitions/foo", - "target": { - "$id": "http://example.org/foo", - "definitions": { "bar": { "$id": "#baz", "quux": "eggs" } } - }, - "then": { - "ref": "http://example.org/foo#baz", - "target": { "$id": "#baz", "quux": "eggs" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/multiple-lookup-pointer.json b/vendor/referencing-suite/tests/json-schema-draft-06/multiple-lookup-pointer.json deleted file mode 100644 index d7adb4ae8..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/multiple-lookup-pointer.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": {}, - "http://example.com/foo/": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo/", - "target": { "foo": "bar" }, - "then": { - "ref": "#/foo", - "target": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/multiple-lookup.json b/vendor/referencing-suite/tests/json-schema-draft-06/multiple-lookup.json deleted file mode 100644 index a5c30f012..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/multiple-lookup.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": {}, - "http://example.com/foo/": { "foo": "bar" }, - "http://example.com/foo/bar": { "baz": "quux" } - }, - "tests": [ - { - "ref": "http://example.com/", - "target": {}, - "then": { - "ref": "foo/", - "target": { "foo": "bar" }, - "then": { - "ref": "bar", - "target": { "baz": "quux" } - } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/nested-absolute-id.json b/vendor/referencing-suite/tests/json-schema-draft-06/nested-absolute-id.json deleted file mode 100644 index 4029448b0..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/nested-absolute-id.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/", - "definitions": { - "foo": { - "$id": "http://example.com/nested", - "definitions": { - "inner": { "foo": "bar" } - } - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/nested", - "ref": "#/definitions/inner", - "target": { "foo": "bar" } - }, - { - "base_uri": "http://example.com/", - "ref": "nested", - "target": { - "$id": "http://example.com/nested", - "definitions": { - "inner": { "foo": "bar" } - } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/nested-relative-id-only-retrieval-uri.json b/vendor/referencing-suite/tests/json-schema-draft-06/nested-relative-id-only-retrieval-uri.json deleted file mode 100644 index c6a6419ef..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/nested-relative-id-only-retrieval-uri.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "nested.json", - "title": "Hi!" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/nested.json", - "target": { "$id": "nested.json", "title": "Hi!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/nested-relative-id.json b/vendor/referencing-suite/tests/json-schema-draft-06/nested-relative-id.json deleted file mode 100644 index 0a721d8ec..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/nested-relative-id.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/", - "definitions": { - "foo": { - "$id": "nested.json", - "title": "Hi!" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/nested.json", - "target": { "$id": "nested.json", "title": "Hi!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/nonreferencing-keywords-const.json b/vendor/referencing-suite/tests/json-schema-draft-06/nonreferencing-keywords-const.json deleted file mode 100644 index 1193e30ba..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/nonreferencing-keywords-const.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "const": { "$id": "http://example.com/oh-hey-not-an-id" } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/nonreferencing-keywords-default.json b/vendor/referencing-suite/tests/json-schema-draft-06/nonreferencing-keywords-default.json deleted file mode 100644 index bf65b3173..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/nonreferencing-keywords-default.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "default": { "$id": "http://example.com/oh-hey-not-an-id" } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/nonreferencing-keywords-enum.json b/vendor/referencing-suite/tests/json-schema-draft-06/nonreferencing-keywords-enum.json deleted file mode 100644 index 669414925..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/nonreferencing-keywords-enum.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "enum": [{ "$id": "http://example.com/oh-hey-not-an-id" }] - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/nonreferencing-keywords-examples.json b/vendor/referencing-suite/tests/json-schema-draft-06/nonreferencing-keywords-examples.json deleted file mode 100644 index e509f3d34..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/nonreferencing-keywords-examples.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "examples": [{ "$id": "http://example.com/oh-hey-not-an-id" }] - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-id-in-dependencies-object.json b/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-id-in-dependencies-object.json deleted file mode 100644 index 7c8dc4a04..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-id-in-dependencies-object.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependencies": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "definitions": { - "$id": {}, - "foo": { - "$id": "foo", - "bar": "baz" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/dependencies/foo/definitions/foo", - "target": { "$id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "$id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-id-in-items-array.json b/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-id-in-items-array.json deleted file mode 100644 index 3678e7129..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-id-in-items-array.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": [ - { - "$id": "http://example.com/oh-hey-an-items", - "definitions": { - "$id": {}, - "foo": { - "$id": "foo", - "bar": "baz" - } - } - } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/#/items/0/definitions/foo", - "target": { "$id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "$id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-id-in-items-object.json b/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-id-in-items-object.json deleted file mode 100644 index 033240871..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-id-in-items-object.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": { - "$id": "http://example.com/oh-hey-an-items", - "definitions": { - "$id": {}, - "foo": { - "$id": "foo", - "bar": "baz" - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/items/definitions/foo", - "target": { "$id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "$id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-non-keyword-id-in-subvalue.json b/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-non-keyword-id-in-subvalue.json deleted file mode 100644 index fd3d4f18c..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-non-keyword-id-in-subvalue.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "$id": { "type": "string" }, - "foo": { "bar": "baz" } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/definitions/foo", - "target": { "bar": "baz" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-non-keyword-id.json b/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-non-keyword-id.json deleted file mode 100644 index aae846eab..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/pointer-crossing-non-keyword-id.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": { - "definitions": { - "$id": { "type": "string" }, - "foo": { "bar": "baz" } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/additionalProperties/definitions/foo", - "target": { "bar": "baz" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/relative-pointer-array.json b/vendor/referencing-suite/tests/json-schema-draft-06/relative-pointer-array.json deleted file mode 100644 index f8726cdc0..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/relative-pointer-array.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": [2, 4, 6] } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/1", - "target": 4 - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/relative-pointer-escapes.json b/vendor/referencing-suite/tests/json-schema-draft-06/relative-pointer-escapes.json deleted file mode 100644 index d0c8e5ff3..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/relative-pointer-escapes.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { - "foo": { - "tilde~field": "bar", - "slash/field": "baz", - "percent%field": "quux" - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/tilde~0field", - "target": "bar" - }, - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/slash~1field", - "target": "baz" - }, - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/percent%25field", - "target": "quux" - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/relative-pointer-object.json b/vendor/referencing-suite/tests/json-schema-draft-06/relative-pointer-object.json deleted file mode 100644 index e5ccf194e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/relative-pointer-object.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": { "bar": { "baz": 12 } } } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/bar", - "target": { "baz": 12 } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/rfc3986-normalization-on-insertion.json b/vendor/referencing-suite/tests/json-schema-draft-06/rfc3986-normalization-on-insertion.json deleted file mode 100644 index 7f2263469..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/rfc3986-normalization-on-insertion.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "hTtP://example.com/case-insensitive-scheme": { "foo": "bar" }, - "http://exAmpLe.com/case-insensitive-host": { "baz": "quux" }, - "hTtP://exAmpLe.com/case-SENSITIVE-path": {}, - "http://example.com/escapes/a%c2%b1b": { "spam": "eggs" }, - "http://example.com/unreserved/%7Efoo": { "snap": "crackle" }, - "http://example.com:80/default/port": { "pop": 37 }, - "http://example.com/internal-ids": { - "definitions": { - "scheme": { - "$id": "hTtP://example.com/id/case-insensitive-scheme", - "foo": "bar" - }, - "host": { - "$id": "http://exAmpLe.com/id/case-insensitive-host", - "baz": "quux" - }, - "path": { - "$id": "hTtP://exAmpLe.com/id/case-SENSITIVE-path" - }, - "escapes": { - "$id": "http://example.com/id/escapes/a%c2%b1b", - "spam": "eggs" - }, - "unreserved": { - "$id": "http://example.com/id/unreserved/%7Efoo", - "snap": "crackle" - }, - "port": { - "$id": "http://example.com:80/id/default/port", - "pop": 37 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/case-insensitive-scheme", - "target": { "foo": "bar" } - }, - { - "ref": "http://example.com/case-insensitive-host", - "target": { "baz": "quux" } - }, - { - "ref": "http://example.com/case-sensitive-path", - "error": true - }, - { - "ref": "http://example.com/escapes/a%C2%B1b", - "target": { "spam": "eggs" } - }, - { - "ref": "http://example.com/unreserved/~foo", - "target": { "snap": "crackle" } - }, - { - "ref": "http://example.com/default/port", - "target": { "pop": 37 } - }, - { - "ref": "http://example.com/id/case-insensitive-scheme", - "target": { - "$id": "hTtP://example.com/id/case-insensitive-scheme", - "foo": "bar" - } - }, - { - "ref": "http://example.com/id/case-insensitive-host", - "target": { - "$id": "http://exAmpLe.com/id/case-insensitive-host", - "baz": "quux" - } - }, - { - "ref": "http://example.com/id/case-sensitive-path", - "error": true - }, - { - "ref": "http://example.com/id/escapes/a%C2%B1b", - "target": { - "$id": "http://example.com/id/escapes/a%c2%b1b", - "spam": "eggs" - } - }, - { - "ref": "http://example.com/id/unreserved/~foo", - "target": { - "$id": "http://example.com/id/unreserved/%7Efoo", - "snap": "crackle" - } - }, - { - "ref": "http://example.com/id/default/port", - "target": { - "$id": "http://example.com:80/id/default/port", - "pop": 37 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/rfc3986-normalization-on-retrieval.json b/vendor/referencing-suite/tests/json-schema-draft-06/rfc3986-normalization-on-retrieval.json deleted file mode 100644 index 6c0d04613..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/rfc3986-normalization-on-retrieval.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/case-insensitive-scheme": { "foo": "bar" }, - "http://example.com/case-insensitive-host": { "baz": "quux" }, - "http://example.com/case-sensitive-path": {}, - "http://example.com/escapes/a%C2%B1b": { "spam": "eggs" }, - "http://example.com/unreserved/~foo": { "snap": "crackle" }, - "http://example.com/default/port": { "pop": 37 }, - "http://example.com/internal-ids": { - "definitions": { - "scheme": { - "$id": "http://example.com/id/case-insensitive-scheme", - "foo": "bar" - }, - "host": { - "$id": "http://example.com/id/case-insensitive-host", - "baz": "quux" - }, - "path": { - "$id": "http://example.com/id/case-sensitive-path" - }, - "escapes": { - "$id": "http://example.com/id/escapes/a%C2%B1b", - "spam": "eggs" - }, - "unreserved": { - "$id": "http://example.com/id/unreserved/~foo", - "snap": "crackle" - }, - "port": { - "$id": "http://example.com/id/default/port", - "pop": 37 - } - } - } - }, - "tests": [ - { - "ref": "hTtP://example.com/case-insensitive-scheme", - "target": { "foo": "bar" } - }, - { - "ref": "http://exAmpLe.com/case-insensitive-host", - "target": { "baz": "quux" } - }, - { - "ref": "hTtP://exAmpLe.com/case-SENSITIVE-path", - "error": true - }, - { - "ref": "http://example.com/escapes/a%c2%b1b", - "target": { "spam": "eggs" } - }, - { - "ref": "http://example.com/unreserved/%7Efoo", - "target": { "snap": "crackle" } - }, - { - "ref": "http://example.com:80/default/port", - "target": { "pop": 37 } - }, - { - "ref": "hTtP://example.com/id/case-insensitive-scheme", - "target": { - "$id": "http://example.com/id/case-insensitive-scheme", - "foo": "bar" - } - }, - { - "ref": "http://exAmpLe.com/id/case-insensitive-host", - "target": { - "$id": "http://example.com/id/case-insensitive-host", - "baz": "quux" - } - }, - { - "ref": "hTtP://exAmpLe.com/id/case-SENSITIVE-path", - "error": true - }, - { - "ref": "http://example.com/id/escapes/a%c2%b1b", - "target": { - "$id": "http://example.com/id/escapes/a%C2%B1b", - "spam": "eggs" - } - }, - { - "ref": "http://example.com/id/unreserved/%7Efoo", - "target": { - "$id": "http://example.com/id/unreserved/~foo", - "snap": "crackle" - } - }, - { - "ref": "http://example.com:80/id/default/port", - "target": { - "$id": "http://example.com/id/default/port", - "pop": 37 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/tag-uris.json b/vendor/referencing-suite/tests/json-schema-draft-06/tag-uris.json deleted file mode 100644 index 164754a41..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/tag-uris.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": { - "definitions": { - "foo": { - "$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "definitions": { - "bar": { - "$id": "#baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "target": { - "$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "definitions": { - "bar": { - "$id": "#baz", - "quux": "eggs" - } - } - }, - "then": { - "ref": "#baz", - "target": { "$id": "#baz", "quux": "eggs" } - } - }, - { - "ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id", - "error": true, - "why": { - "summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.", - "specifications": [ - { - "rfc": 4151, - "section": "2.2", - "link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2" - } - ] - } - }, - { - "ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id", - "error": true, - "why": { - "summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.", - "specifications": [ - { - "rfc": 4151, - "section": "2.1", - "link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1" - } - ] - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-06/unknown-keyword.json b/vendor/referencing-suite/tests/json-schema-draft-06/unknown-keyword.json deleted file mode 100644 index e66bdcc8b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-06/unknown-keyword.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "unknownKeyword": { - "$id": "http://example.com/oh-hey-not-a-real-known-id", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-a-real-known-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/absolute-uri-empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-07/absolute-uri-empty-fragment.json deleted file mode 100644 index 6351edb54..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/absolute-uri-empty-fragment.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/foo#", - "foo": "bar" - } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { - "$id": "http://example.com/foo#", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/anchor.json b/vendor/referencing-suite/tests/json-schema-draft-07/anchor.json deleted file mode 100644 index a494a1d1b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/anchor.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "#foo", - "target": { - "$id": "#foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/bad-future-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-07/bad-future-anchor.json deleted file mode 100644 index cca6650e1..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/bad-future-anchor.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$anchor": "foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "#foo", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/boolean-schemas.json b/vendor/referencing-suite/tests/json-schema-draft-07/boolean-schemas.json deleted file mode 100644 index 2df8c3edf..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/boolean-schemas.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalItems": true, - "additionalProperties": true, - "contains": true, - "else": true, - "if": true, - "items": true, - "not": false, - "propertyNames": true, - "then": true, - "allOf": [true], - "anyOf": [true], - "oneOf": [true], - "definitions": { - "foo": true, - "bar": { "$id": "bar" } - }, - "dependencies": { "foo": true }, - "patternProperties": { "foo": true }, - "properties": { "foo": true } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "bar", - "target": { "$id": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-07/empty-fragment.json deleted file mode 100644 index 680015de9..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/empty-fragment.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": "bar" } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-uri-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-uri-anchor.json deleted file mode 100644 index ffe96fa18..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-uri-anchor.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "$id": "#foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-uri-empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-uri-empty-fragment.json deleted file mode 100644 index 1e2375bde..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-uri-empty-fragment.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo#": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-uri-with-different-id-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-uri-with-different-id-anchor.json deleted file mode 100644 index 13e8415f2..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-uri-with-different-id-anchor.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.org/internal", - "definitions": { - "foo": { - "$id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "$id": "#foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-uri.json b/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-uri.json deleted file mode 100644 index 209d97bbc..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-uri.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-urn-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-urn-anchor.json deleted file mode 100644 index 32efdf8ec..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-urn-anchor.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "urn:example:schema": { - "definitions": { - "foo": { - "$id": "#foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "urn:example:schema#foo", - "target": { - "$id": "#foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-urn.json b/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-urn.json deleted file mode 100644 index 170e0bcb8..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/external-absolute-urn.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "urn:example:schema": { "foo": "bar" } - }, - "tests": [ - { - "ref": "urn:example:schema", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/external-uri-with-nested-relative-uri-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-07/external-uri-with-nested-relative-uri-anchor.json deleted file mode 100644 index b59375207..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/external-uri-with-nested-relative-uri-anchor.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "foo", - "definitions": { - "spam": { - "$id": "#bar", - "baz": "quux" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/foo#bar", - "target": { - "$id": "#bar", - "baz": "quux" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/ignored-siblings.json b/vendor/referencing-suite/tests/json-schema-draft-07/ignored-siblings.json deleted file mode 100644 index 9e0d655c6..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/ignored-siblings.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/", - "allOf": [ - { - "$id": "ignored-id.json", - "$ref": "foo.json" - }, - { "$id": "foo.json" }, - { "$id": "ignored-id.json/foo.json" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/ignored-id.json", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/invalid-anchor-with-pointer.json b/vendor/referencing-suite/tests/json-schema-draft-07/invalid-anchor-with-pointer.json deleted file mode 100644 index 8c0724f34..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/invalid-anchor-with-pointer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "#foo", - "definitions": { - "bar": { "baz": "quux" } - } - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "#foo/definitions/bar", - "error": true - }, - { - "base_uri": "http://example.com/", - "ref": "#foo#/definitions/bar", - "error": true - }, - { - "ref": "http://example.com/#foo/definitions/bar", - "error": true - }, - { - "ref": "http://example.com#foo/definitions/bar", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-additionalItems.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-additionalItems.json deleted file mode 100644 index a2eba2974..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-additionalItems.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalItems": { - "$id": "http://example.com/oh-hey-an-additionalItems", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-additionalItems", - "target": { - "$id": "http://example.com/oh-hey-an-additionalItems", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-additionalProperties.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-additionalProperties.json deleted file mode 100644 index cf69a34fd..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-additionalProperties.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": { - "$id": "http://example.com/oh-hey-an-additionalProperties", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-additionalProperties", - "target": { - "$id": "http://example.com/oh-hey-an-additionalProperties", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-allOf.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-allOf.json deleted file mode 100644 index af3610516..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-allOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "allOf": [ - { "$id": "http://example.com/0", "title": "First!" }, - { "$id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-anyOf.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-anyOf.json deleted file mode 100644 index 41e2bea12..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-anyOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "anyOf": [ - { "$id": "http://example.com/0", "title": "First!" }, - { "$id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-contains.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-contains.json deleted file mode 100644 index bbd65e299..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-contains.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "contains": { - "$id": "http://example.com/oh-hey-a-contains", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-contains", - "target": { - "$id": "http://example.com/oh-hey-a-contains", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-definitions.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-definitions.json deleted file mode 100644 index d6533349b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-definitions.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-dependencies-array.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-dependencies-array.json deleted file mode 100644 index 0c6da196f..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-dependencies-array.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependencies": { "foo": ["bar"] } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-dependencies-object.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-dependencies-object.json deleted file mode 100644 index 3b8ffc1e3..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-dependencies-object.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependencies": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-else.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-else.json deleted file mode 100644 index 19330a358..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-else.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "else": { - "$id": "http://example.com/oh-hey-an-else", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-else", - "target": { - "$id": "http://example.com/oh-hey-an-else", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-if.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-if.json deleted file mode 100644 index 0d83cf98e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-if.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "if": { - "$id": "http://example.com/oh-hey-an-if", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-if", - "target": { - "$id": "http://example.com/oh-hey-an-if", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-items-array.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-items-array.json deleted file mode 100644 index 3e2b89904..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-items-array.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": [ - { "title": "First!" }, - { "$id": "http://example.com/0", "title": "Second!" }, - { "title": "Third!" }, - { "$id": "http://example.com/1", "title": "Fourth!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "Second!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Fourth!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-items-object.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-items-object.json deleted file mode 100644 index 20f7a5895..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-items-object.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": { - "$id": "http://example.com/oh-hey-an-items", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-items", - "target": { - "$id": "http://example.com/oh-hey-an-items", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-not.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-not.json deleted file mode 100644 index 09a7bd6dc..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-not.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "not": { - "$id": "http://example.com/oh-hey-a-not", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-not", - "target": { - "$id": "http://example.com/oh-hey-a-not", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-oneOf.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-oneOf.json deleted file mode 100644 index 2d6e5545b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-oneOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "oneOf": [ - { "$id": "http://example.com/0", "title": "First!" }, - { "$id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-patternProperties.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-patternProperties.json deleted file mode 100644 index 6f760f086..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-patternProperties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "patternProperties": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-properties.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-properties.json deleted file mode 100644 index c4bf8300e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-properties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "properties": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-propertyNames.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-propertyNames.json deleted file mode 100644 index 785130556..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-propertyNames.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "propertyNames": { - "$id": "http://example.com/oh-hey-a-propertyNames", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-propertyNames", - "target": { - "$id": "http://example.com/oh-hey-a-propertyNames", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-then.json b/vendor/referencing-suite/tests/json-schema-draft-07/keywords-then.json deleted file mode 100644 index f24385096..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/keywords-then.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "then": { - "$id": "http://example.com/oh-hey-a-then", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-then", - "target": { - "$id": "http://example.com/oh-hey-a-then", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/multiple-lookup-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-07/multiple-lookup-anchor.json deleted file mode 100644 index 959f83a91..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/multiple-lookup-anchor.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { "$id": "#foo", "bar": "baz" } - } - } - }, - "tests": [ - { - "ref": "http://example.com/", - "target": { "definitions": { "foo": { "$id": "#foo", "bar": "baz" } } }, - "then": { - "ref": "#foo", - "target": { "$id": "#foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/multiple-lookup-external-absolute-uri-with-different-id-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-07/multiple-lookup-external-absolute-uri-with-different-id-anchor.json deleted file mode 100644 index 88538f9bf..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/multiple-lookup-external-absolute-uri-with-different-id-anchor.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "http://example.org/foo", - "definitions": { - "bar": { - "$id": "#baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/definitions/foo", - "target": { - "$id": "http://example.org/foo", - "definitions": { "bar": { "$id": "#baz", "quux": "eggs" } } - }, - "then": { - "ref": "#baz", - "target": { "$id": "#baz", "quux": "eggs" } - } - }, - { - "ref": "http://example.com/#/definitions/foo", - "target": { - "$id": "http://example.org/foo", - "definitions": { "bar": { "$id": "#baz", "quux": "eggs" } } - }, - "then": { - "ref": "http://example.org/foo#baz", - "target": { "$id": "#baz", "quux": "eggs" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/multiple-lookup-pointer.json b/vendor/referencing-suite/tests/json-schema-draft-07/multiple-lookup-pointer.json deleted file mode 100644 index d7adb4ae8..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/multiple-lookup-pointer.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": {}, - "http://example.com/foo/": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo/", - "target": { "foo": "bar" }, - "then": { - "ref": "#/foo", - "target": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/multiple-lookup.json b/vendor/referencing-suite/tests/json-schema-draft-07/multiple-lookup.json deleted file mode 100644 index a5c30f012..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/multiple-lookup.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": {}, - "http://example.com/foo/": { "foo": "bar" }, - "http://example.com/foo/bar": { "baz": "quux" } - }, - "tests": [ - { - "ref": "http://example.com/", - "target": {}, - "then": { - "ref": "foo/", - "target": { "foo": "bar" }, - "then": { - "ref": "bar", - "target": { "baz": "quux" } - } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/nested-absolute-id.json b/vendor/referencing-suite/tests/json-schema-draft-07/nested-absolute-id.json deleted file mode 100644 index 4029448b0..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/nested-absolute-id.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/", - "definitions": { - "foo": { - "$id": "http://example.com/nested", - "definitions": { - "inner": { "foo": "bar" } - } - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/nested", - "ref": "#/definitions/inner", - "target": { "foo": "bar" } - }, - { - "base_uri": "http://example.com/", - "ref": "nested", - "target": { - "$id": "http://example.com/nested", - "definitions": { - "inner": { "foo": "bar" } - } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/nested-relative-id-only-retrieval-uri.json b/vendor/referencing-suite/tests/json-schema-draft-07/nested-relative-id-only-retrieval-uri.json deleted file mode 100644 index c6a6419ef..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/nested-relative-id-only-retrieval-uri.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "foo": { - "$id": "nested.json", - "title": "Hi!" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/nested.json", - "target": { "$id": "nested.json", "title": "Hi!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/nested-relative-id.json b/vendor/referencing-suite/tests/json-schema-draft-07/nested-relative-id.json deleted file mode 100644 index 0a721d8ec..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/nested-relative-id.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/", - "definitions": { - "foo": { - "$id": "nested.json", - "title": "Hi!" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/nested.json", - "target": { "$id": "nested.json", "title": "Hi!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/nonreferencing-keywords-const.json b/vendor/referencing-suite/tests/json-schema-draft-07/nonreferencing-keywords-const.json deleted file mode 100644 index 1193e30ba..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/nonreferencing-keywords-const.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "const": { "$id": "http://example.com/oh-hey-not-an-id" } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/nonreferencing-keywords-default.json b/vendor/referencing-suite/tests/json-schema-draft-07/nonreferencing-keywords-default.json deleted file mode 100644 index bf65b3173..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/nonreferencing-keywords-default.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "default": { "$id": "http://example.com/oh-hey-not-an-id" } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/nonreferencing-keywords-enum.json b/vendor/referencing-suite/tests/json-schema-draft-07/nonreferencing-keywords-enum.json deleted file mode 100644 index 669414925..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/nonreferencing-keywords-enum.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "enum": [{ "$id": "http://example.com/oh-hey-not-an-id" }] - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/nonreferencing-keywords-examples.json b/vendor/referencing-suite/tests/json-schema-draft-07/nonreferencing-keywords-examples.json deleted file mode 100644 index e509f3d34..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/nonreferencing-keywords-examples.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "examples": [{ "$id": "http://example.com/oh-hey-not-an-id" }] - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-id-in-dependencies-object.json b/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-id-in-dependencies-object.json deleted file mode 100644 index 7c8dc4a04..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-id-in-dependencies-object.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependencies": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "definitions": { - "$id": {}, - "foo": { - "$id": "foo", - "bar": "baz" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/dependencies/foo/definitions/foo", - "target": { "$id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "$id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-id-in-items-array.json b/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-id-in-items-array.json deleted file mode 100644 index 3678e7129..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-id-in-items-array.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": [ - { - "$id": "http://example.com/oh-hey-an-items", - "definitions": { - "$id": {}, - "foo": { - "$id": "foo", - "bar": "baz" - } - } - } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/#/items/0/definitions/foo", - "target": { "$id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "$id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-id-in-items-object.json b/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-id-in-items-object.json deleted file mode 100644 index 033240871..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-id-in-items-object.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": { - "$id": "http://example.com/oh-hey-an-items", - "definitions": { - "$id": {}, - "foo": { - "$id": "foo", - "bar": "baz" - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/items/definitions/foo", - "target": { "$id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "$id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-non-keyword-id-in-subvalue.json b/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-non-keyword-id-in-subvalue.json deleted file mode 100644 index fd3d4f18c..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-non-keyword-id-in-subvalue.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "definitions": { - "$id": { "type": "string" }, - "foo": { "bar": "baz" } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/definitions/foo", - "target": { "bar": "baz" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-non-keyword-id.json b/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-non-keyword-id.json deleted file mode 100644 index aae846eab..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/pointer-crossing-non-keyword-id.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": { - "definitions": { - "$id": { "type": "string" }, - "foo": { "bar": "baz" } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/additionalProperties/definitions/foo", - "target": { "bar": "baz" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/relative-pointer-array.json b/vendor/referencing-suite/tests/json-schema-draft-07/relative-pointer-array.json deleted file mode 100644 index f8726cdc0..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/relative-pointer-array.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": [2, 4, 6] } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/1", - "target": 4 - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/relative-pointer-escapes.json b/vendor/referencing-suite/tests/json-schema-draft-07/relative-pointer-escapes.json deleted file mode 100644 index d0c8e5ff3..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/relative-pointer-escapes.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { - "foo": { - "tilde~field": "bar", - "slash/field": "baz", - "percent%field": "quux" - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/tilde~0field", - "target": "bar" - }, - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/slash~1field", - "target": "baz" - }, - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/percent%25field", - "target": "quux" - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/relative-pointer-object.json b/vendor/referencing-suite/tests/json-schema-draft-07/relative-pointer-object.json deleted file mode 100644 index e5ccf194e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/relative-pointer-object.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": { "bar": { "baz": 12 } } } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/bar", - "target": { "baz": 12 } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/rfc3986-normalization-on-insertion.json b/vendor/referencing-suite/tests/json-schema-draft-07/rfc3986-normalization-on-insertion.json deleted file mode 100644 index 7f2263469..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/rfc3986-normalization-on-insertion.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "hTtP://example.com/case-insensitive-scheme": { "foo": "bar" }, - "http://exAmpLe.com/case-insensitive-host": { "baz": "quux" }, - "hTtP://exAmpLe.com/case-SENSITIVE-path": {}, - "http://example.com/escapes/a%c2%b1b": { "spam": "eggs" }, - "http://example.com/unreserved/%7Efoo": { "snap": "crackle" }, - "http://example.com:80/default/port": { "pop": 37 }, - "http://example.com/internal-ids": { - "definitions": { - "scheme": { - "$id": "hTtP://example.com/id/case-insensitive-scheme", - "foo": "bar" - }, - "host": { - "$id": "http://exAmpLe.com/id/case-insensitive-host", - "baz": "quux" - }, - "path": { - "$id": "hTtP://exAmpLe.com/id/case-SENSITIVE-path" - }, - "escapes": { - "$id": "http://example.com/id/escapes/a%c2%b1b", - "spam": "eggs" - }, - "unreserved": { - "$id": "http://example.com/id/unreserved/%7Efoo", - "snap": "crackle" - }, - "port": { - "$id": "http://example.com:80/id/default/port", - "pop": 37 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/case-insensitive-scheme", - "target": { "foo": "bar" } - }, - { - "ref": "http://example.com/case-insensitive-host", - "target": { "baz": "quux" } - }, - { - "ref": "http://example.com/case-sensitive-path", - "error": true - }, - { - "ref": "http://example.com/escapes/a%C2%B1b", - "target": { "spam": "eggs" } - }, - { - "ref": "http://example.com/unreserved/~foo", - "target": { "snap": "crackle" } - }, - { - "ref": "http://example.com/default/port", - "target": { "pop": 37 } - }, - { - "ref": "http://example.com/id/case-insensitive-scheme", - "target": { - "$id": "hTtP://example.com/id/case-insensitive-scheme", - "foo": "bar" - } - }, - { - "ref": "http://example.com/id/case-insensitive-host", - "target": { - "$id": "http://exAmpLe.com/id/case-insensitive-host", - "baz": "quux" - } - }, - { - "ref": "http://example.com/id/case-sensitive-path", - "error": true - }, - { - "ref": "http://example.com/id/escapes/a%C2%B1b", - "target": { - "$id": "http://example.com/id/escapes/a%c2%b1b", - "spam": "eggs" - } - }, - { - "ref": "http://example.com/id/unreserved/~foo", - "target": { - "$id": "http://example.com/id/unreserved/%7Efoo", - "snap": "crackle" - } - }, - { - "ref": "http://example.com/id/default/port", - "target": { - "$id": "http://example.com:80/id/default/port", - "pop": 37 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/rfc3986-normalization-on-retrieval.json b/vendor/referencing-suite/tests/json-schema-draft-07/rfc3986-normalization-on-retrieval.json deleted file mode 100644 index 6c0d04613..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/rfc3986-normalization-on-retrieval.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/case-insensitive-scheme": { "foo": "bar" }, - "http://example.com/case-insensitive-host": { "baz": "quux" }, - "http://example.com/case-sensitive-path": {}, - "http://example.com/escapes/a%C2%B1b": { "spam": "eggs" }, - "http://example.com/unreserved/~foo": { "snap": "crackle" }, - "http://example.com/default/port": { "pop": 37 }, - "http://example.com/internal-ids": { - "definitions": { - "scheme": { - "$id": "http://example.com/id/case-insensitive-scheme", - "foo": "bar" - }, - "host": { - "$id": "http://example.com/id/case-insensitive-host", - "baz": "quux" - }, - "path": { - "$id": "http://example.com/id/case-sensitive-path" - }, - "escapes": { - "$id": "http://example.com/id/escapes/a%C2%B1b", - "spam": "eggs" - }, - "unreserved": { - "$id": "http://example.com/id/unreserved/~foo", - "snap": "crackle" - }, - "port": { - "$id": "http://example.com/id/default/port", - "pop": 37 - } - } - } - }, - "tests": [ - { - "ref": "hTtP://example.com/case-insensitive-scheme", - "target": { "foo": "bar" } - }, - { - "ref": "http://exAmpLe.com/case-insensitive-host", - "target": { "baz": "quux" } - }, - { - "ref": "hTtP://exAmpLe.com/case-SENSITIVE-path", - "error": true - }, - { - "ref": "http://example.com/escapes/a%c2%b1b", - "target": { "spam": "eggs" } - }, - { - "ref": "http://example.com/unreserved/%7Efoo", - "target": { "snap": "crackle" } - }, - { - "ref": "http://example.com:80/default/port", - "target": { "pop": 37 } - }, - { - "ref": "hTtP://example.com/id/case-insensitive-scheme", - "target": { - "$id": "http://example.com/id/case-insensitive-scheme", - "foo": "bar" - } - }, - { - "ref": "http://exAmpLe.com/id/case-insensitive-host", - "target": { - "$id": "http://example.com/id/case-insensitive-host", - "baz": "quux" - } - }, - { - "ref": "hTtP://exAmpLe.com/id/case-SENSITIVE-path", - "error": true - }, - { - "ref": "http://example.com/id/escapes/a%c2%b1b", - "target": { - "$id": "http://example.com/id/escapes/a%C2%B1b", - "spam": "eggs" - } - }, - { - "ref": "http://example.com/id/unreserved/%7Efoo", - "target": { - "$id": "http://example.com/id/unreserved/~foo", - "snap": "crackle" - } - }, - { - "ref": "http://example.com:80/id/default/port", - "target": { - "$id": "http://example.com/id/default/port", - "pop": 37 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/tag-uris.json b/vendor/referencing-suite/tests/json-schema-draft-07/tag-uris.json deleted file mode 100644 index 164754a41..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/tag-uris.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": { - "definitions": { - "foo": { - "$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "definitions": { - "bar": { - "$id": "#baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "target": { - "$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "definitions": { - "bar": { - "$id": "#baz", - "quux": "eggs" - } - } - }, - "then": { - "ref": "#baz", - "target": { "$id": "#baz", "quux": "eggs" } - } - }, - { - "ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id", - "error": true, - "why": { - "summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.", - "specifications": [ - { - "rfc": 4151, - "section": "2.2", - "link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2" - } - ] - } - }, - { - "ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id", - "error": true, - "why": { - "summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.", - "specifications": [ - { - "rfc": 4151, - "section": "2.1", - "link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1" - } - ] - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-07/unknown-keyword.json b/vendor/referencing-suite/tests/json-schema-draft-07/unknown-keyword.json deleted file mode 100644 index e66bdcc8b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-07/unknown-keyword.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "unknownKeyword": { - "$id": "http://example.com/oh-hey-not-a-real-known-id", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-a-real-known-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/absolute-uri-empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/absolute-uri-empty-fragment.json deleted file mode 100644 index 6351edb54..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/absolute-uri-empty-fragment.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/foo#", - "foo": "bar" - } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { - "$id": "http://example.com/foo#", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/anchor.json deleted file mode 100644 index cdd37fe7d..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/anchor.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$anchor": "foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "#foo", - "target": { - "$anchor": "foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/boolean-schemas.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/boolean-schemas.json deleted file mode 100644 index 3155f38dc..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/boolean-schemas.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalItems": true, - "additionalProperties": true, - "contains": true, - "contentSchema": true, - "else": true, - "if": true, - "items": true, - "not": false, - "propertyNames": true, - "then": true, - "unevaluatedItems": true, - "unevaluatedProperties": true, - "allOf": [true], - "anyOf": [true], - "oneOf": [true], - "$defs": { - "foo": true, - "bar": { "$id": "bar" } - }, - "dependentSchemas": { "foo": true }, - "patternProperties": { "foo": true }, - "properties": { "foo": true } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "bar", - "target": { "$id": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/empty-fragment.json deleted file mode 100644 index 680015de9..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/empty-fragment.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": "bar" } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-uri-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-uri-anchor.json deleted file mode 100644 index 6ae642cef..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-uri-anchor.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$anchor": "foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "$anchor": "foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-uri-empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-uri-empty-fragment.json deleted file mode 100644 index 1e2375bde..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-uri-empty-fragment.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo#": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-uri-with-different-id-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-uri-with-different-id-anchor.json deleted file mode 100644 index 3a00635d3..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-uri-with-different-id-anchor.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.org/internal", - "$defs": { - "foo": { - "$anchor": "foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "$anchor": "foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-uri.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-uri.json deleted file mode 100644 index 209d97bbc..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-uri.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-urn-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-urn-anchor.json deleted file mode 100644 index d70cd3f8d..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-urn-anchor.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "urn:example:schema": { - "$defs": { - "foo": { - "$anchor": "foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "urn:example:schema#foo", - "target": { - "$anchor": "foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-urn.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-urn.json deleted file mode 100644 index 170e0bcb8..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-absolute-urn.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "urn:example:schema": { "foo": "bar" } - }, - "tests": [ - { - "ref": "urn:example:schema", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-uri-with-nested-relative-uri-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-uri-with-nested-relative-uri-anchor.json deleted file mode 100644 index 6795c1007..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/external-uri-with-nested-relative-uri-anchor.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$id": "foo", - "$defs": { - "spam": { - "$anchor": "bar", - "baz": "quux" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/foo#bar", - "target": { - "$anchor": "bar", - "baz": "quux" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/invalid-anchor-with-pointer.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/invalid-anchor-with-pointer.json deleted file mode 100644 index 3b1025fd2..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/invalid-anchor-with-pointer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$anchor": "foo", - "$defs": { - "bar": { "baz": "quux" } - } - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "#foo/$defs/bar", - "error": true - }, - { - "base_uri": "http://example.com/", - "ref": "#foo#/$defs/bar", - "error": true - }, - { - "ref": "http://example.com/#foo/$defs/bar", - "error": true - }, - { - "ref": "http://example.com#foo/$defs/bar", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-additionalItems.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-additionalItems.json deleted file mode 100644 index a2eba2974..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-additionalItems.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalItems": { - "$id": "http://example.com/oh-hey-an-additionalItems", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-additionalItems", - "target": { - "$id": "http://example.com/oh-hey-an-additionalItems", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-additionalProperties.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-additionalProperties.json deleted file mode 100644 index cf69a34fd..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-additionalProperties.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": { - "$id": "http://example.com/oh-hey-an-additionalProperties", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-additionalProperties", - "target": { - "$id": "http://example.com/oh-hey-an-additionalProperties", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-allOf.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-allOf.json deleted file mode 100644 index af3610516..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-allOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "allOf": [ - { "$id": "http://example.com/0", "title": "First!" }, - { "$id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-anyOf.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-anyOf.json deleted file mode 100644 index 41e2bea12..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-anyOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "anyOf": [ - { "$id": "http://example.com/0", "title": "First!" }, - { "$id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-contains.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-contains.json deleted file mode 100644 index bbd65e299..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-contains.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "contains": { - "$id": "http://example.com/oh-hey-a-contains", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-contains", - "target": { - "$id": "http://example.com/oh-hey-a-contains", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-contentSchema.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-contentSchema.json deleted file mode 100644 index dc4af7400..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-contentSchema.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "contentMediaType": "image/png", - "contentSchema": { - "$id": "http://example.com/oh-hey-a-contentSchema", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-contentSchema", - "target": { - "$id": "http://example.com/oh-hey-a-contentSchema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-defs.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-defs.json deleted file mode 100644 index 3dde1a355..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-defs.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-dependentSchemas.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-dependentSchemas.json deleted file mode 100644 index 284415e9d..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-dependentSchemas.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependentSchemas": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-else.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-else.json deleted file mode 100644 index 19330a358..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-else.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "else": { - "$id": "http://example.com/oh-hey-an-else", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-else", - "target": { - "$id": "http://example.com/oh-hey-an-else", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-if.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-if.json deleted file mode 100644 index 0d83cf98e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-if.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "if": { - "$id": "http://example.com/oh-hey-an-if", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-if", - "target": { - "$id": "http://example.com/oh-hey-an-if", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-items-array.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-items-array.json deleted file mode 100644 index 3e2b89904..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-items-array.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": [ - { "title": "First!" }, - { "$id": "http://example.com/0", "title": "Second!" }, - { "title": "Third!" }, - { "$id": "http://example.com/1", "title": "Fourth!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "Second!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Fourth!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-items-object.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-items-object.json deleted file mode 100644 index 20f7a5895..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-items-object.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": { - "$id": "http://example.com/oh-hey-an-items", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-items", - "target": { - "$id": "http://example.com/oh-hey-an-items", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-not.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-not.json deleted file mode 100644 index 09a7bd6dc..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-not.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "not": { - "$id": "http://example.com/oh-hey-a-not", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-not", - "target": { - "$id": "http://example.com/oh-hey-a-not", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-oneOf.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-oneOf.json deleted file mode 100644 index 2d6e5545b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-oneOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "oneOf": [ - { "$id": "http://example.com/0", "title": "First!" }, - { "$id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-patternProperties.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-patternProperties.json deleted file mode 100644 index 6f760f086..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-patternProperties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "patternProperties": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-properties.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-properties.json deleted file mode 100644 index c4bf8300e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-properties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "properties": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-propertyNames.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-propertyNames.json deleted file mode 100644 index 785130556..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-propertyNames.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "propertyNames": { - "$id": "http://example.com/oh-hey-a-propertyNames", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-propertyNames", - "target": { - "$id": "http://example.com/oh-hey-a-propertyNames", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-then.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-then.json deleted file mode 100644 index f24385096..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-then.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "then": { - "$id": "http://example.com/oh-hey-a-then", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-then", - "target": { - "$id": "http://example.com/oh-hey-a-then", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-unevaluatedItems.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-unevaluatedItems.json deleted file mode 100644 index 7d8109407..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-unevaluatedItems.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "unevaluatedItems": { - "$id": "http://example.com/oh-hey-an-unevaluatedItems", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-unevaluatedItems", - "target": { - "$id": "http://example.com/oh-hey-an-unevaluatedItems", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-unevaluatedProperties.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-unevaluatedProperties.json deleted file mode 100644 index 5702334da..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/keywords-unevaluatedProperties.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "unevaluatedProperties": { - "$id": "http://example.com/oh-hey-an-unevaluatedProperties", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-unevaluatedProperties", - "target": { - "$id": "http://example.com/oh-hey-an-unevaluatedProperties", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/multiple-lookup-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/multiple-lookup-anchor.json deleted file mode 100644 index 4a95c0e63..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/multiple-lookup-anchor.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { "$anchor": "foo", "bar": "baz" } - } - } - }, - "tests": [ - { - "ref": "http://example.com/", - "target": { "$defs": { "foo": { "$anchor": "foo", "bar": "baz" } } }, - "then": { - "ref": "#foo", - "target": { "$anchor": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/multiple-lookup-external-absolute-uri-with-different-id-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/multiple-lookup-external-absolute-uri-with-different-id-anchor.json deleted file mode 100644 index 768e74909..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/multiple-lookup-external-absolute-uri-with-different-id-anchor.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$id": "http://example.org/foo", - "$defs": { - "bar": { - "$anchor": "baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/$defs/foo", - "target": { - "$id": "http://example.org/foo", - "$defs": { "bar": { "$anchor": "baz", "quux": "eggs" } } - }, - "then": { - "ref": "#baz", - "target": { "$anchor": "baz", "quux": "eggs" } - } - }, - { - "ref": "http://example.com/#/$defs/foo", - "target": { - "$id": "http://example.org/foo", - "$defs": { "bar": { "$anchor": "baz", "quux": "eggs" } } - }, - "then": { - "ref": "http://example.org/foo#baz", - "target": { "$anchor": "baz", "quux": "eggs" } - } - }, - { - "ref": "http://example.com/#baz", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/multiple-lookup-pointer.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/multiple-lookup-pointer.json deleted file mode 100644 index d7adb4ae8..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/multiple-lookup-pointer.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": {}, - "http://example.com/foo/": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo/", - "target": { "foo": "bar" }, - "then": { - "ref": "#/foo", - "target": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/multiple-lookup.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/multiple-lookup.json deleted file mode 100644 index a5c30f012..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/multiple-lookup.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": {}, - "http://example.com/foo/": { "foo": "bar" }, - "http://example.com/foo/bar": { "baz": "quux" } - }, - "tests": [ - { - "ref": "http://example.com/", - "target": {}, - "then": { - "ref": "foo/", - "target": { "foo": "bar" }, - "then": { - "ref": "bar", - "target": { "baz": "quux" } - } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nested-absolute-id.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/nested-absolute-id.json deleted file mode 100644 index b9c03d216..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nested-absolute-id.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/", - "$defs": { - "foo": { - "$id": "http://example.com/nested", - "$defs": { - "inner": { "foo": "bar" } - } - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/nested", - "ref": "#/$defs/inner", - "target": { "foo": "bar" } - }, - { - "base_uri": "http://example.com/", - "ref": "nested", - "target": { - "$id": "http://example.com/nested", - "$defs": { - "inner": { "foo": "bar" } - } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nested-relative-id-only-retrieval-uri.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/nested-relative-id-only-retrieval-uri.json deleted file mode 100644 index 6a291f191..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nested-relative-id-only-retrieval-uri.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$id": "nested.json", - "title": "Hi!" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/nested.json", - "target": { "$id": "nested.json", "title": "Hi!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nested-relative-id.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/nested-relative-id.json deleted file mode 100644 index 39d4ff05e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nested-relative-id.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/", - "$defs": { - "foo": { - "$id": "nested.json", - "title": "Hi!" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/nested.json", - "target": { "$id": "nested.json", "title": "Hi!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-const.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-const.json deleted file mode 100644 index 1193e30ba..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-const.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "const": { "$id": "http://example.com/oh-hey-not-an-id" } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-default.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-default.json deleted file mode 100644 index bf65b3173..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-default.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "default": { "$id": "http://example.com/oh-hey-not-an-id" } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-enum.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-enum.json deleted file mode 100644 index 669414925..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-enum.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "enum": [{ "$id": "http://example.com/oh-hey-not-an-id" }] - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-examples.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-examples.json deleted file mode 100644 index e509f3d34..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/nonreferencing-keywords-examples.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "examples": [{ "$id": "http://example.com/oh-hey-not-an-id" }] - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/pointer-crossing-id-in-items-array.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/pointer-crossing-id-in-items-array.json deleted file mode 100644 index 3bc746268..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/pointer-crossing-id-in-items-array.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": [ - { - "$id": "http://example.com/oh-hey-an-items", - "$defs": { - "$id": {}, - "foo": { - "$id": "foo", - "bar": "baz" - } - } - } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/#/items/0/$defs/foo", - "target": { "$id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "$id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/pointer-crossing-id-in-items-object.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/pointer-crossing-id-in-items-object.json deleted file mode 100644 index ca81f8a79..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/pointer-crossing-id-in-items-object.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": { - "$id": "http://example.com/oh-hey-an-items", - "$defs": { - "$id": {}, - "foo": { - "$id": "foo", - "bar": "baz" - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/items/$defs/foo", - "target": { "$id": "foo", "bar": "baz" }, - "then": { - "ref": "#", - "target": { "$id": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/pointer-crossing-non-keyword-id-in-subvalue.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/pointer-crossing-non-keyword-id-in-subvalue.json deleted file mode 100644 index a99f0d66a..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/pointer-crossing-non-keyword-id-in-subvalue.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "$id": { "type": "string" }, - "foo": { "bar": "baz" } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/$defs/foo", - "target": { "bar": "baz" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/pointer-crossing-non-keyword-id.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/pointer-crossing-non-keyword-id.json deleted file mode 100644 index aef55ef92..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/pointer-crossing-non-keyword-id.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": { - "$defs": { - "$id": { "type": "string" }, - "foo": { "bar": "baz" } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/additionalProperties/$defs/foo", - "target": { "bar": "baz" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/relative-pointer-array.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/relative-pointer-array.json deleted file mode 100644 index f8726cdc0..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/relative-pointer-array.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": [2, 4, 6] } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/1", - "target": 4 - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/relative-pointer-escapes.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/relative-pointer-escapes.json deleted file mode 100644 index d0c8e5ff3..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/relative-pointer-escapes.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { - "foo": { - "tilde~field": "bar", - "slash/field": "baz", - "percent%field": "quux" - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/tilde~0field", - "target": "bar" - }, - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/slash~1field", - "target": "baz" - }, - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/percent%25field", - "target": "quux" - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/relative-pointer-object.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/relative-pointer-object.json deleted file mode 100644 index e5ccf194e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/relative-pointer-object.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": { "bar": { "baz": 12 } } } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/bar", - "target": { "baz": 12 } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/rfc3986-normalization-on-insertion.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/rfc3986-normalization-on-insertion.json deleted file mode 100644 index f4fed6975..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/rfc3986-normalization-on-insertion.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "hTtP://example.com/case-insensitive-scheme": { "foo": "bar" }, - "http://exAmpLe.com/case-insensitive-host": { "baz": "quux" }, - "hTtP://exAmpLe.com/case-SENSITIVE-path": {}, - "http://example.com/escapes/a%c2%b1b": { "spam": "eggs" }, - "http://example.com/unreserved/%7Efoo": { "snap": "crackle" }, - "http://example.com:80/default/port": { "pop": 37 }, - "http://example.com/internal-ids": { - "$defs": { - "scheme": { - "$id": "hTtP://example.com/id/case-insensitive-scheme", - "foo": "bar" - }, - "host": { - "$id": "http://exAmpLe.com/id/case-insensitive-host", - "baz": "quux" - }, - "path": { - "$id": "hTtP://exAmpLe.com/id/case-SENSITIVE-path" - }, - "escapes": { - "$id": "http://example.com/id/escapes/a%c2%b1b", - "spam": "eggs" - }, - "unreserved": { - "$id": "http://example.com/id/unreserved/%7Efoo", - "snap": "crackle" - }, - "port": { - "$id": "http://example.com:80/id/default/port", - "pop": 37 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/case-insensitive-scheme", - "target": { "foo": "bar" } - }, - { - "ref": "http://example.com/case-insensitive-host", - "target": { "baz": "quux" } - }, - { - "ref": "http://example.com/case-sensitive-path", - "error": true - }, - { - "ref": "http://example.com/escapes/a%C2%B1b", - "target": { "spam": "eggs" } - }, - { - "ref": "http://example.com/unreserved/~foo", - "target": { "snap": "crackle" } - }, - { - "ref": "http://example.com/default/port", - "target": { "pop": 37 } - }, - { - "ref": "http://example.com/id/case-insensitive-scheme", - "target": { - "$id": "hTtP://example.com/id/case-insensitive-scheme", - "foo": "bar" - } - }, - { - "ref": "http://example.com/id/case-insensitive-host", - "target": { - "$id": "http://exAmpLe.com/id/case-insensitive-host", - "baz": "quux" - } - }, - { - "ref": "http://example.com/id/case-sensitive-path", - "error": true - }, - { - "ref": "http://example.com/id/escapes/a%C2%B1b", - "target": { - "$id": "http://example.com/id/escapes/a%c2%b1b", - "spam": "eggs" - } - }, - { - "ref": "http://example.com/id/unreserved/~foo", - "target": { - "$id": "http://example.com/id/unreserved/%7Efoo", - "snap": "crackle" - } - }, - { - "ref": "http://example.com/id/default/port", - "target": { - "$id": "http://example.com:80/id/default/port", - "pop": 37 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/rfc3986-normalization-on-retrieval.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/rfc3986-normalization-on-retrieval.json deleted file mode 100644 index f45c390c9..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/rfc3986-normalization-on-retrieval.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/case-insensitive-scheme": { "foo": "bar" }, - "http://example.com/case-insensitive-host": { "baz": "quux" }, - "http://example.com/case-sensitive-path": {}, - "http://example.com/escapes/a%C2%B1b": { "spam": "eggs" }, - "http://example.com/unreserved/~foo": { "snap": "crackle" }, - "http://example.com/default/port": { "pop": 37 }, - "http://example.com/internal-ids": { - "$defs": { - "scheme": { - "$id": "http://example.com/id/case-insensitive-scheme", - "foo": "bar" - }, - "host": { - "$id": "http://example.com/id/case-insensitive-host", - "baz": "quux" - }, - "path": { - "$id": "http://example.com/id/case-sensitive-path" - }, - "escapes": { - "$id": "http://example.com/id/escapes/a%C2%B1b", - "spam": "eggs" - }, - "unreserved": { - "$id": "http://example.com/id/unreserved/~foo", - "snap": "crackle" - }, - "port": { - "$id": "http://example.com/id/default/port", - "pop": 37 - } - } - } - }, - "tests": [ - { - "ref": "hTtP://example.com/case-insensitive-scheme", - "target": { "foo": "bar" } - }, - { - "ref": "http://exAmpLe.com/case-insensitive-host", - "target": { "baz": "quux" } - }, - { - "ref": "hTtP://exAmpLe.com/case-SENSITIVE-path", - "error": true - }, - { - "ref": "http://example.com/escapes/a%c2%b1b", - "target": { "spam": "eggs" } - }, - { - "ref": "http://example.com/unreserved/%7Efoo", - "target": { "snap": "crackle" } - }, - { - "ref": "http://example.com:80/default/port", - "target": { "pop": 37 } - }, - { - "ref": "hTtP://example.com/id/case-insensitive-scheme", - "target": { - "$id": "http://example.com/id/case-insensitive-scheme", - "foo": "bar" - } - }, - { - "ref": "http://exAmpLe.com/id/case-insensitive-host", - "target": { - "$id": "http://example.com/id/case-insensitive-host", - "baz": "quux" - } - }, - { - "ref": "hTtP://exAmpLe.com/id/case-SENSITIVE-path", - "error": true - }, - { - "ref": "http://example.com/id/escapes/a%c2%b1b", - "target": { - "$id": "http://example.com/id/escapes/a%C2%B1b", - "spam": "eggs" - } - }, - { - "ref": "http://example.com/id/unreserved/%7Efoo", - "target": { - "$id": "http://example.com/id/unreserved/~foo", - "snap": "crackle" - } - }, - { - "ref": "http://example.com:80/id/default/port", - "target": { - "$id": "http://example.com/id/default/port", - "pop": 37 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/tag-uris.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/tag-uris.json deleted file mode 100644 index 03084243d..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/tag-uris.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": { - "$defs": { - "foo": { - "$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "$defs": { - "bar": { - "$anchor": "baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "target": { - "$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "$defs": { - "bar": { - "$anchor": "baz", - "quux": "eggs" - } - } - }, - "then": { - "ref": "#baz", - "target": { "$anchor": "baz", "quux": "eggs" } - } - }, - { - "ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id", - "error": true, - "why": { - "summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.", - "specifications": [ - { - "rfc": 4151, - "section": "2.2", - "link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2" - } - ] - } - }, - { - "ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id", - "error": true, - "why": { - "summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.", - "specifications": [ - { - "rfc": 4151, - "section": "2.1", - "link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1" - } - ] - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/unignored-siblings.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/unignored-siblings.json deleted file mode 100644 index d66afd0fb..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/unignored-siblings.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/", - "allOf": [ - { - "$id": "not-ignored-id.json", - "$ref": "foo.json" - }, - { "$id": "foo.json" }, - { "$id": "not-ignored-id.json/foo.json" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/not-ignored-id.json", - "target": { "$id": "not-ignored-id.json", "$ref": "foo.json" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2019-09/unknown-keyword.json b/vendor/referencing-suite/tests/json-schema-draft-2019-09/unknown-keyword.json deleted file mode 100644 index e66bdcc8b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2019-09/unknown-keyword.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "unknownKeyword": { - "$id": "http://example.com/oh-hey-not-a-real-known-id", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-a-real-known-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/absolute-uri-empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/absolute-uri-empty-fragment.json deleted file mode 100644 index 6351edb54..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/absolute-uri-empty-fragment.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/foo#", - "foo": "bar" - } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { - "$id": "http://example.com/foo#", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/anchor.json deleted file mode 100644 index cdd37fe7d..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/anchor.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$anchor": "foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "#foo", - "target": { - "$anchor": "foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/boolean-schemas.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/boolean-schemas.json deleted file mode 100644 index cdcaccf30..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/boolean-schemas.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": true, - "contains": true, - "contentSchema": true, - "else": true, - "if": true, - "items": true, - "not": false, - "propertyNames": true, - "then": true, - "unevaluatedItems": true, - "unevaluatedProperties": true, - "allOf": [true], - "anyOf": [true], - "oneOf": [true], - "prefixItems": [true], - "$defs": { - "foo": true, - "bar": { "$id": "bar" } - }, - "dependentSchemas": { "foo": true }, - "patternProperties": { "foo": true }, - "properties": { "foo": true } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "bar", - "target": { "$id": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/empty-fragment.json deleted file mode 100644 index 680015de9..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/empty-fragment.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": "bar" } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-uri-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-uri-anchor.json deleted file mode 100644 index 6ae642cef..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-uri-anchor.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$anchor": "foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "$anchor": "foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-uri-empty-fragment.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-uri-empty-fragment.json deleted file mode 100644 index 1e2375bde..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-uri-empty-fragment.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo#": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-uri-with-different-id-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-uri-with-different-id-anchor.json deleted file mode 100644 index 3a00635d3..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-uri-with-different-id-anchor.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.org/internal", - "$defs": { - "foo": { - "$anchor": "foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#foo", - "target": { - "$anchor": "foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-uri.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-uri.json deleted file mode 100644 index 209d97bbc..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-uri.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-urn.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-urn.json deleted file mode 100644 index 170e0bcb8..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-absolute-urn.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "urn:example:schema": { "foo": "bar" } - }, - "tests": [ - { - "ref": "urn:example:schema", - "target": { "foo": "bar" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-uri-with-nested-relative-uri-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-uri-with-nested-relative-uri-anchor.json deleted file mode 100644 index 6795c1007..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-uri-with-nested-relative-uri-anchor.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$id": "foo", - "$defs": { - "spam": { - "$anchor": "bar", - "baz": "quux" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/foo#bar", - "target": { - "$anchor": "bar", - "baz": "quux" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-urn-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-urn-anchor.json deleted file mode 100644 index d70cd3f8d..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/external-urn-anchor.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "urn:example:schema": { - "$defs": { - "foo": { - "$anchor": "foo", - "foo": "bar" - } - } - } - }, - "tests": [ - { - "ref": "urn:example:schema#foo", - "target": { - "$anchor": "foo", - "foo": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/invalid-anchor-with-pointer.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/invalid-anchor-with-pointer.json deleted file mode 100644 index 3b1025fd2..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/invalid-anchor-with-pointer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$anchor": "foo", - "$defs": { - "bar": { "baz": "quux" } - } - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/", - "ref": "#foo/$defs/bar", - "error": true - }, - { - "base_uri": "http://example.com/", - "ref": "#foo#/$defs/bar", - "error": true - }, - { - "ref": "http://example.com/#foo/$defs/bar", - "error": true - }, - { - "ref": "http://example.com#foo/$defs/bar", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-additionalProperties.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-additionalProperties.json deleted file mode 100644 index cf69a34fd..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-additionalProperties.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": { - "$id": "http://example.com/oh-hey-an-additionalProperties", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-additionalProperties", - "target": { - "$id": "http://example.com/oh-hey-an-additionalProperties", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-allOf.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-allOf.json deleted file mode 100644 index af3610516..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-allOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "allOf": [ - { "$id": "http://example.com/0", "title": "First!" }, - { "$id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-anyOf.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-anyOf.json deleted file mode 100644 index 41e2bea12..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-anyOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "anyOf": [ - { "$id": "http://example.com/0", "title": "First!" }, - { "$id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-contains.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-contains.json deleted file mode 100644 index bbd65e299..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-contains.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "contains": { - "$id": "http://example.com/oh-hey-a-contains", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-contains", - "target": { - "$id": "http://example.com/oh-hey-a-contains", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-contentSchema.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-contentSchema.json deleted file mode 100644 index dc4af7400..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-contentSchema.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "contentMediaType": "image/png", - "contentSchema": { - "$id": "http://example.com/oh-hey-a-contentSchema", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-contentSchema", - "target": { - "$id": "http://example.com/oh-hey-a-contentSchema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-defs.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-defs.json deleted file mode 100644 index 3dde1a355..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-defs.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-dependentSchemas.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-dependentSchemas.json deleted file mode 100644 index 284415e9d..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-dependentSchemas.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "dependentSchemas": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-else.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-else.json deleted file mode 100644 index 19330a358..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-else.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "else": { - "$id": "http://example.com/oh-hey-an-else", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-else", - "target": { - "$id": "http://example.com/oh-hey-an-else", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-if.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-if.json deleted file mode 100644 index 0d83cf98e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-if.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "if": { - "$id": "http://example.com/oh-hey-an-if", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-if", - "target": { - "$id": "http://example.com/oh-hey-an-if", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-items.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-items.json deleted file mode 100644 index 20f7a5895..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-items.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "items": { - "$id": "http://example.com/oh-hey-an-items", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-items", - "target": { - "$id": "http://example.com/oh-hey-an-items", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-not.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-not.json deleted file mode 100644 index 09a7bd6dc..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-not.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "not": { - "$id": "http://example.com/oh-hey-a-not", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-not", - "target": { - "$id": "http://example.com/oh-hey-a-not", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-oneOf.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-oneOf.json deleted file mode 100644 index 2d6e5545b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-oneOf.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "oneOf": [ - { "$id": "http://example.com/0", "title": "First!" }, - { "$id": "http://example.com/1", "title": "Second!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "First!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Second!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-patternProperties.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-patternProperties.json deleted file mode 100644 index 6f760f086..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-patternProperties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "patternProperties": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-prefixItems.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-prefixItems.json deleted file mode 100644 index aba8fc8eb..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-prefixItems.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "prefixItems": [ - { "title": "First!" }, - { "$id": "http://example.com/0", "title": "Second!" }, - { "title": "Third!" }, - { "$id": "http://example.com/1", "title": "Fourth!" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/0", - "target": { "$id": "http://example.com/0", "title": "Second!" } - }, - { - "ref": "http://example.com/1", - "target": { "$id": "http://example.com/1", "title": "Fourth!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-properties.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-properties.json deleted file mode 100644 index c4bf8300e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-properties.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "properties": { - "foo": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-subschema", - "target": { - "$id": "http://example.com/oh-hey-a-subschema", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-propertyNames.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-propertyNames.json deleted file mode 100644 index 785130556..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-propertyNames.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "propertyNames": { - "$id": "http://example.com/oh-hey-a-propertyNames", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-propertyNames", - "target": { - "$id": "http://example.com/oh-hey-a-propertyNames", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-then.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-then.json deleted file mode 100644 index f24385096..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-then.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "then": { - "$id": "http://example.com/oh-hey-a-then", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-a-then", - "target": { - "$id": "http://example.com/oh-hey-a-then", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-unevaluatedItems.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-unevaluatedItems.json deleted file mode 100644 index 7d8109407..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-unevaluatedItems.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "unevaluatedItems": { - "$id": "http://example.com/oh-hey-an-unevaluatedItems", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-unevaluatedItems", - "target": { - "$id": "http://example.com/oh-hey-an-unevaluatedItems", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-unevaluatedProperties.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-unevaluatedProperties.json deleted file mode 100644 index 5702334da..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/keywords-unevaluatedProperties.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "unevaluatedProperties": { - "$id": "http://example.com/oh-hey-an-unevaluatedProperties", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-an-unevaluatedProperties", - "target": { - "$id": "http://example.com/oh-hey-an-unevaluatedProperties", - "abc": 123 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/multiple-lookup-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/multiple-lookup-anchor.json deleted file mode 100644 index 4a95c0e63..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/multiple-lookup-anchor.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { "$anchor": "foo", "bar": "baz" } - } - } - }, - "tests": [ - { - "ref": "http://example.com/", - "target": { "$defs": { "foo": { "$anchor": "foo", "bar": "baz" } } }, - "then": { - "ref": "#foo", - "target": { "$anchor": "foo", "bar": "baz" } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/multiple-lookup-external-absolute-uri-with-different-id-anchor.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/multiple-lookup-external-absolute-uri-with-different-id-anchor.json deleted file mode 100644 index 768e74909..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/multiple-lookup-external-absolute-uri-with-different-id-anchor.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$id": "http://example.org/foo", - "$defs": { - "bar": { - "$anchor": "baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/$defs/foo", - "target": { - "$id": "http://example.org/foo", - "$defs": { "bar": { "$anchor": "baz", "quux": "eggs" } } - }, - "then": { - "ref": "#baz", - "target": { "$anchor": "baz", "quux": "eggs" } - } - }, - { - "ref": "http://example.com/#/$defs/foo", - "target": { - "$id": "http://example.org/foo", - "$defs": { "bar": { "$anchor": "baz", "quux": "eggs" } } - }, - "then": { - "ref": "http://example.org/foo#baz", - "target": { "$anchor": "baz", "quux": "eggs" } - } - }, - { - "ref": "http://example.com/#baz", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/multiple-lookup-pointer.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/multiple-lookup-pointer.json deleted file mode 100644 index d7adb4ae8..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/multiple-lookup-pointer.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": {}, - "http://example.com/foo/": { "foo": "bar" } - }, - "tests": [ - { - "ref": "http://example.com/foo/", - "target": { "foo": "bar" }, - "then": { - "ref": "#/foo", - "target": "bar" - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/multiple-lookup.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/multiple-lookup.json deleted file mode 100644 index a5c30f012..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/multiple-lookup.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": {}, - "http://example.com/foo/": { "foo": "bar" }, - "http://example.com/foo/bar": { "baz": "quux" } - }, - "tests": [ - { - "ref": "http://example.com/", - "target": {}, - "then": { - "ref": "foo/", - "target": { "foo": "bar" }, - "then": { - "ref": "bar", - "target": { "baz": "quux" } - } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nested-absolute-id.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/nested-absolute-id.json deleted file mode 100644 index b9c03d216..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nested-absolute-id.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/", - "$defs": { - "foo": { - "$id": "http://example.com/nested", - "$defs": { - "inner": { "foo": "bar" } - } - } - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/nested", - "ref": "#/$defs/inner", - "target": { "foo": "bar" } - }, - { - "base_uri": "http://example.com/", - "ref": "nested", - "target": { - "$id": "http://example.com/nested", - "$defs": { - "inner": { "foo": "bar" } - } - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nested-relative-id-only-retrieval-uri.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/nested-relative-id-only-retrieval-uri.json deleted file mode 100644 index 6a291f191..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nested-relative-id-only-retrieval-uri.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "foo": { - "$id": "nested.json", - "title": "Hi!" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/nested.json", - "target": { "$id": "nested.json", "title": "Hi!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nested-relative-id.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/nested-relative-id.json deleted file mode 100644 index 39d4ff05e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nested-relative-id.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/", - "$defs": { - "foo": { - "$id": "nested.json", - "title": "Hi!" - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/nested.json", - "target": { "$id": "nested.json", "title": "Hi!" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-const.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-const.json deleted file mode 100644 index 1193e30ba..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-const.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "const": { "$id": "http://example.com/oh-hey-not-an-id" } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-default.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-default.json deleted file mode 100644 index bf65b3173..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-default.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "default": { "$id": "http://example.com/oh-hey-not-an-id" } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-enum.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-enum.json deleted file mode 100644 index 669414925..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-enum.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "enum": [{ "$id": "http://example.com/oh-hey-not-an-id" }] - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-examples.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-examples.json deleted file mode 100644 index e509f3d34..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/nonreferencing-keywords-examples.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "examples": [{ "$id": "http://example.com/oh-hey-not-an-id" }] - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-an-id", - "error": true - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/pointer-crossing-non-keyword-id-in-subvalue.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/pointer-crossing-non-keyword-id-in-subvalue.json deleted file mode 100644 index a99f0d66a..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/pointer-crossing-non-keyword-id-in-subvalue.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$defs": { - "$id": { "type": "string" }, - "foo": { "bar": "baz" } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/$defs/foo", - "target": { "bar": "baz" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/pointer-crossing-non-keyword-id.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/pointer-crossing-non-keyword-id.json deleted file mode 100644 index aef55ef92..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/pointer-crossing-non-keyword-id.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "additionalProperties": { - "$defs": { - "$id": { "type": "string" }, - "foo": { "bar": "baz" } - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/#/additionalProperties/$defs/foo", - "target": { "bar": "baz" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/relative-pointer-array.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/relative-pointer-array.json deleted file mode 100644 index f8726cdc0..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/relative-pointer-array.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": [2, 4, 6] } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/1", - "target": 4 - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/relative-pointer-escapes.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/relative-pointer-escapes.json deleted file mode 100644 index d0c8e5ff3..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/relative-pointer-escapes.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { - "foo": { - "tilde~field": "bar", - "slash/field": "baz", - "percent%field": "quux" - } - } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/tilde~0field", - "target": "bar" - }, - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/slash~1field", - "target": "baz" - }, - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/percent%25field", - "target": "quux" - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/relative-pointer-object.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/relative-pointer-object.json deleted file mode 100644 index e5ccf194e..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/relative-pointer-object.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/foo": { "foo": { "bar": { "baz": 12 } } } - }, - "tests": [ - { - "base_uri": "http://example.com/foo", - "ref": "#/foo/bar", - "target": { "baz": 12 } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/rfc3986-normalization-on-insertion.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/rfc3986-normalization-on-insertion.json deleted file mode 100644 index f4fed6975..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/rfc3986-normalization-on-insertion.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "hTtP://example.com/case-insensitive-scheme": { "foo": "bar" }, - "http://exAmpLe.com/case-insensitive-host": { "baz": "quux" }, - "hTtP://exAmpLe.com/case-SENSITIVE-path": {}, - "http://example.com/escapes/a%c2%b1b": { "spam": "eggs" }, - "http://example.com/unreserved/%7Efoo": { "snap": "crackle" }, - "http://example.com:80/default/port": { "pop": 37 }, - "http://example.com/internal-ids": { - "$defs": { - "scheme": { - "$id": "hTtP://example.com/id/case-insensitive-scheme", - "foo": "bar" - }, - "host": { - "$id": "http://exAmpLe.com/id/case-insensitive-host", - "baz": "quux" - }, - "path": { - "$id": "hTtP://exAmpLe.com/id/case-SENSITIVE-path" - }, - "escapes": { - "$id": "http://example.com/id/escapes/a%c2%b1b", - "spam": "eggs" - }, - "unreserved": { - "$id": "http://example.com/id/unreserved/%7Efoo", - "snap": "crackle" - }, - "port": { - "$id": "http://example.com:80/id/default/port", - "pop": 37 - } - } - } - }, - "tests": [ - { - "ref": "http://example.com/case-insensitive-scheme", - "target": { "foo": "bar" } - }, - { - "ref": "http://example.com/case-insensitive-host", - "target": { "baz": "quux" } - }, - { - "ref": "http://example.com/case-sensitive-path", - "error": true - }, - { - "ref": "http://example.com/escapes/a%C2%B1b", - "target": { "spam": "eggs" } - }, - { - "ref": "http://example.com/unreserved/~foo", - "target": { "snap": "crackle" } - }, - { - "ref": "http://example.com/default/port", - "target": { "pop": 37 } - }, - { - "ref": "http://example.com/id/case-insensitive-scheme", - "target": { - "$id": "hTtP://example.com/id/case-insensitive-scheme", - "foo": "bar" - } - }, - { - "ref": "http://example.com/id/case-insensitive-host", - "target": { - "$id": "http://exAmpLe.com/id/case-insensitive-host", - "baz": "quux" - } - }, - { - "ref": "http://example.com/id/case-sensitive-path", - "error": true - }, - { - "ref": "http://example.com/id/escapes/a%C2%B1b", - "target": { - "$id": "http://example.com/id/escapes/a%c2%b1b", - "spam": "eggs" - } - }, - { - "ref": "http://example.com/id/unreserved/~foo", - "target": { - "$id": "http://example.com/id/unreserved/%7Efoo", - "snap": "crackle" - } - }, - { - "ref": "http://example.com/id/default/port", - "target": { - "$id": "http://example.com:80/id/default/port", - "pop": 37 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/rfc3986-normalization-on-retrieval.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/rfc3986-normalization-on-retrieval.json deleted file mode 100644 index f45c390c9..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/rfc3986-normalization-on-retrieval.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/case-insensitive-scheme": { "foo": "bar" }, - "http://example.com/case-insensitive-host": { "baz": "quux" }, - "http://example.com/case-sensitive-path": {}, - "http://example.com/escapes/a%C2%B1b": { "spam": "eggs" }, - "http://example.com/unreserved/~foo": { "snap": "crackle" }, - "http://example.com/default/port": { "pop": 37 }, - "http://example.com/internal-ids": { - "$defs": { - "scheme": { - "$id": "http://example.com/id/case-insensitive-scheme", - "foo": "bar" - }, - "host": { - "$id": "http://example.com/id/case-insensitive-host", - "baz": "quux" - }, - "path": { - "$id": "http://example.com/id/case-sensitive-path" - }, - "escapes": { - "$id": "http://example.com/id/escapes/a%C2%B1b", - "spam": "eggs" - }, - "unreserved": { - "$id": "http://example.com/id/unreserved/~foo", - "snap": "crackle" - }, - "port": { - "$id": "http://example.com/id/default/port", - "pop": 37 - } - } - } - }, - "tests": [ - { - "ref": "hTtP://example.com/case-insensitive-scheme", - "target": { "foo": "bar" } - }, - { - "ref": "http://exAmpLe.com/case-insensitive-host", - "target": { "baz": "quux" } - }, - { - "ref": "hTtP://exAmpLe.com/case-SENSITIVE-path", - "error": true - }, - { - "ref": "http://example.com/escapes/a%c2%b1b", - "target": { "spam": "eggs" } - }, - { - "ref": "http://example.com/unreserved/%7Efoo", - "target": { "snap": "crackle" } - }, - { - "ref": "http://example.com:80/default/port", - "target": { "pop": 37 } - }, - { - "ref": "hTtP://example.com/id/case-insensitive-scheme", - "target": { - "$id": "http://example.com/id/case-insensitive-scheme", - "foo": "bar" - } - }, - { - "ref": "http://exAmpLe.com/id/case-insensitive-host", - "target": { - "$id": "http://example.com/id/case-insensitive-host", - "baz": "quux" - } - }, - { - "ref": "hTtP://exAmpLe.com/id/case-SENSITIVE-path", - "error": true - }, - { - "ref": "http://example.com/id/escapes/a%c2%b1b", - "target": { - "$id": "http://example.com/id/escapes/a%C2%B1b", - "spam": "eggs" - } - }, - { - "ref": "http://example.com/id/unreserved/%7Efoo", - "target": { - "$id": "http://example.com/id/unreserved/~foo", - "snap": "crackle" - } - }, - { - "ref": "http://example.com:80/id/default/port", - "target": { - "$id": "http://example.com/id/default/port", - "pop": 37 - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/tag-uris.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/tag-uris.json deleted file mode 100644 index 03084243d..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/tag-uris.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "tag:bowtie.report,2023-11:referencing-suite-tag-uris-external-id": { - "$defs": { - "foo": { - "$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "$defs": { - "bar": { - "$anchor": "baz", - "quux": "eggs" - } - } - } - } - } - }, - "tests": [ - { - "ref": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "target": { - "$id": "tag:bowtie.report,2023-11:referencing-suite-tag-uris-id", - "$defs": { - "bar": { - "$anchor": "baz", - "quux": "eggs" - } - } - }, - "then": { - "ref": "#baz", - "target": { "$anchor": "baz", "quux": "eggs" } - } - }, - { - "ref": "tag:bowtie.report,2023-11-01:referencing-suite-tag-uris-id", - "error": true, - "why": { - "summary": "Month and day default to 01, but are still specified to be distinct from their explicit forms.", - "specifications": [ - { - "rfc": 4151, - "section": "2.2", - "link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.2" - } - ] - } - }, - { - "ref": "tag:BOWTIE.REPORT,2023-11:referencing-suite-tag-uris-id", - "error": true, - "why": { - "summary": "It's recommended domains be lowercase, but regardless different authority names are considered different.", - "specifications": [ - { - "rfc": 4151, - "section": "2.1", - "link": "https://datatracker.ietf.org/doc/html/rfc4151#section-2.1" - } - ] - } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/unignored-siblings.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/unignored-siblings.json deleted file mode 100644 index d66afd0fb..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/unignored-siblings.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "$id": "http://example.com/", - "allOf": [ - { - "$id": "not-ignored-id.json", - "$ref": "foo.json" - }, - { "$id": "foo.json" }, - { "$id": "not-ignored-id.json/foo.json" } - ] - } - }, - "tests": [ - { - "ref": "http://example.com/not-ignored-id.json", - "target": { "$id": "not-ignored-id.json", "$ref": "foo.json" } - } - ] -} diff --git a/vendor/referencing-suite/tests/json-schema-draft-2020-12/unknown-keyword.json b/vendor/referencing-suite/tests/json-schema-draft-2020-12/unknown-keyword.json deleted file mode 100644 index e66bdcc8b..000000000 --- a/vendor/referencing-suite/tests/json-schema-draft-2020-12/unknown-keyword.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "../../test-schema.json", - "registry": { - "http://example.com/": { - "unknownKeyword": { - "$id": "http://example.com/oh-hey-not-a-real-known-id", - "abc": 123 - } - } - }, - "tests": [ - { - "ref": "http://example.com/oh-hey-not-a-real-known-id", - "error": true - } - ] -}