Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // When this config extension is redacted on the schema or this value is false, the underlining // JSON schema entity is expected to have its own validation endpoint. When left true, this hints // to our tests to skip asserting that a validation endpoint should exist for that entity. // // For example, when this value is false, for our `Consumer` // entity, it is expected that the below HTTP endpoint exists: // POST /v1/schemas/json/consumer/validate DisableValidateEndpoint bool `json:"disableValidateEndpoint"` // The resource's object name used in the REST API path. For example, for our `Consumer` // entity, this should be set to "consumers" as the REST path is `/v1/consumers`. // // This should be left empty in the event the resource is not exposed in the REST API. ResourceAPIPath string `json:"resourceAPIPath,omitempty"` }
Config defines an internal-only vendor extension used to power various business logic around our JSON schema entities.
End-users do not see this extension when issuing calls to get a schema for a specific entity. As such, no properties on this extension shall be required.
func (*Config) Compile ¶
func (c *Config) Compile(_ jsonschema.CompilerContext, m map[string]interface{}) (jsonschema.ExtSchema, error)
Compile implements the jsonschema.ExtCompiler interface.
type Extension ¶
type Extension interface { jsonschema.ExtCompiler // Name returns the name of the extension. This should match // the property named used on the JSON schema itself. Name() string // Schema returns the JSON schema for the extension. Schema() *jsonschema.Schema }
Extension defines a simple interface to build out JSON schema extensions.
Click to show internal directories.
Click to hide internal directories.