diff --git a/apidef/api_definitions_test.go b/apidef/api_definitions_test.go index 8b488c9b2cc..b3408b7ec98 100644 --- a/apidef/api_definitions_test.go +++ b/apidef/api_definitions_test.go @@ -15,17 +15,6 @@ func TestSchema(t *testing.T) { schemaLoader := schema.NewBytesLoader([]byte(Schema)) spec := DummyAPI() - spec.UpstreamAuth = UpstreamAuth{ - Enabled: true, - OAuth: UpstreamOAuth{ - Enabled: true, - ClientCredentials: ClientCredentials{ - ClientAuthData: ClientAuthData{ - ClientSecret: "dummy", // workaround to fix schema error - }, - }, - }, - } goLoader := schema.NewGoLoader(spec) result, err := schema.Validate(schemaLoader, goLoader) if err != nil { @@ -111,17 +100,6 @@ func TestSchemaGraphqlConfig(t *testing.T) { schemaLoader := schema.NewBytesLoader([]byte(Schema)) spec := DummyAPI() - spec.UpstreamAuth = UpstreamAuth{ - Enabled: true, - OAuth: UpstreamOAuth{ - Enabled: true, - ClientCredentials: ClientCredentials{ - ClientAuthData: ClientAuthData{ - ClientSecret: "dummy", // workaround to fix schema error - }, - }, - }, - } spec.GraphQL.ExecutionMode = "" goLoader := schema.NewGoLoader(spec) diff --git a/apidef/schema.go b/apidef/schema.go index f3c62b8576b..4cb9e24dee4 100644 --- a/apidef/schema.go +++ b/apidef/schema.go @@ -1,1126 +1,6 @@ package apidef -const Schema = `{ - "type": [ - "object", - "null" - ], - "$schema": "http://json-schema.org/draft-04/schema", - "id": "http://jsonschema.net", - "additionalProperties": false, - "properties": { - "is_site": { - "type": "boolean" - }, - "uptime_tests": { - "type": [ - "object", - "null" - ] - }, - "expire_analytics_after": { - "type": "number" - }, - "id": { - "type": "string" - }, - "org_id": { - "type": "string" - }, - "api_id": { - "type": "string" - }, - "expiration": { - "type": "string" - }, - "tags_disabled": { - "type": "boolean" - }, - "enable_ip_whitelisting": { - "type": "boolean" - }, - "enable_ip_blacklisting": { - "type": "boolean" - }, - "enable_context_vars": { - "type": "boolean" - }, - "strip_auth_data": { - "type": "boolean" - }, - "do_not_track": { - "type": "boolean" - }, - "enable_jwt": { - "type": "boolean" - }, - "use_openid": { - "type": "boolean" - }, - "openid_options": { - "type": [ - "object", - "null" - ] - }, - "use_standard_auth": { - "type": "boolean" - }, - "use_go_plugin_auth": { - "type": "boolean" - }, - "enable_coprocess_auth": { - "type": "boolean" - }, - "custom_plugin_auth_enabled": { - "type": "boolean" - }, - "jwt_skip_kid": { - "type": "boolean" - }, - "base_identity_provided_by": { - "type": "string" - }, - "disable_rate_limit": { - "type": "boolean" - }, - "disable_quota": { - "type": "boolean" - }, - "custom_middleware_bundle": { - "type": "string" - }, - "custom_middleware_bundle_disabled": { - "type": "boolean" - }, - "jwt_policy_field_name": { - "type": "string" - }, - "jwt_default_policies": { - "type": [ - "array", - "null" - ] - }, - "jwt_signing_method": { - "type": "string" - }, - "jwt_source": { - "type": "string" - }, - "jwt_identity_base_field": { - "type": "string" - }, - "jwt_client_base_field": { - "type": "string" - }, - "jwt_disable_issued_at_validation": { - "type": "boolean" - }, - "jwt_disable_expires_at_validation": { - "type": "boolean" - }, - "jwt_disable_not_before_validation": { - "type": "boolean" - }, - "jwt_issued_at_validation_skew": { - "type": "number" - }, - "jwt_expires_at_validation_skew": { - "type": "number" - }, - "jwt_not_before_validation_skew": { - "type": "number" - }, - "jwt_scope_to_policy_mapping": { - "type": [ - "object", - "null" - ] - }, - "jwt_scope_claim_name": { - "type": "string" - }, - "scopes": { - "type": [ - "object", - "null" - ], - "properties": { - "jwt": { - "type": [ - "object", - "null" - ], - "properties": { - "scope_claim_name": { - "type": "string" - }, - "scope_to_policy": { - "type": [ - "object", - "null" - ] - } - } - }, - "oidc": { - "type": [ - "object", - "null" - ], - "properties": { - "scope_claim_name": { - "type": "string" - }, - "scope_to_policy": { - "type": [ - "object", - "null" - ] - } - } - } - } - }, - "idp_client_id_mapping_disabled": { - "type": "boolean" - }, - "use_keyless": { - "type": "boolean" - }, - "use_basic_auth": { - "type": "boolean" - }, - "use_mutual_tls_auth": { - "type": "boolean" - }, - "client_certificates": { - "type": [ - "array", - "null" - ] - }, - "upstream_certificates": { - "type": [ - "object", - "null" - ] - }, - "upstream_certificates_disabled": { - "type": "boolean" - }, - "pinned_public_keys": { - "type": [ - "object", - "null" - ] - }, - "certificate_pinning_disabled": { - "type": "boolean" - }, - "allowed_ips": { - "type": [ - "array", - "null" - ] - }, - "blacklisted_ips": { - "type": [ - "array", - "null" - ] - }, - "enable_batch_request_support": { - "type": "boolean" - }, - "event_handlers": { - "type": [ - "object", - "null" - ] - }, - "notifications": { - "type": [ - "object", - "null" - ] - }, - "use_oauth2": { - "type": "boolean" - }, - "oauth_meta": { - "type": [ - "object", - "null" - ] - }, - "external_oauth": { - "type": [ - "object", - "null" - ] - }, - "cache_options": { - "type": [ - "object", - "null" - ] - }, - "tags": { - "type": [ - "array", - "null" - ] - }, - "tag_headers": { - "type": [ - "array", - "null" - ] - }, - "basic_auth": { - "type": [ - "object", - "null" - ] - }, - "CORS": { - "type": [ - "object", - "null" - ] - }, - "response_processors": { - "type": [ - "array", - "null" - ] - }, - "auth_provider": { - "type": [ - "object", - "null" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "" - ] - }, - "storage_engine": { - "type": "string", - "enum": [ - "" - ] - } - } - }, - "session_provider": { - "type": [ - "object", - "null" - ], - "properties": { - "name": { - "type": "string", - "enum": [ - "" - ] - }, - "storage_engine": { - "type": "string", - "enum": [ - "" - ] - } - } - }, - "hmac_allowed_clock_skew": { - "type": "number" - }, - "hmac_allowed_algorithms": { - "type": [ - "array", - "null" - ] - }, - "dont_set_quota_on_create": { - "type": "boolean" - }, - "custom_middleware": { - "type": [ - "object", - "null" - ], - "properties": { - "pre": { - "type": [ - "array", - "null" - ] - }, - "post": { - "type": [ - "array", - "null" - ] - } - } - }, - "session_lifetime_respects_key_expiration": { - "type": "boolean" - }, - "session_lifetime": { - "type": "number" - }, - "enable_detailed_recording": { - "type": "boolean" - }, - "enable_signature_checking": { - "type": "boolean" - }, - "active": { - "type": "boolean" - }, - "internal": { - "type": "boolean" - }, - "auth": { - "type": [ - "object", - "null" - ], - "id": "http://jsonschema.net/auth", - "properties": { - "auth_header_name": { - "type": "string", - "id": "http://jsonschema.net/auth/auth_header_name" - }, - "use_certificate": { - "type": "boolean" - } - } - }, - "auth_configs": { - "type": [ - "object", - "null" - ] - }, - "definition": { - "type": [ - "object", - "null" - ], - "id": "http://jsonschema.net/definition", - "properties": { - "key": { - "type": "string", - "id": "http://jsonschema.net/definition/key" - }, - "location": { - "type": "string", - "id": "http://jsonschema.net/definition/location" - }, - "strip_path": { - "type": "boolean", - "id": "http://jsonschema.net/definition/location" - } - }, - "required": [ - "key", - "location" - ] - }, - "name": { - "type": "string", - "id": "http://jsonschema.net/name" - }, - "slug": { - "type": "string", - "pattern": "[a-zA-Z0-9]*", - "id": "http://jsonschema.net/name" - }, - "domain": { - "type": "string" - }, - "domain_disabled": { - "type": "boolean" - }, - "listen_port": { - "type": "number" - }, - "protocol": { - "type": "string" - }, - "enable_proxy_protocol": { - "type": "boolean" - }, - "certificates": { - "type": [ - "array", - "null" - ] - }, - "check_host_against_uptime_tests": { - "type": "boolean" - }, - "proxy": { - "type": [ - "object", - "null" - ], - "id": "http://jsonschema.net/proxy", - "properties": { - "target_url": { - "type": "string", - "id": "http://jsonschema.net/proxy/target_url" - }, - "check_host_against_uptime_tests": { - "type": "boolean" - }, - "preserve_host_header": { - "type": "boolean" - }, - "transport": { - "type": [ - "object", - "null" - ], - "properties": { - "ssl_ciphers": { - "type": [ - "array", - "null" - ] - }, - "ssl_min_version": { - "type": "number" - }, - "ssl_max_version": { - "type": "number" - }, - "proxy_url": { - "type": "string" - }, - "ssl_force_common_name_check": { - "type": "boolean" - } - } - } - }, - "required": [ - "target_url" - ] - }, - "hook_references": { - "type": [ - "object", - "null" - ] - }, - "version_data": { - "type": [ - "object", - "null" - ], - "id": "http://jsonschema.net/version_data", - "properties": { - "not_versioned": { - "type": "boolean", - "id": "http://jsonschema.net/version_data/not_versioned" - }, - "default_version": { - "type": "string", - "id": "http://jsonschema.net/version_data/default_version" - }, - "versions": { - "type": [ - "object", - "null" - ], - "id": "http://jsonschema.net/version_data/versions", - "patternProperties": { - "^[a-zA-Z0-9]+$": { - "title": "versionInfoProperty", - "type": [ - "object", - "null" - ], - "id": "http://jsonschema.net/access_rights/versionInfoProperty", - "properties": { - "expires": { - "type": "string", - "id": "http://jsonschema.net/version_data/versions/versionInfoProperty/expires" - }, - "name": { - "type": "string", - "id": "http://jsonschema.net/version_data/versions/versionInfoProperty/name" - }, - "paths": { - "type": [ - "object", - "null" - ], - "id": "http://jsonschema.net/version_data/versions/versionInfoProperty/paths", - "properties": { - "black_list": { - "type": [ - "array", - "null" - ], - "id": "http://jsonschema.net/version_data/versions/versionInfoProperty/paths/black_list" - }, - "ignored": { - "type": [ - "array", - "null" - ], - "id": "http://jsonschema.net/version_data/versions/versionInfoProperty/paths/ignored" - }, - "white_list": { - "type": [ - "array", - "null" - ], - "id": "http://jsonschema.net/version_data/versions/versionInfoProperty/paths/white_list" - } - } - } - }, - "required": [ - "name" - ] - } - } - } - }, - "required": [ - "not_versioned", - "versions" - ] - }, - "config_data": { - "type": [ - "object", - "null" - ] - }, - "config_data_disabled": { - "type": "boolean" - }, - "global_rate_limit": { - "type": [ - "object", - "null" - ], - "properties": { - "rate": { - "type": "number" - }, - "per": { - "type": "number" - } - } - }, - "request_signing": { - "type": [ - "object", - "null" - ], - "properties": { - "is_enabled": { - "type": "boolean" - }, - "secret": { - "type": "string" - }, - "key_id": { - "type": "string" - }, - "algorithm": { - "type": "string" - } - }, - "required": [ - "is_enabled" - ] - }, - "graphql": { - "type": [ - "object", - "null" - ], - "properties": { - "enabled": { - "type": "boolean" - }, - "version": { - "type": "string" - }, - "execution_mode": { - "type": "string", - "enum": [ - "proxyOnly", - "executionEngine", - "subgraph", - "supergraph", - "" - ] - }, - "schema": { - "type": "string" - }, - "last_schema_update": { - "type": "string", - "format": "date-time" - }, - "type_field_configurations": { - "type": [ - "array", - "null" - ], - "properties": { - "type_name": { - "type": "string" - }, - "field_name": { - "type": "string" - }, - "mapping": { - "type": [ - "object", - "null" - ], - "properties": { - "disabled": { - "type": "boolean" - }, - "path": { - "type": "string" - } - }, - "required": [ - "disabled" - ] - }, - "data_source": { - "type": [ - "object", - "null" - ], - "properties": { - "kind": { - "type": "boolean" - }, - "data_source_config": { - "type": [ - "object", - "null" - ] - } - }, - "required": [ - "kind" - ] - } - }, - "required": [ - "type_name", - "field_name" - ] - }, - "engine": { - "type": [ - "object", - "null" - ], - "properties": { - "field_configs": { - "type": [ - "array", - "null" - ], - "properties": { - "type_name": { - "type": "string" - }, - "field_name": { - "type": "string" - }, - "disable_default_mapping": { - "type": "boolean" - }, - "path": { - "type": [ - "array", - "null" - ] - } - } - }, - "data_sources": { - "type": [ - "array", - "null" - ], - "properties": { - "kind": { - "type": "string", - "enum": [ - "REST", - "GraphQL", - "" - ] - }, - "name": { - "type": "string" - }, - "internal": { - "type": "boolean" - }, - "root_fields": { - "type": [ - "array", - "null" - ], - "properties": { - "type": { - "type": "string" - }, - "fields": { - "type": [ - "array", - "null" - ] - } - } - }, - "config": { - "type": [ - "object", - "null" - ] - } - }, - "required": [ - "kind" - ] - }, - "global_headers": { - "type": [ - "array", - "null" - ], - "properties": { - "key": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "required": [ - "key", - "value" - ] - } - } - }, - "proxy": { - "type": [ - "object", - "null" - ], - "properties": { - "features": { - "type": [ - "object", - "null" - ], - "properties": { - "use_immutable_headers": { - "type": "boolean" - } - } - }, - "auth_headers": { - "type": [ - "object", - "null" - ] - }, - "request_headers_rewrite": { - "type": [ - "object", - "null" - ], - "additionalProperties": { - "type": "object", - "properties": { - "value": { - "type": "string" - }, - "remove": { - "type": "boolean" - } - }, - "required": [ - "value", - "remove" - ] - } - } - } - }, - "subgraph": { - "type": [ - "object", - "null" - ], - "properties": { - "sdl": { - "type": "string" - } - } - }, - "supergraph": { - "type": [ - "object", - "null" - ], - "properties": { - "updated_at": { - "type": "string", - "format": "date-time" - }, - "disable_query_batching": { - "type": "boolean" - }, - "subgraphs": { - "type": [ - "array", - "null" - ], - "properties": { - "api_id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "sdl": { - "type": "string" - }, - "headers": { - "type": [ - "object", - "null" - ] - } - } - }, - "global_headers": { - "type": [ - "object", - "null" - ] - }, - "merged_sdl": { - "type": "string" - } - } - }, - "introspection": { - "type": [ - "object", - "null" - ], - "properties": { - "disabled": { - "type": "boolean" - } - } - }, - "playground": { - "type": [ - "object", - "null" - ], - "properties": { - "enabled": { - "type": "boolean" - }, - "path": { - "type": "string" - } - }, - "required": [ - "enabled" - ] - } - }, - "required": [ - "enabled" - ] - }, - "analytics_plugin": { - "type": [ - "object", - "null" - ], - "properties": { - "enabled": { - "type": "boolean" - }, - "plugin_path": { - "type": "string" - }, - "func_name": { - "type": "string" - } - } - }, - "is_oas": { - "type": "boolean" - }, - "detailed_tracing": { - "type": "boolean" - }, - "upstream_auth": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "basic_auth": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "header_name": { - "type": "string" - } - } - }, - "oauth": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "client_credentials": { - "type": "object", - "properties": { - "client_id": { - "type": "string" - }, - "client_secret": { - "type": "string" - }, - "token_url": { - "type": "string" - }, - "scopes": { - "type": [ - "array", - "null" - ] - }, - "header": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "required": [ - "enabled" - ] - }, - "extra_metadata" :{ - "type": ["array", "null"] - } - }, - "required": [ - "client_id", - "client_secret", - "token_url" - ] - }, - "password": { - "type": "object", - "properties": { - "client_id": { - "type": "string" - }, - "client_secret": { - "type": "string" - }, - "username": { - "type": "string" - }, - "password": { - "type": "string" - }, - "token_url": { - "type": "string" - }, - "scopes": { - "type": [ - "array", - "null" - ] - }, - "header": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "name": { - "type": "string" - } - }, - "required": [ - "enabled" - ] - }, - "extra_metadata" :{ - "type": ["array", "null"] - } - }, - "required": [ - "client_id", - "token_url", - "username", - "password" - ] - } - } - } - } - } - }, - "required": [ - "name", - "proxy", - "version_data" - ] -} -` +import _ "embed" + +//go:embed schema.json +var Schema string diff --git a/apidef/schema.json b/apidef/schema.json new file mode 100644 index 00000000000..7f909bccfb6 --- /dev/null +++ b/apidef/schema.json @@ -0,0 +1,1118 @@ +{ + "type": [ + "object", + "null" + ], + "$schema": "http://json-schema.org/draft-04/schema", + "id": "http://jsonschema.net", + "additionalProperties": false, + "properties": { + "is_site": { + "type": "boolean" + }, + "uptime_tests": { + "type": [ + "object", + "null" + ] + }, + "expire_analytics_after": { + "type": "number" + }, + "id": { + "type": "string" + }, + "org_id": { + "type": "string" + }, + "api_id": { + "type": "string" + }, + "expiration": { + "type": "string" + }, + "tags_disabled": { + "type": "boolean" + }, + "enable_ip_whitelisting": { + "type": "boolean" + }, + "enable_ip_blacklisting": { + "type": "boolean" + }, + "enable_context_vars": { + "type": "boolean" + }, + "strip_auth_data": { + "type": "boolean" + }, + "do_not_track": { + "type": "boolean" + }, + "enable_jwt": { + "type": "boolean" + }, + "use_openid": { + "type": "boolean" + }, + "openid_options": { + "type": [ + "object", + "null" + ] + }, + "use_standard_auth": { + "type": "boolean" + }, + "use_go_plugin_auth": { + "type": "boolean" + }, + "enable_coprocess_auth": { + "type": "boolean" + }, + "custom_plugin_auth_enabled": { + "type": "boolean" + }, + "jwt_skip_kid": { + "type": "boolean" + }, + "base_identity_provided_by": { + "type": "string" + }, + "disable_rate_limit": { + "type": "boolean" + }, + "disable_quota": { + "type": "boolean" + }, + "custom_middleware_bundle": { + "type": "string" + }, + "custom_middleware_bundle_disabled": { + "type": "boolean" + }, + "jwt_policy_field_name": { + "type": "string" + }, + "jwt_default_policies": { + "type": [ + "array", + "null" + ] + }, + "jwt_signing_method": { + "type": "string" + }, + "jwt_source": { + "type": "string" + }, + "jwt_identity_base_field": { + "type": "string" + }, + "jwt_client_base_field": { + "type": "string" + }, + "jwt_disable_issued_at_validation": { + "type": "boolean" + }, + "jwt_disable_expires_at_validation": { + "type": "boolean" + }, + "jwt_disable_not_before_validation": { + "type": "boolean" + }, + "jwt_issued_at_validation_skew": { + "type": "number" + }, + "jwt_expires_at_validation_skew": { + "type": "number" + }, + "jwt_not_before_validation_skew": { + "type": "number" + }, + "jwt_scope_to_policy_mapping": { + "type": [ + "object", + "null" + ] + }, + "jwt_scope_claim_name": { + "type": "string" + }, + "scopes": { + "type": [ + "object", + "null" + ], + "properties": { + "jwt": { + "type": [ + "object", + "null" + ], + "properties": { + "scope_claim_name": { + "type": "string" + }, + "scope_to_policy": { + "type": [ + "object", + "null" + ] + } + } + }, + "oidc": { + "type": [ + "object", + "null" + ], + "properties": { + "scope_claim_name": { + "type": "string" + }, + "scope_to_policy": { + "type": [ + "object", + "null" + ] + } + } + } + } + }, + "idp_client_id_mapping_disabled": { + "type": "boolean" + }, + "use_keyless": { + "type": "boolean" + }, + "use_basic_auth": { + "type": "boolean" + }, + "use_mutual_tls_auth": { + "type": "boolean" + }, + "client_certificates": { + "type": [ + "array", + "null" + ] + }, + "upstream_certificates": { + "type": [ + "object", + "null" + ] + }, + "upstream_certificates_disabled": { + "type": "boolean" + }, + "pinned_public_keys": { + "type": [ + "object", + "null" + ] + }, + "certificate_pinning_disabled": { + "type": "boolean" + }, + "allowed_ips": { + "type": [ + "array", + "null" + ] + }, + "blacklisted_ips": { + "type": [ + "array", + "null" + ] + }, + "enable_batch_request_support": { + "type": "boolean" + }, + "event_handlers": { + "type": [ + "object", + "null" + ] + }, + "notifications": { + "type": [ + "object", + "null" + ] + }, + "use_oauth2": { + "type": "boolean" + }, + "oauth_meta": { + "type": [ + "object", + "null" + ] + }, + "external_oauth": { + "type": [ + "object", + "null" + ] + }, + "cache_options": { + "type": [ + "object", + "null" + ] + }, + "tags": { + "type": [ + "array", + "null" + ] + }, + "tag_headers": { + "type": [ + "array", + "null" + ] + }, + "basic_auth": { + "type": [ + "object", + "null" + ] + }, + "CORS": { + "type": [ + "object", + "null" + ] + }, + "response_processors": { + "type": [ + "array", + "null" + ] + }, + "auth_provider": { + "type": [ + "object", + "null" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "" + ] + }, + "storage_engine": { + "type": "string", + "enum": [ + "" + ] + } + } + }, + "session_provider": { + "type": [ + "object", + "null" + ], + "properties": { + "name": { + "type": "string", + "enum": [ + "" + ] + }, + "storage_engine": { + "type": "string", + "enum": [ + "" + ] + } + } + }, + "hmac_allowed_clock_skew": { + "type": "number" + }, + "hmac_allowed_algorithms": { + "type": [ + "array", + "null" + ] + }, + "dont_set_quota_on_create": { + "type": "boolean" + }, + "custom_middleware": { + "type": [ + "object", + "null" + ], + "properties": { + "pre": { + "type": [ + "array", + "null" + ] + }, + "post": { + "type": [ + "array", + "null" + ] + } + } + }, + "session_lifetime_respects_key_expiration": { + "type": "boolean" + }, + "session_lifetime": { + "type": "number" + }, + "enable_detailed_recording": { + "type": "boolean" + }, + "enable_signature_checking": { + "type": "boolean" + }, + "active": { + "type": "boolean" + }, + "internal": { + "type": "boolean" + }, + "auth": { + "type": [ + "object", + "null" + ], + "id": "http://jsonschema.net/auth", + "properties": { + "auth_header_name": { + "type": "string", + "id": "http://jsonschema.net/auth/auth_header_name" + }, + "use_certificate": { + "type": "boolean" + } + } + }, + "auth_configs": { + "type": [ + "object", + "null" + ] + }, + "definition": { + "type": [ + "object", + "null" + ], + "id": "http://jsonschema.net/definition", + "properties": { + "key": { + "type": "string", + "id": "http://jsonschema.net/definition/key" + }, + "location": { + "type": "string", + "id": "http://jsonschema.net/definition/location" + }, + "strip_path": { + "type": "boolean", + "id": "http://jsonschema.net/definition/location" + } + }, + "required": [ + "key", + "location" + ] + }, + "name": { + "type": "string", + "id": "http://jsonschema.net/name" + }, + "slug": { + "type": "string", + "pattern": "[a-zA-Z0-9]*", + "id": "http://jsonschema.net/name" + }, + "domain": { + "type": "string" + }, + "domain_disabled": { + "type": "boolean" + }, + "listen_port": { + "type": "number" + }, + "protocol": { + "type": "string" + }, + "enable_proxy_protocol": { + "type": "boolean" + }, + "certificates": { + "type": [ + "array", + "null" + ] + }, + "check_host_against_uptime_tests": { + "type": "boolean" + }, + "proxy": { + "type": [ + "object", + "null" + ], + "id": "http://jsonschema.net/proxy", + "properties": { + "target_url": { + "type": "string", + "id": "http://jsonschema.net/proxy/target_url" + }, + "check_host_against_uptime_tests": { + "type": "boolean" + }, + "preserve_host_header": { + "type": "boolean" + }, + "transport": { + "type": [ + "object", + "null" + ], + "properties": { + "ssl_ciphers": { + "type": [ + "array", + "null" + ] + }, + "ssl_min_version": { + "type": "number" + }, + "ssl_max_version": { + "type": "number" + }, + "proxy_url": { + "type": "string" + }, + "ssl_force_common_name_check": { + "type": "boolean" + } + } + } + }, + "required": [ + "target_url" + ] + }, + "hook_references": { + "type": [ + "object", + "null" + ] + }, + "version_data": { + "type": [ + "object", + "null" + ], + "id": "http://jsonschema.net/version_data", + "properties": { + "not_versioned": { + "type": "boolean", + "id": "http://jsonschema.net/version_data/not_versioned" + }, + "default_version": { + "type": "string", + "id": "http://jsonschema.net/version_data/default_version" + }, + "versions": { + "type": [ + "object", + "null" + ], + "id": "http://jsonschema.net/version_data/versions", + "patternProperties": { + "^[a-zA-Z0-9]+$": { + "title": "versionInfoProperty", + "type": [ + "object", + "null" + ], + "id": "http://jsonschema.net/access_rights/versionInfoProperty", + "properties": { + "expires": { + "type": "string", + "id": "http://jsonschema.net/version_data/versions/versionInfoProperty/expires" + }, + "name": { + "type": "string", + "id": "http://jsonschema.net/version_data/versions/versionInfoProperty/name" + }, + "paths": { + "type": [ + "object", + "null" + ], + "id": "http://jsonschema.net/version_data/versions/versionInfoProperty/paths", + "properties": { + "black_list": { + "type": [ + "array", + "null" + ], + "id": "http://jsonschema.net/version_data/versions/versionInfoProperty/paths/black_list" + }, + "ignored": { + "type": [ + "array", + "null" + ], + "id": "http://jsonschema.net/version_data/versions/versionInfoProperty/paths/ignored" + }, + "white_list": { + "type": [ + "array", + "null" + ], + "id": "http://jsonschema.net/version_data/versions/versionInfoProperty/paths/white_list" + } + } + } + }, + "required": [ + "name" + ] + } + } + } + }, + "required": [ + "not_versioned", + "versions" + ] + }, + "config_data": { + "type": [ + "object", + "null" + ] + }, + "config_data_disabled": { + "type": "boolean" + }, + "global_rate_limit": { + "type": [ + "object", + "null" + ], + "properties": { + "rate": { + "type": "number" + }, + "per": { + "type": "number" + } + } + }, + "request_signing": { + "type": [ + "object", + "null" + ], + "properties": { + "is_enabled": { + "type": "boolean" + }, + "secret": { + "type": "string" + }, + "key_id": { + "type": "string" + }, + "algorithm": { + "type": "string" + } + }, + "required": [ + "is_enabled" + ] + }, + "graphql": { + "type": [ + "object", + "null" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "version": { + "type": "string" + }, + "execution_mode": { + "type": "string", + "enum": [ + "proxyOnly", + "executionEngine", + "subgraph", + "supergraph", + "" + ] + }, + "schema": { + "type": "string" + }, + "last_schema_update": { + "type": "string", + "format": "date-time" + }, + "type_field_configurations": { + "type": [ + "array", + "null" + ], + "properties": { + "type_name": { + "type": "string" + }, + "field_name": { + "type": "string" + }, + "mapping": { + "type": [ + "object", + "null" + ], + "properties": { + "disabled": { + "type": "boolean" + }, + "path": { + "type": "string" + } + }, + "required": [ + "disabled" + ] + }, + "data_source": { + "type": [ + "object", + "null" + ], + "properties": { + "kind": { + "type": "boolean" + }, + "data_source_config": { + "type": [ + "object", + "null" + ] + } + }, + "required": [ + "kind" + ] + } + }, + "required": [ + "type_name", + "field_name" + ] + }, + "engine": { + "type": [ + "object", + "null" + ], + "properties": { + "field_configs": { + "type": [ + "array", + "null" + ], + "properties": { + "type_name": { + "type": "string" + }, + "field_name": { + "type": "string" + }, + "disable_default_mapping": { + "type": "boolean" + }, + "path": { + "type": [ + "array", + "null" + ] + } + } + }, + "data_sources": { + "type": [ + "array", + "null" + ], + "properties": { + "kind": { + "type": "string", + "enum": [ + "REST", + "GraphQL", + "" + ] + }, + "name": { + "type": "string" + }, + "internal": { + "type": "boolean" + }, + "root_fields": { + "type": [ + "array", + "null" + ], + "properties": { + "type": { + "type": "string" + }, + "fields": { + "type": [ + "array", + "null" + ] + } + } + }, + "config": { + "type": [ + "object", + "null" + ] + } + }, + "required": [ + "kind" + ] + }, + "global_headers": { + "type": [ + "array", + "null" + ], + "properties": { + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "key", + "value" + ] + } + } + }, + "proxy": { + "type": [ + "object", + "null" + ], + "properties": { + "features": { + "type": [ + "object", + "null" + ], + "properties": { + "use_immutable_headers": { + "type": "boolean" + } + } + }, + "auth_headers": { + "type": [ + "object", + "null" + ] + }, + "request_headers_rewrite": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "remove": { + "type": "boolean" + } + }, + "required": [ + "value", + "remove" + ] + } + } + } + }, + "subgraph": { + "type": [ + "object", + "null" + ], + "properties": { + "sdl": { + "type": "string" + } + } + }, + "supergraph": { + "type": [ + "object", + "null" + ], + "properties": { + "updated_at": { + "type": "string", + "format": "date-time" + }, + "disable_query_batching": { + "type": "boolean" + }, + "subgraphs": { + "type": [ + "array", + "null" + ], + "properties": { + "api_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "sdl": { + "type": "string" + }, + "headers": { + "type": [ + "object", + "null" + ] + } + } + }, + "global_headers": { + "type": [ + "object", + "null" + ] + }, + "merged_sdl": { + "type": "string" + } + } + }, + "introspection": { + "type": [ + "object", + "null" + ], + "properties": { + "disabled": { + "type": "boolean" + } + } + }, + "playground": { + "type": [ + "object", + "null" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "path": { + "type": "string" + } + }, + "required": [ + "enabled" + ] + } + }, + "required": [ + "enabled" + ] + }, + "analytics_plugin": { + "type": [ + "object", + "null" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "plugin_path": { + "type": "string" + }, + "func_name": { + "type": "string" + } + } + }, + "is_oas": { + "type": "boolean" + }, + "detailed_tracing": { + "type": "boolean" + }, + "upstream_auth": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "basic_auth": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "header_name": { + "type": "string" + } + } + }, + "oauth": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "client_credentials": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "token_url": { + "type": "string" + }, + "scopes": { + "type": [ + "array", + "null" + ] + }, + "header": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "required": [ + "enabled" + ] + }, + "extra_metadata": { + "type": [ + "array", + "null" + ] + } + } + }, + "password": { + "type": "object", + "properties": { + "client_id": { + "type": "string" + }, + "client_secret": { + "type": "string" + }, + "username": { + "type": "string" + }, + "password": { + "type": "string" + }, + "token_url": { + "type": "string" + }, + "scopes": { + "type": [ + "array", + "null" + ] + }, + "header": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "name": { + "type": "string" + } + }, + "required": [ + "enabled" + ] + }, + "extra_metadata": { + "type": [ + "array", + "null" + ] + } + } + } + } + } + } + } + }, + "required": [ + "name", + "proxy", + "version_data" + ] +} \ No newline at end of file