weaver.wps_restapi.swagger_definitions

Schema definitions for OpenAPI generation and validation of data from received requests and returned responses.

This module should contain any and every definition in use to build the Swagger UI and the OpenAPI JSON schema so that one can update the specification without touching any other files after the initial integration.

Schemas defined in this module are employed (through deserialize method calls) to validate that data conforms to reported definitions. This makes the documentation of the API better aligned with resulting code execution under it. It also provides a reference point for external users to understand expected data structures with complete schema definitions generated on the exposed endpoints (JSON and Swagger UI).

The definitions are also employed to generate the OpenAPI definitions reported in the documentation published on Weaver’s ReadTheDocs page.

Module Contents

weaver.wps_restapi.swagger_definitions.ViewInfo[source]
weaver.wps_restapi.swagger_definitions.WEAVER_CONFIG_REMOTE_LIST[source]
weaver.wps_restapi.swagger_definitions.API_TITLE = Weaver REST API[source]
weaver.wps_restapi.swagger_definitions.API_INFO[source]
weaver.wps_restapi.swagger_definitions.API_DOCS[source]
weaver.wps_restapi.swagger_definitions.DOC_URL[source]
weaver.wps_restapi.swagger_definitions.CWL_VERSION = v1.2[source]
weaver.wps_restapi.swagger_definitions.CWL_REPO_URL = https://github.com/common-workflow-language[source]
weaver.wps_restapi.swagger_definitions.CWL_BASE_URL = https://www.commonwl.org[source]
weaver.wps_restapi.swagger_definitions.CWL_SPEC_URL[source]
weaver.wps_restapi.swagger_definitions.CWL_USER_GUIDE_URL[source]
weaver.wps_restapi.swagger_definitions.CWL_DOC_BASE_URL[source]
weaver.wps_restapi.swagger_definitions.CWL_CMD_TOOL_URL[source]
weaver.wps_restapi.swagger_definitions.CWL_WORKFLOW_URL[source]
weaver.wps_restapi.swagger_definitions.CWL_DOC_MESSAGE[source]
weaver.wps_restapi.swagger_definitions.IO_INFO_IDS = Identifier of the {first} {what}. To merge details between corresponding {first} and {second}...[source]
weaver.wps_restapi.swagger_definitions.OGC_API_REPO_URL = https://github.com/opengeospatial/ogcapi-processes[source]
weaver.wps_restapi.swagger_definitions.OGC_API_SCHEMA_URL = https://raw.githubusercontent.com/opengeospatial/ogcapi-processes[source]
weaver.wps_restapi.swagger_definitions.OGC_API_SCHEMA_VERSION = master[source]
weaver.wps_restapi.swagger_definitions.OGC_API_SCHEMA_BASE[source]
weaver.wps_restapi.swagger_definitions.OGC_API_SCHEMA_CORE[source]
weaver.wps_restapi.swagger_definitions.OGC_API_EXAMPLES_CORE[source]
weaver.wps_restapi.swagger_definitions.OGC_API_SCHEMA_EXT_DEPLOY[source]
weaver.wps_restapi.swagger_definitions.OGC_API_EXAMPLES_EXT_DEPLOY[source]
weaver.wps_restapi.swagger_definitions.OGC_API_SCHEMA_EXT_BILL[source]
weaver.wps_restapi.swagger_definitions.OGC_API_SCHEMA_EXT_QUOTE[source]
weaver.wps_restapi.swagger_definitions.OGC_API_SCHEMA_EXT_WORKFLOW[source]
weaver.wps_restapi.swagger_definitions.DATETIME_INTERVAL_CLOSED_SYMBOL = /[source]
weaver.wps_restapi.swagger_definitions.DATETIME_INTERVAL_OPEN_START_SYMBOL = ../[source]
weaver.wps_restapi.swagger_definitions.DATETIME_INTERVAL_OPEN_END_SYMBOL = /..[source]
weaver.wps_restapi.swagger_definitions.PROCESS_DESCRIPTION_FIELD_FIRST = ['id', 'title', 'version', 'mutable', 'abstract', 'description', 'keywords', 'metadata',...[source]
weaver.wps_restapi.swagger_definitions.PROCESS_DESCRIPTION_FIELD_AFTER = ['processDescriptionURL', 'processEndpointWPS1', 'executeEndpoint', 'deploymentProfile', 'links'][source]
weaver.wps_restapi.swagger_definitions.PROCESS_DESCRIPTION_FIELD_FIRST_OLD_SCHEMA = ['process'][source]
weaver.wps_restapi.swagger_definitions.PROCESS_DESCRIPTION_FIELD_AFTER_OLD_SCHEMA = ['links'][source]
weaver.wps_restapi.swagger_definitions.PROCESS_IO_FIELD_FIRST = ['id', 'title', 'description', 'minOccurs', 'maxOccurs'][source]
weaver.wps_restapi.swagger_definitions.PROCESS_IO_FIELD_AFTER = ['literalDataDomains', 'formats', 'crs', 'bbox'][source]
weaver.wps_restapi.swagger_definitions.PROCESSES_LISTING_FIELD_FIRST = ['description', 'processes', 'providers'][source]
weaver.wps_restapi.swagger_definitions.PROCESSES_LISTING_FIELD_AFTER = ['page', 'limit', 'total', 'links'][source]
weaver.wps_restapi.swagger_definitions.PROVIDER_DESCRIPTION_FIELD_FIRST = ['id', 'title', 'version', 'mutable', 'description', 'url', 'type', 'public', 'keywords', 'metadata'][source]
weaver.wps_restapi.swagger_definitions.PROVIDER_DESCRIPTION_FIELD_AFTER = ['links'][source]
weaver.wps_restapi.swagger_definitions.JOBS_LISTING_FIELD_FIRST = ['description', 'jobs', 'groups'][source]
weaver.wps_restapi.swagger_definitions.JOBS_LISTING_FIELD_AFTER = ['page', 'limit', 'total', 'links'][source]
weaver.wps_restapi.swagger_definitions.SCHEMA_EXAMPLE_DIR[source]
weaver.wps_restapi.swagger_definitions.EXAMPLES[source]
weaver.wps_restapi.swagger_definitions.path[source]
weaver.wps_restapi.swagger_definitions.TAG_API = API[source]
weaver.wps_restapi.swagger_definitions.TAG_JOBS = Jobs[source]
weaver.wps_restapi.swagger_definitions.TAG_VISIBILITY = Visibility[source]
weaver.wps_restapi.swagger_definitions.TAG_BILL_QUOTE = Billing & Quoting[source]
weaver.wps_restapi.swagger_definitions.TAG_PROVIDERS = Providers[source]
weaver.wps_restapi.swagger_definitions.TAG_PROCESSES = Processes[source]
weaver.wps_restapi.swagger_definitions.TAG_GETCAPABILITIES = GetCapabilities[source]
weaver.wps_restapi.swagger_definitions.TAG_DESCRIBEPROCESS = DescribeProcess[source]
weaver.wps_restapi.swagger_definitions.TAG_EXECUTE = Execute[source]
weaver.wps_restapi.swagger_definitions.TAG_DISMISS = Dismiss[source]
weaver.wps_restapi.swagger_definitions.TAG_STATUS = Status[source]
weaver.wps_restapi.swagger_definitions.TAG_DEPLOY = Deploy[source]
weaver.wps_restapi.swagger_definitions.TAG_RESULTS = Results[source]
weaver.wps_restapi.swagger_definitions.TAG_EXCEPTIONS = Exceptions[source]
weaver.wps_restapi.swagger_definitions.TAG_LOGS = Logs[source]
weaver.wps_restapi.swagger_definitions.TAG_STATISTICS = Statistics[source]
weaver.wps_restapi.swagger_definitions.TAG_VAULT = Vault[source]
weaver.wps_restapi.swagger_definitions.TAG_WPS = WPS[source]
weaver.wps_restapi.swagger_definitions.TAG_DEPRECATED = Deprecated Endpoints[source]
weaver.wps_restapi.swagger_definitions.api_frontpage_service[source]
weaver.wps_restapi.swagger_definitions.api_openapi_ui_service[source]
weaver.wps_restapi.swagger_definitions.api_swagger_ui_service[source]
weaver.wps_restapi.swagger_definitions.api_redoc_ui_service[source]
weaver.wps_restapi.swagger_definitions.api_versions_service[source]
weaver.wps_restapi.swagger_definitions.api_conformance_service[source]
weaver.wps_restapi.swagger_definitions.openapi_json_service[source]
weaver.wps_restapi.swagger_definitions.quotes_service[source]
weaver.wps_restapi.swagger_definitions.quote_service[source]
weaver.wps_restapi.swagger_definitions.bills_service[source]
weaver.wps_restapi.swagger_definitions.bill_service[source]
weaver.wps_restapi.swagger_definitions.jobs_service[source]
weaver.wps_restapi.swagger_definitions.job_service[source]
weaver.wps_restapi.swagger_definitions.job_results_service[source]
weaver.wps_restapi.swagger_definitions.job_exceptions_service[source]
weaver.wps_restapi.swagger_definitions.job_outputs_service[source]
weaver.wps_restapi.swagger_definitions.job_inputs_service[source]
weaver.wps_restapi.swagger_definitions.job_logs_service[source]
weaver.wps_restapi.swagger_definitions.job_stats_service[source]
weaver.wps_restapi.swagger_definitions.processes_service[source]
weaver.wps_restapi.swagger_definitions.process_service[source]
weaver.wps_restapi.swagger_definitions.process_quotes_service[source]
weaver.wps_restapi.swagger_definitions.process_quote_service[source]
weaver.wps_restapi.swagger_definitions.process_visibility_service[source]
weaver.wps_restapi.swagger_definitions.process_package_service[source]
weaver.wps_restapi.swagger_definitions.process_payload_service[source]
weaver.wps_restapi.swagger_definitions.process_jobs_service[source]
weaver.wps_restapi.swagger_definitions.process_job_service[source]
weaver.wps_restapi.swagger_definitions.process_results_service[source]
weaver.wps_restapi.swagger_definitions.process_inputs_service[source]
weaver.wps_restapi.swagger_definitions.process_outputs_service[source]
weaver.wps_restapi.swagger_definitions.process_exceptions_service[source]
weaver.wps_restapi.swagger_definitions.process_logs_service[source]
weaver.wps_restapi.swagger_definitions.process_stats_service[source]
weaver.wps_restapi.swagger_definitions.process_execution_service[source]
weaver.wps_restapi.swagger_definitions.providers_service[source]
weaver.wps_restapi.swagger_definitions.provider_service[source]
weaver.wps_restapi.swagger_definitions.provider_processes_service[source]
weaver.wps_restapi.swagger_definitions.provider_process_service[source]
weaver.wps_restapi.swagger_definitions.provider_jobs_service[source]
weaver.wps_restapi.swagger_definitions.provider_job_service[source]
weaver.wps_restapi.swagger_definitions.provider_results_service[source]
weaver.wps_restapi.swagger_definitions.provider_inputs_service[source]
weaver.wps_restapi.swagger_definitions.provider_outputs_service[source]
weaver.wps_restapi.swagger_definitions.provider_logs_service[source]
weaver.wps_restapi.swagger_definitions.provider_stats_service[source]
weaver.wps_restapi.swagger_definitions.provider_exceptions_service[source]
weaver.wps_restapi.swagger_definitions.provider_execution_service[source]
weaver.wps_restapi.swagger_definitions.job_result_service[source]
weaver.wps_restapi.swagger_definitions.process_result_service[source]
weaver.wps_restapi.swagger_definitions.provider_result_service[source]
weaver.wps_restapi.swagger_definitions.vault_service[source]
weaver.wps_restapi.swagger_definitions.vault_file_service[source]
class weaver.wps_restapi.swagger_definitions.SLUG(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Slug name pattern.[source]
example = some-object-slug-name[source]
pattern[source]
class weaver.wps_restapi.swagger_definitions.Tag(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Identifier with optional tagged version forming a unique reference.[source]
pattern[source]
class weaver.wps_restapi.swagger_definitions.URL(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = URL reference.[source]
format = url[source]
class weaver.wps_restapi.swagger_definitions.MediaType(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = IANA identifier of content and format.[source]
example[source]
pattern[source]
class weaver.wps_restapi.swagger_definitions.QueryBoolean(*_: Any, **__: Any)[source]

A type representing a boolean object.

The constructor accepts these keyword arguments:

  • false_choices: The set of strings representing a False value on deserialization.

  • true_choices: The set of strings representing a True value on deserialization.

  • false_val: The value returned on serialization of a False value.

  • true_val: The value returned on serialization of a True value.

During deserialization, a value contained in false_choices, will be considered False.

The behaviour for values not contained in false_choices depends on true_choices: if it’s empty, any value is considered True; otherwise, only values contained in true_choices are considered True, and an Invalid exception would be raised for values outside of both false_choices and true_choices.

Serialization will produce true_val or false_val based on the value.

If the colander.null value is passed to the serialize method of this class, the colander.null value will be returned.

The subnodes of the colander.SchemaNode that wraps this type are ignored.

Initializes the extended boolean schema node.

When arguments true_choices or false_choices are provided, the corresponding string values are respectively considered as valid truthy/falsy values. Otherwise (default), strict values only of explicit type bool will be considered valid.

When values are specified colander converts them to string lowercase to compare against truthy/falsy values it should accept. For real OpenAPI typing validation, do NOT add other values like "1" to avoid conflict with ExtendedInteger type for schemas that support both variants. If an OpenAPI field is expected to support truthy/falsy values, it is recommended to explicitly define its schema using a oneOf keyword of all relevant schemas it supports, an any applicable validators for explicit values. This is the safest way to ensure the generated OpenAPI schema corresponds to expected type validation.

description = Boolean query parameter that allows handles common truthy/falsy values.[source]
class weaver.wps_restapi.swagger_definitions.DateTimeInterval(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = DateTime format against OGC API - Processes, to get values before a certain date-time use '../'...[source]
example = 2022-03-02T03:32:38.487000+00:00/..[source]
regex_datetime[source]
regex_interval_closed[source]
regex_interval_open_start[source]
regex_interval_open_end[source]
pattern[source]
class weaver.wps_restapi.swagger_definitions.S3BucketReference(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = S3 bucket shorthand URL representation: 's3://{bucket}/[{dirs}/][{file-key}]'[source]
pattern[source]
class weaver.wps_restapi.swagger_definitions.FileLocal(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Local file reference.[source]
format = file[source]
pattern[source]
class weaver.wps_restapi.swagger_definitions.FileURL(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = URL file reference.[source]
format = url[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.VaultReference(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Vault file reference.[source]
example = vault://399dc5ac-ff66-48d9-9c02-b144a975abe4[source]
pattern[source]
class weaver.wps_restapi.swagger_definitions.ProcessURL(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Process URL reference.[source]
format = url[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.ReferenceURL(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

_any_of[source]
class weaver.wps_restapi.swagger_definitions.ExecuteReferenceURL(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

_any_of[source]
class weaver.wps_restapi.swagger_definitions.UUID(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Unique identifier.[source]
example = a9d14bf4-84e0-449a-bac8-16e598efe807[source]
format = uuid[source]
pattern[source]
title = UUID[source]
class weaver.wps_restapi.swagger_definitions.AnyIdentifier(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

class weaver.wps_restapi.swagger_definitions.ProcessIdentifier(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

description = Process identifier.[source]
_any_of[source]
class weaver.wps_restapi.swagger_definitions.ProcessIdentifierTag(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

description = Process identifier with optional revision tag.[source]
_any_of[source]
class weaver.wps_restapi.swagger_definitions.Version(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Version string.[source]
example = 1.2.3[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.ContentTypeHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

name = Content-Type[source]
schema_type[source]
class weaver.wps_restapi.swagger_definitions.ContentLengthHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

name = Content-Length[source]
schema_type[source]
example = 125[source]
class weaver.wps_restapi.swagger_definitions.ContentDispositionHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

name = Content-Disposition[source]
schema_type[source]
example = attachment; filename=test.json[source]
class weaver.wps_restapi.swagger_definitions.DateHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

description = Creation date and time of the contents.[source]
name = Date[source]
schema_type[source]
example = Thu, 13 Jan 2022 12:37:19 GMT[source]
class weaver.wps_restapi.swagger_definitions.LastModifiedHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

description = Modification date and time of the contents.[source]
name = Last-Modified[source]
schema_type[source]
example = Thu, 13 Jan 2022 12:37:19 GMT[source]
class weaver.wps_restapi.swagger_definitions.AcceptHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

name = Accept[source]
schema_type[source]
validator[source]
missing[source]
default[source]
class weaver.wps_restapi.swagger_definitions.AcceptLanguageHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

name = Accept-Language[source]
schema_type[source]
missing[source]
default[source]
class weaver.wps_restapi.swagger_definitions.JsonHeader(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

content_type[source]
class weaver.wps_restapi.swagger_definitions.HtmlHeader(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

content_type[source]
class weaver.wps_restapi.swagger_definitions.XmlHeader(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

content_type[source]
class weaver.wps_restapi.swagger_definitions.XAuthDockerHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

summary = Authentication header for private Docker registry access.[source]
description[source]
name = X-Auth-Docker[source]
example = Basic {base64-auth-credentials}[source]
schema_type[source]
missing[source]
class weaver.wps_restapi.swagger_definitions.RequestContentTypeHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

example[source]
default[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.ResponseContentTypeHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

example[source]
default[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.RequestHeaders(*args, **kwargs)[source]

Headers that can indicate how to adjust the behavior and/or result to be provided in the response.

accept[source]
accept_language[source]
content_type[source]
class weaver.wps_restapi.swagger_definitions.ResponseHeaders(*args, **kwargs)[source]

Headers describing resulting response.

content_type[source]
class weaver.wps_restapi.swagger_definitions.RedirectHeaders(*args, **kwargs)[source]

Headers describing resulting response.

Location[source]
class weaver.wps_restapi.swagger_definitions.AcceptFormatHeaders(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

accept[source]
accept_language[source]
class weaver.wps_restapi.swagger_definitions.OutputFormatQuery(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Output format selector for requested contents.[source]
example[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.FormatQueryValue(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.FormatQuery(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

f[source]
format[source]
class weaver.wps_restapi.swagger_definitions.NoContent(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Empty response body.[source]
default[source]
class weaver.wps_restapi.swagger_definitions.FileUploadHeaders(*args, **kwargs)[source]

Headers that can indicate how to adjust the behavior and/or result to be provided in the response.

content_type[source]
content_length[source]
content_disposition[source]
class weaver.wps_restapi.swagger_definitions.FileUploadContent(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Contents of the file being uploaded with multipart. When prefixed with 'Content-Type:...[source]
class weaver.wps_restapi.swagger_definitions.FileResponseHeaders(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

content_type[source]
content_length[source]
content_disposition[source]
date[source]
last_modified[source]
class weaver.wps_restapi.swagger_definitions.AccessToken(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
class weaver.wps_restapi.swagger_definitions.DescriptionSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description[source]
class weaver.wps_restapi.swagger_definitions.KeywordList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

keyword[source]
class weaver.wps_restapi.swagger_definitions.Language(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
example[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.ValueLanguage(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

lang[source]
class weaver.wps_restapi.swagger_definitions.LinkLanguage(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

hreflang[source]
class weaver.wps_restapi.swagger_definitions.LinkHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
example = <http://example.com>; rel="relation"; type=text/plain[source]
class weaver.wps_restapi.swagger_definitions.MetadataBase(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

title[source]
class weaver.wps_restapi.swagger_definitions.MetadataRole(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

role[source]
class weaver.wps_restapi.swagger_definitions.LinkRelationshipType(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

description = Link relation as registered or extension type (see...[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.LinkRelationship(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

rel[source]
class weaver.wps_restapi.swagger_definitions.LinkBase(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

href[source]
type[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.MetadataValue(*args, **kwargs)[source]

Allows specifying specific schema conditions that fails underlying schema definition validation if present.

Corresponds to the not specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class MappingWithType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class MappingWithoutType(NotKeywordSchema, RequiredItem):
    _not = [MappingWithType()]

class MappingOnlyNotType(NotKeywordSchema):
    _not = [MappingWithType()]

# following will raise invalid error even if 'item' is valid because 'type' is also present
MappingWithoutType().deserialize({"type": "invalid", "item": "valid"})

# following will return successfully with only 'item' because 'type' was not present
MappingWithoutType().deserialize({"item": "valid", "value": "ignore"})
# result: {"item": "valid"}

# following will return an empty mapping dropping 'item' since it only needs to ensure 'type' was not present,
# but did not provide any additional fields requirement from other class inheritances
MappingOnlyNotType().deserialize({"item": "valid"})
# result: {}

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

_not[source]
value[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.MetadataContent(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.Metadata(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

class weaver.wps_restapi.swagger_definitions.MetadataList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

metadata[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

description = List of links relative to the applicable object.[source]
title = Links[source]
class weaver.wps_restapi.swagger_definitions.LandingPage(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.FormatSchema(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
deserialize(cstruct)[source]

Deserialize the cstruct into an appstruct based on the schema, run this appstruct through the preparer, if one is present, then validate the prepared appstruct. The cstruct value is deserialized into an appstruct unconditionally.

If appstruct returned by type deserialization and preparation is the value colander.null, do something special before attempting validation:

  • If the missing attribute of this node has been set explicitly, return its value. No validation of this value is performed; it is simply returned.

  • If the missing attribute of this node has not been set explicitly, raise a colander.Invalid exception error.

If the appstruct is not colander.null and cannot be validated , a colander.Invalid exception will be raised.

If a cstruct argument is not explicitly provided, it defaults to colander.null.

class weaver.wps_restapi.swagger_definitions.FormatMimeType(*args, **kwargs)[source]

Used to respect mimeType field to work with pre-existing processes.

mimeType[source]
encoding[source]
schema[source]
class weaver.wps_restapi.swagger_definitions.Format(*args, **kwargs)[source]

Used to respect mediaType field as suggested per OGC-API.

schema_ref[source]
mediaType[source]
encoding[source]
schema[source]
class weaver.wps_restapi.swagger_definitions.FormatDefaultMimeType(*args, **kwargs)[source]

Used to respect mimeType field to work with pre-existing processes.

description = Format for process input are assumed plain/text if the media-type was omitted and is not one of...[source]
mimeType[source]
class weaver.wps_restapi.swagger_definitions.FormatDefaultMediaType(*args, **kwargs)[source]

Used to respect mediaType field as suggested per OGC-API.

description = Format for process input are assumed plain/text if the media-type was omitted and is not one of...[source]
mediaType[source]
class weaver.wps_restapi.swagger_definitions.FormatSelection(*args, **kwargs)[source]

Validation against mimeType or mediaType format.

Note

Format are validated to be retro-compatible with pre-existing/deployed/remote processes.

_one_of[source]
class weaver.wps_restapi.swagger_definitions.FormatDescription(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

maximumMegabytes[source]
class weaver.wps_restapi.swagger_definitions.FormatDefault(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

default[source]
class weaver.wps_restapi.swagger_definitions.DescriptionFormat(*args, **kwargs)[source]

Used to respect mediaType field as suggested per OGC-API.

class weaver.wps_restapi.swagger_definitions.DeploymentFormat(*args, **kwargs)[source]

Validation against mimeType or mediaType format.

Note

Format are validated to be retro-compatible with pre-existing/deployed/remote processes.

class weaver.wps_restapi.swagger_definitions.ResultFormat(*args, **kwargs)[source]

Format employed for reference results respecting ‘OGC API - Processes’ schemas.

schema_ref[source]
mediaType[source]
encoding[source]
schema[source]
class weaver.wps_restapi.swagger_definitions.DescriptionFormatList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

format_item[source]
class weaver.wps_restapi.swagger_definitions.DeploymentFormatList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

format_item[source]
class weaver.wps_restapi.swagger_definitions.AdditionalParameterUnique(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.AdditionalParameterListing(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

param[source]
class weaver.wps_restapi.swagger_definitions.AdditionalParameterValues(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.AdditionalParameterDefinition(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name[source]
values[source]
class weaver.wps_restapi.swagger_definitions.AdditionalParameterList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

param[source]
class weaver.wps_restapi.swagger_definitions.AdditionalParametersMeta(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.AdditionalParameters(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

parameters[source]
class weaver.wps_restapi.swagger_definitions.AdditionalParametersItem(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

_any_of[source]
class weaver.wps_restapi.swagger_definitions.AdditionalParametersList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

additionalParameter[source]
class weaver.wps_restapi.swagger_definitions.Content(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

href[source]
class weaver.wps_restapi.swagger_definitions.Offering(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

code[source]
content[source]
class weaver.wps_restapi.swagger_definitions.OWSContext(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = OGC Web Service definition from an URL reference.[source]
title = owsContext[source]
offering[source]
class weaver.wps_restapi.swagger_definitions.DescriptionBase(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

title[source]
description[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.ProcessContext(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

owsContext[source]
class weaver.wps_restapi.swagger_definitions.DescriptionExtra(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

additionalParameters[source]
class weaver.wps_restapi.swagger_definitions.DescriptionType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.DeploymentType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

deprecated = True[source]
abstract[source]
class weaver.wps_restapi.swagger_definitions.DescriptionMeta(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

keywords[source]
metadata[source]
class weaver.wps_restapi.swagger_definitions.ProcessDeployMeta(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

keywords[source]
metadata[source]
class weaver.wps_restapi.swagger_definitions.InputOutputDescriptionMeta(*args: Any, **kwargs: Any)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.ReferenceOAS(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema_ref[source]
_ref[source]
class weaver.wps_restapi.swagger_definitions.TypeOAS(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

name = type[source]
schema_type[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.EnumItemOAS(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.EnumOAS(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

enum[source]
class weaver.wps_restapi.swagger_definitions.RequiredOAS(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

required_field[source]
class weaver.wps_restapi.swagger_definitions.MultipleOfOAS(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.PermissiveDefinitionOAS(*args, **kwargs)[source]

Allows specifying specific schema conditions that fails underlying schema definition validation if present.

Corresponds to the not specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class MappingWithType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class MappingWithoutType(NotKeywordSchema, RequiredItem):
    _not = [MappingWithType()]

class MappingOnlyNotType(NotKeywordSchema):
    _not = [MappingWithType()]

# following will raise invalid error even if 'item' is valid because 'type' is also present
MappingWithoutType().deserialize({"type": "invalid", "item": "valid"})

# following will return successfully with only 'item' because 'type' was not present
MappingWithoutType().deserialize({"item": "valid", "value": "ignore"})
# result: {"item": "valid"}

# following will return an empty mapping dropping 'item' since it only needs to ensure 'type' was not present,
# but did not provide any additional fields requirement from other class inheritances
MappingOnlyNotType().deserialize({"item": "valid"})
# result: {}

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

_not[source]
class weaver.wps_restapi.swagger_definitions.PseudoObjectOAS(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.KeywordObjectOAS(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

item[source]
class weaver.wps_restapi.swagger_definitions.AdditionalPropertiesOAS(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.AnyValueOAS(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

_any_of[source]
class weaver.wps_restapi.swagger_definitions.PropertyOAS(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_type[source]
_format[source]
default[source]
example[source]
title[source]
description[source]
enum[source]
items[source]
required[source]
nullable[source]
deprecated[source]
read_only[source]
write_only[source]
multiple_of[source]
minimum[source]
maximum[source]
exclusive_min[source]
exclusive_max[source]
min_length[source]
max_length[source]
pattern[source]
min_items[source]
max_items[source]
unique_items[source]
min_prop[source]
max_prop[source]
content_type[source]
content_encode[source]
content_schema[source]
_not_key[source]
_all_of[source]
_any_of[source]
_one_of[source]
x_props[source]
properties[source]
class weaver.wps_restapi.swagger_definitions.AnyPropertyOAS(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.ObjectPropertiesOAS(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

property_name[source]
class weaver.wps_restapi.swagger_definitions.ObjectOAS(*args, **kwargs)[source]

Allows specifying specific schema conditions that fails underlying schema definition validation if present.

Corresponds to the not specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class MappingWithType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class MappingWithoutType(NotKeywordSchema, RequiredItem):
    _not = [MappingWithType()]

class MappingOnlyNotType(NotKeywordSchema):
    _not = [MappingWithType()]

# following will raise invalid error even if 'item' is valid because 'type' is also present
MappingWithoutType().deserialize({"type": "invalid", "item": "valid"})

# following will return successfully with only 'item' because 'type' was not present
MappingWithoutType().deserialize({"item": "valid", "value": "ignore"})
# result: {"item": "valid"}

# following will return an empty mapping dropping 'item' since it only needs to ensure 'type' was not present,
# but did not provide any additional fields requirement from other class inheritances
MappingOnlyNotType().deserialize({"item": "valid"})
# result: {}

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

_not[source]
_type[source]
properties[source]
class weaver.wps_restapi.swagger_definitions.DefinitionOAS(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

_any_of[source]
class weaver.wps_restapi.swagger_definitions.OAS(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

description = OpenAPI schema definition.[source]
schema_ref[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.InputOutputDescriptionSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema[source]
class weaver.wps_restapi.swagger_definitions.MinOccursDefinition(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

description = Minimum amount of values required for this input.[source]
title = MinOccurs[source]
example = 1[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.MaxOccursDefinition(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

description = Maximum amount of values allowed for this input.[source]
title = MaxOccurs[source]
example = 1[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.DescribeMinMaxOccurs(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

minOccurs[source]
maxOccurs[source]
class weaver.wps_restapi.swagger_definitions.DeployMinMaxOccurs(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

minOccurs[source]
maxOccurs[source]
class weaver.wps_restapi.swagger_definitions.ProcessDescriptionType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

id[source]
version[source]
mutable[source]
class weaver.wps_restapi.swagger_definitions.InputIdentifierType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

id[source]
class weaver.wps_restapi.swagger_definitions.OutputIdentifierType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

id[source]
class weaver.wps_restapi.swagger_definitions.DescribeWithFormats(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

formats[source]
class weaver.wps_restapi.swagger_definitions.DeployWithFormats(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

formats[source]
class weaver.wps_restapi.swagger_definitions.DescribeComplexInputType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.DeployComplexInputType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.SupportedCRS(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

crs[source]
default[source]
class weaver.wps_restapi.swagger_definitions.SupportedCRSList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

crs[source]
class weaver.wps_restapi.swagger_definitions.BoundingBoxInputType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

supportedCRS[source]
class weaver.wps_restapi.swagger_definitions.AnyLiteralType(*args, **kwargs)[source]

Submitted values that correspond to literal data.

_one_of[source]
class weaver.wps_restapi.swagger_definitions.NumberType(*args, **kwargs)[source]

Represents a literal number, integer or float.

_one_of[source]
class weaver.wps_restapi.swagger_definitions.NumericType(*args, **kwargs)[source]

Represents a numeric-like value.

_one_of[source]
class weaver.wps_restapi.swagger_definitions.LiteralReference(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

reference[source]
class weaver.wps_restapi.swagger_definitions.NameReferenceType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema_ref[source]
name[source]
reference[source]
class weaver.wps_restapi.swagger_definitions.DataTypeSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Type of the literal data representation.[source]
title = DataType[source]
name[source]
class weaver.wps_restapi.swagger_definitions.UomSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

title = UnitOfMeasure[source]
class weaver.wps_restapi.swagger_definitions.AllowedValuesList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

value[source]
class weaver.wps_restapi.swagger_definitions.AllowedRange(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

minimumValue[source]
maximumValue[source]
spacing[source]
rangeClosure[source]
class weaver.wps_restapi.swagger_definitions.AllowedRangesList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

range[source]
class weaver.wps_restapi.swagger_definitions.AllowedValues(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.AnyValue(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

anyValue[source]
class weaver.wps_restapi.swagger_definitions.ValuesReference(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

description = URL where to retrieve applicable values.[source]
class weaver.wps_restapi.swagger_definitions.ArrayLiteralType(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

value_item[source]
class weaver.wps_restapi.swagger_definitions.ArrayLiteralDataType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

data[source]
class weaver.wps_restapi.swagger_definitions.ArrayLiteralValueType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

value[source]
class weaver.wps_restapi.swagger_definitions.AnyLiteralDataType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

data[source]
class weaver.wps_restapi.swagger_definitions.AnyLiteralValueType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

value[source]
class weaver.wps_restapi.swagger_definitions.AnyLiteralDefaultType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

default[source]
class weaver.wps_restapi.swagger_definitions.LiteralDataValueDefinition(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.LiteralDataDomain(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

default[source]
defaultValue[source]
dataType[source]
uom[source]
valueDefinition[source]
class weaver.wps_restapi.swagger_definitions.LiteralDataDomainList(*args, **kwargs)[source]

Constraints that apply to the literal data values.

literalDataDomain[source]
class weaver.wps_restapi.swagger_definitions.LiteralDataType(*args, **kwargs)[source]

Allows specifying specific schema conditions that fails underlying schema definition validation if present.

Corresponds to the not specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class MappingWithType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class MappingWithoutType(NotKeywordSchema, RequiredItem):
    _not = [MappingWithType()]

class MappingOnlyNotType(NotKeywordSchema):
    _not = [MappingWithType()]

# following will raise invalid error even if 'item' is valid because 'type' is also present
MappingWithoutType().deserialize({"type": "invalid", "item": "valid"})

# following will return successfully with only 'item' because 'type' was not present
MappingWithoutType().deserialize({"item": "valid", "value": "ignore"})
# result: {"item": "valid"}

# following will return an empty mapping dropping 'item' since it only needs to ensure 'type' was not present,
# but did not provide any additional fields requirement from other class inheritances
MappingOnlyNotType().deserialize({"item": "valid"})
# result: {}

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

literalDataDomains[source]
_not[source]
class weaver.wps_restapi.swagger_definitions.LiteralInputType(*args, **kwargs)[source]

Allows specifying specific schema conditions that fails underlying schema definition validation if present.

Corresponds to the not specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class MappingWithType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class MappingWithoutType(NotKeywordSchema, RequiredItem):
    _not = [MappingWithType()]

class MappingOnlyNotType(NotKeywordSchema):
    _not = [MappingWithType()]

# following will raise invalid error even if 'item' is valid because 'type' is also present
MappingWithoutType().deserialize({"type": "invalid", "item": "valid"})

# following will return successfully with only 'item' because 'type' was not present
MappingWithoutType().deserialize({"item": "valid", "value": "ignore"})
# result: {"item": "valid"}

# following will return an empty mapping dropping 'item' since it only needs to ensure 'type' was not present,
# but did not provide any additional fields requirement from other class inheritances
MappingOnlyNotType().deserialize({"item": "valid"})
# result: {}

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

class weaver.wps_restapi.swagger_definitions.DescribeInputTypeDefinition(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.DeployInputTypeDefinition(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.DescribeInputType(*args, **kwargs)[source]

Allows specifying all the required partial mapping schemas for an underlying complete schema definition.

Corresponds to the allOf specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class AllRequired(AnyKeywordSchema):
    _all_of = [RequiredItem(), RequiredType()]

Value parsed with schema this definition will be valid only when every since one of the sub-schemas is valid. Any sub-schema raising an invalid error for any reason with make the whole schema validation fail.

See also

  • OneOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_all_of[source]
_sort_first[source]
_sort_after[source]
class weaver.wps_restapi.swagger_definitions.DescribeInputTypeWithID(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

title = DescribeInputTypeWithID[source]
class weaver.wps_restapi.swagger_definitions.DeployInputType(*args, **kwargs)[source]

Allows specifying all the required partial mapping schemas for an underlying complete schema definition.

Corresponds to the allOf specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class AllRequired(AnyKeywordSchema):
    _all_of = [RequiredItem(), RequiredType()]

Value parsed with schema this definition will be valid only when every since one of the sub-schemas is valid. Any sub-schema raising an invalid error for any reason with make the whole schema validation fail.

See also

  • OneOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_all_of[source]
_sort_first[source]
_sort_after[source]
class weaver.wps_restapi.swagger_definitions.DeployInputTypeWithID(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.DescribeInputTypeList(*args, **kwargs)[source]

Listing of process inputs descriptions.

input[source]
class weaver.wps_restapi.swagger_definitions.DescribeInputTypeMap(*args: Any, **kwargs: Any)[source]

Description of all process inputs under mapping.

input_id[source]
class weaver.wps_restapi.swagger_definitions.DeployInputTypeList(*args, **kwargs)[source]

Listing of process input definitions to deploy.

input_item[source]
class weaver.wps_restapi.swagger_definitions.DeployInputTypeMap(*args: Any, **kwargs: Any)[source]

Definition of all process inputs under mapping.

input_id[source]
class weaver.wps_restapi.swagger_definitions.DeployInputTypeAny(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.LiteralOutputType(*args, **kwargs)[source]

Allows specifying specific schema conditions that fails underlying schema definition validation if present.

Corresponds to the not specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class MappingWithType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class MappingWithoutType(NotKeywordSchema, RequiredItem):
    _not = [MappingWithType()]

class MappingOnlyNotType(NotKeywordSchema):
    _not = [MappingWithType()]

# following will raise invalid error even if 'item' is valid because 'type' is also present
MappingWithoutType().deserialize({"type": "invalid", "item": "valid"})

# following will return successfully with only 'item' because 'type' was not present
MappingWithoutType().deserialize({"item": "valid", "value": "ignore"})
# result: {"item": "valid"}

# following will return an empty mapping dropping 'item' since it only needs to ensure 'type' was not present,
# but did not provide any additional fields requirement from other class inheritances
MappingOnlyNotType().deserialize({"item": "valid"})
# result: {}

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

class weaver.wps_restapi.swagger_definitions.BoundingBoxOutputType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

supportedCRS[source]
class weaver.wps_restapi.swagger_definitions.DescribeComplexOutputType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.DeployComplexOutputType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.DescribeOutputTypeDefinition(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.DeployOutputTypeDefinition(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.DescribeOutputType(*args, **kwargs)[source]

Allows specifying all the required partial mapping schemas for an underlying complete schema definition.

Corresponds to the allOf specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class AllRequired(AnyKeywordSchema):
    _all_of = [RequiredItem(), RequiredType()]

Value parsed with schema this definition will be valid only when every since one of the sub-schemas is valid. Any sub-schema raising an invalid error for any reason with make the whole schema validation fail.

See also

  • OneOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_all_of[source]
_sort_first[source]
_sort_after[source]
class weaver.wps_restapi.swagger_definitions.DescribeOutputTypeWithID(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.DescribeOutputTypeList(*args, **kwargs)[source]

Listing of process outputs descriptions.

output[source]
class weaver.wps_restapi.swagger_definitions.DescribeOutputTypeMap(*args: Any, **kwargs: Any)[source]

Definition of all process outputs under mapping.

output_id[source]
class weaver.wps_restapi.swagger_definitions.DeployOutputType(*args, **kwargs)[source]

Allows specifying all the required partial mapping schemas for an underlying complete schema definition.

Corresponds to the allOf specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class AllRequired(AnyKeywordSchema):
    _all_of = [RequiredItem(), RequiredType()]

Value parsed with schema this definition will be valid only when every since one of the sub-schemas is valid. Any sub-schema raising an invalid error for any reason with make the whole schema validation fail.

See also

  • OneOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_all_of[source]
_sort_first[source]
_sort_after[source]
class weaver.wps_restapi.swagger_definitions.DeployOutputTypeWithID(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.DeployOutputTypeList(*args, **kwargs)[source]

Listing of process output definitions to deploy.

input[source]
class weaver.wps_restapi.swagger_definitions.DeployOutputTypeMap(*args: Any, **kwargs: Any)[source]

Definition of all process outputs under mapping.

input_id[source]
class weaver.wps_restapi.swagger_definitions.DeployOutputTypeAny(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.JobExecuteModeEnum(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_ref[source]
schema_type[source]
title = JobExecuteMode[source]
example[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.JobControlOptionsEnum(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
title = JobControlOptions[source]
default[source]
example[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.JobResponseOptionsEnum(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_ref[source]
schema_type[source]
title = JobResponseOptions[source]
example[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.TransmissionModeEnum(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
title = TransmissionMode[source]
default[source]
example[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.JobStatusEnum(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
title = JobStatus[source]
default[source]
example[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.JobStatusSearchEnum(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
title = JobStatusSearch[source]
default[source]
example[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.JobTypeEnum(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
title = JobType[source]
default[source]
example = process[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.JobSortEnum(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
title = JobSortingMethod[source]
default[source]
example[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.ProcessSortEnum(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
title = ProcessSortMethod[source]
default[source]
example[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.QuoteSortEnum(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
title = QuoteSortingMethod[source]
default[source]
example[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.JobTagsCommaSeparated(*arg, **kw)[source]

Utility that will automatically deserialize a string to its list representation using the validator delimiter.

See also

  • CommaSeparated

  • StringOneOf

In order to use this utility, it is important to place it first in the schema node class definition.

class NewNodeSchema(ExpandStringList, ExtendedSchemaNode):
    schema_type = String
    validator = CommaSeparated()
schema_type[source]
validator[source]
default[source]
missing[source]
description[source]
class weaver.wps_restapi.swagger_definitions.JobGroupsCommaSeparated(*arg, **kw)[source]

Utility that will automatically deserialize a string to its list representation using the validator delimiter.

See also

  • CommaSeparated

  • StringOneOf

In order to use this utility, it is important to place it first in the schema node class definition.

class NewNodeSchema(ExpandStringList, ExtendedSchemaNode):
    schema_type = String
    validator = CommaSeparated()
schema_type[source]
default[source]
example = process,service[source]
missing[source]
description = Comma-separated list of grouping fields with which to list jobs.[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.LaunchJobQuerystring(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

tags[source]
class weaver.wps_restapi.swagger_definitions.VisibilityValue(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
validator[source]
example[source]
class weaver.wps_restapi.swagger_definitions.JobAccess(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

class weaver.wps_restapi.swagger_definitions.VisibilitySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

value[source]
class weaver.wps_restapi.swagger_definitions.LocalProcessQuery(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

version[source]
class weaver.wps_restapi.swagger_definitions.LocalProcessPath(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

process_id[source]
class weaver.wps_restapi.swagger_definitions.ProviderPath(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

provider_id[source]
class weaver.wps_restapi.swagger_definitions.ProviderProcessPath(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

process_id[source]
class weaver.wps_restapi.swagger_definitions.JobPath(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

job_id[source]
class weaver.wps_restapi.swagger_definitions.BillPath(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

bill_id[source]
class weaver.wps_restapi.swagger_definitions.QuotePath(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

quote_id[source]
class weaver.wps_restapi.swagger_definitions.ResultPath(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

result_id[source]
class weaver.wps_restapi.swagger_definitions.FrontpageEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.VersionsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.ConformanceQueries(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

category[source]
class weaver.wps_restapi.swagger_definitions.ConformanceEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.OpenAPIAcceptHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

default[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.OpenAPIRequestHeaders(*args, **kwargs)[source]

Headers that can indicate how to adjust the behavior and/or result to be provided in the response.

accept[source]
class weaver.wps_restapi.swagger_definitions.OpenAPIEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.SwaggerUIEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.RedocUIEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.OWSNamespace[source]

Object that provides mapping to known XML extensions for OpenAPI schema definition.

Name of the schema definition in the OpenAPI will use prefix and the schema class name. Prefix can be omitted from the schema definition name by setting it to colander.drop. The value of title provided as option or

prefix = ows[source]
namespace = http://www.opengis.net/ows/1.1[source]
class weaver.wps_restapi.swagger_definitions.WPSNamespace[source]

Object that provides mapping to known XML extensions for OpenAPI schema definition.

Name of the schema definition in the OpenAPI will use prefix and the schema class name. Prefix can be omitted from the schema definition name by setting it to colander.drop. The value of title provided as option or

prefix = wps[source]
namespace = http://www.opengis.net/wps/1.0.0[source]
class weaver.wps_restapi.swagger_definitions.XMLNamespace[source]

Object that provides mapping to known XML extensions for OpenAPI schema definition.

Name of the schema definition in the OpenAPI will use prefix and the schema class name. Prefix can be omitted from the schema definition name by setting it to colander.drop. The value of title provided as option or

prefix = xml[source]
class weaver.wps_restapi.swagger_definitions.XMLReferenceAttribute(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
attribute = True[source]
name = href[source]
prefix = xlink[source]
format = url[source]
class weaver.wps_restapi.swagger_definitions.MimeTypeAttribute(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
attribute = True[source]
name = mimeType[source]
prefix[source]
example[source]
class weaver.wps_restapi.swagger_definitions.EncodingAttribute(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
attribute = True[source]
name = encoding[source]
prefix[source]
example = UTF-8[source]
class weaver.wps_restapi.swagger_definitions.OWSVersion(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = Version[source]
default = 1.0.0[source]
example = 1.0.0[source]
class weaver.wps_restapi.swagger_definitions.OWSAcceptVersions(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

description = Accepted versions to produce the response.[source]
name = AcceptVersions[source]
item[source]
class weaver.wps_restapi.swagger_definitions.OWSLanguage(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

description = Desired language to produce the response.[source]
schema_type[source]
name = Language[source]
default[source]
example[source]
class weaver.wps_restapi.swagger_definitions.OWSLanguageAttribute(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

description = RFC-4646 language code of the human-readable text.[source]
name = language[source]
attribute = True[source]
class weaver.wps_restapi.swagger_definitions.OWSService(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

description = Desired service to produce the response (SHOULD be 'WPS').[source]
schema_type[source]
name = service[source]
attribute = True[source]
default[source]
example[source]
class weaver.wps_restapi.swagger_definitions.WPSServiceAttribute(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = service[source]
attribute = True[source]
default = WPS[source]
example = WPS[source]
class weaver.wps_restapi.swagger_definitions.WPSVersionAttribute(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = version[source]
attribute = True[source]
default = 1.0.0[source]
example = 1.0.0[source]
class weaver.wps_restapi.swagger_definitions.WPSLanguageAttribute(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = lang[source]
attribute = True[source]
default[source]
example[source]
class weaver.wps_restapi.swagger_definitions.WPSParameters(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

service[source]
request[source]
version[source]
identifier[source]
data_inputs[source]
class weaver.wps_restapi.swagger_definitions.WPSOperationGetNoContent(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = No content body provided (GET requests).[source]
default[source]
class weaver.wps_restapi.swagger_definitions.WPSOperationPost(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema_ref = http://schemas.opengis.net/wps/1.0.0/common/RequestBaseType.xsd[source]
accepted_versions[source]
language[source]
service[source]
class weaver.wps_restapi.swagger_definitions.WPSGetCapabilitiesPost(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema_ref = http://schemas.opengis.net/wps/1.0.0/wpsGetCapabilities_request.xsd[source]
name = GetCapabilities[source]
title = GetCapabilities[source]
class weaver.wps_restapi.swagger_definitions.OWSIdentifier(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = Identifier[source]
class weaver.wps_restapi.swagger_definitions.OWSIdentifierList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

name = Identifiers[source]
item[source]
class weaver.wps_restapi.swagger_definitions.OWSTitle(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = Title[source]
class weaver.wps_restapi.swagger_definitions.OWSAbstract(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = Abstract[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_name = Metadata[source]
schema_type[source]
attribute = True[source]
name = Metadata[source]
prefix = xlink[source]
example = WPS[source]
wrapped = False[source]
class weaver.wps_restapi.swagger_definitions.OWSMetadata(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

schema_type[source]
name = Metadata[source]
title[source]
class weaver.wps_restapi.swagger_definitions.WPSDescribeProcessPost(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema_ref = http://schemas.opengis.net/wps/1.0.0/wpsDescribeProcess_request.xsd[source]
name = DescribeProcess[source]
title = DescribeProcess[source]
identifier[source]
class weaver.wps_restapi.swagger_definitions.WPSExecuteDataInputs(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = XML data inputs provided for WPS POST request (Execute).[source]
name = DataInputs[source]
title = DataInputs[source]
class weaver.wps_restapi.swagger_definitions.WPSExecutePost(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema_ref = http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd[source]
name = Execute[source]
title = Execute[source]
identifier[source]
dataInputs[source]
class weaver.wps_restapi.swagger_definitions.WPSRequestBody(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
examples[source]
class weaver.wps_restapi.swagger_definitions.WPSHeaders(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

accept[source]
class weaver.wps_restapi.swagger_definitions.WPSEndpointGet(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
body[source]
class weaver.wps_restapi.swagger_definitions.WPSEndpointPost(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.XMLBooleanAttribute(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
attribute = True[source]
class weaver.wps_restapi.swagger_definitions.XMLString(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
class weaver.wps_restapi.swagger_definitions.OWSString(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
class weaver.wps_restapi.swagger_definitions.OWSKeywordList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

title = OWSKeywords[source]
keyword[source]
class weaver.wps_restapi.swagger_definitions.OWSType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema_type[source]
name = Type[source]
example = theme[source]
additionalProperties[source]
class weaver.wps_restapi.swagger_definitions.OWSPhone(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = Phone[source]
voice[source]
facsimile[source]
class weaver.wps_restapi.swagger_definitions.OWSAddress(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = Address[source]
delivery_point[source]
city[source]
country[source]
admin_area[source]
postal_code[source]
email[source]
class weaver.wps_restapi.swagger_definitions.OWSContactInfo(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = ContactInfo[source]
phone[source]
address[source]
class weaver.wps_restapi.swagger_definitions.OWSServiceContact(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = ServiceContact[source]
individual[source]
position[source]
contact[source]
class weaver.wps_restapi.swagger_definitions.OWSServiceProvider(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Details about the institution providing the service.[source]
name = ServiceProvider[source]
title = ServiceProvider[source]
provider_name[source]
provider_site[source]
contact[source]
class weaver.wps_restapi.swagger_definitions.WPSDescriptionType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema_ref = http://schemas.opengis.net/wps/1.0.0/common/DescriptionType.xsd[source]
name = DescriptionType[source]
_title[source]
abstract[source]
metadata[source]
class weaver.wps_restapi.swagger_definitions.OWSServiceIdentification(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = ServiceIdentification[source]
title = ServiceIdentification[source]
keywords[source]
type[source]
svc_type[source]
svc_type_ver1[source]
svc_type_ver2[source]
fees[source]
access[source]
provider[source]
class weaver.wps_restapi.swagger_definitions.OWSOperationName(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
attribute = True[source]
name = name[source]
example = GetCapabilities[source]
validator[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
attribute = True[source]
name = href[source]
prefix = xlink[source]
example = http://schema-example.com/wps[source]
class weaver.wps_restapi.swagger_definitions.OperationRequest(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

href[source]
class weaver.wps_restapi.swagger_definitions.OWS_HTTP(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

get[source]
post[source]
class weaver.wps_restapi.swagger_definitions.OWS_DCP(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

http[source]
https[source]
class weaver.wps_restapi.swagger_definitions.Operation(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name[source]
dcp[source]
class weaver.wps_restapi.swagger_definitions.OperationsMetadata(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

name = OperationsMetadata[source]
op[source]
class weaver.wps_restapi.swagger_definitions.ProcessVersion(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
attribute = True[source]
class weaver.wps_restapi.swagger_definitions.OWSProcessSummary(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

version[source]
identifier[source]
_title[source]
abstract[source]
class weaver.wps_restapi.swagger_definitions.WPSProcessOfferings(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

name = ProcessOfferings[source]
title = ProcessOfferings[source]
process[source]
class weaver.wps_restapi.swagger_definitions.WPSLanguagesType(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

title = LanguagesType[source]
wrapped = False[source]
lang[source]
class weaver.wps_restapi.swagger_definitions.WPSLanguageSpecification(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = Languages[source]
title = Languages[source]
default[source]
supported[source]
class weaver.wps_restapi.swagger_definitions.WPSResponseBaseType(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

schema_ref = http://schemas.opengis.net/wps/1.0.0/common/ResponseBaseType.xsd[source]
service[source]
version[source]
lang[source]
class weaver.wps_restapi.swagger_definitions.WPSProcessVersion(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_ref = http://schemas.opengis.net/wps/1.0.0/common/ProcessVersion.xsd[source]
schema_type[source]
description = Release version of this Process.[source]
name = processVersion[source]
attribute = True[source]
class weaver.wps_restapi.swagger_definitions.WPSInputDescriptionType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

identifier[source]
_title[source]
abstract[source]
metadata[source]
class weaver.wps_restapi.swagger_definitions.WPSLiteralInputType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.WPSLiteralData(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = LiteralData[source]
class weaver.wps_restapi.swagger_definitions.WPSCRSsType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

crs[source]
class weaver.wps_restapi.swagger_definitions.WPSSupportedCRS(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

crs[source]
class weaver.wps_restapi.swagger_definitions.WPSSupportedCRSType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = SupportedCRSsType[source]
default[source]
supported[source]
class weaver.wps_restapi.swagger_definitions.WPSBoundingBoxData(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

data[source]
class weaver.wps_restapi.swagger_definitions.WPSFormatDefinition(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

mime_type[source]
encoding[source]
schema[source]
class weaver.wps_restapi.swagger_definitions.WPSFileFormat(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = Format[source]
format_item[source]
class weaver.wps_restapi.swagger_definitions.WPSFormatList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

format_item[source]
class weaver.wps_restapi.swagger_definitions.WPSComplexInputType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

max_mb[source]
defaults[source]
supported[source]
class weaver.wps_restapi.swagger_definitions.WPSComplexData(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

data[source]
class weaver.wps_restapi.swagger_definitions.WPSInputFormChoice(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

title = InputFormChoice[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.WPSMinOccursAttribute(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

name = minOccurs[source]
attribute = True[source]
class weaver.wps_restapi.swagger_definitions.WPSMaxOccursAttribute(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

name = maxOccurs[source]
prefix[source]
attribute = True[source]
class weaver.wps_restapi.swagger_definitions.WPSDataInputDescription(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

min_occurs[source]
max_occurs[source]
class weaver.wps_restapi.swagger_definitions.WPSDataInputItem(*args, **kwargs)[source]

Allows specifying all the required partial mapping schemas for an underlying complete schema definition.

Corresponds to the allOf specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class AllRequired(AnyKeywordSchema):
    _all_of = [RequiredItem(), RequiredType()]

Value parsed with schema this definition will be valid only when every since one of the sub-schemas is valid. Any sub-schema raising an invalid error for any reason with make the whole schema validation fail.

See also

  • OneOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_all_of[source]
class weaver.wps_restapi.swagger_definitions.WPSDataInputs(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

name = DataInputs[source]
title = DataInputs[source]
input[source]
class weaver.wps_restapi.swagger_definitions.WPSOutputDescriptionType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = OutputDescriptionType[source]
title = OutputDescriptionType[source]
identifier[source]
_title[source]
abstract[source]
metadata[source]
class weaver.wps_restapi.swagger_definitions.ProcessOutputs(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

name = ProcessOutputs[source]
title = ProcessOutputs[source]
output[source]
class weaver.wps_restapi.swagger_definitions.WPSGetCapabilities(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

schema_ref = http://schemas.opengis.net/wps/1.0.0/wpsGetCapabilities_response.xsd[source]
name = Capabilities[source]
title = Capabilities[source]
svc[source]
ops[source]
offering[source]
languages[source]
class weaver.wps_restapi.swagger_definitions.WPSProcessDescriptionType(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

name = ProcessDescriptionType[source]
description = Description of the requested process by identifier.[source]
store[source]
status[source]
inputs[source]
outputs[source]
class weaver.wps_restapi.swagger_definitions.WPSProcessDescriptionList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

name = ProcessDescriptions[source]
title = ProcessDescriptions[source]
description = Listing of process description for every requested identifier.[source]
wrapped = False[source]
process[source]
class weaver.wps_restapi.swagger_definitions.WPSDescribeProcess(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

schema_ref = http://schemas.opengis.net/wps/1.0.0/wpsDescribeProcess_response.xsd[source]
name = DescribeProcess[source]
title = DescribeProcess[source]
process[source]
class weaver.wps_restapi.swagger_definitions.WPSStatusLocationAttribute(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = statusLocation[source]
prefix[source]
attribute = True[source]
format = file[source]
class weaver.wps_restapi.swagger_definitions.WPSServiceInstanceAttribute(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = serviceInstance[source]
prefix[source]
attribute = True[source]
format = url[source]
class weaver.wps_restapi.swagger_definitions.CreationTimeAttribute(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = creationTime[source]
title = CreationTime[source]
prefix[source]
attribute = True[source]
class weaver.wps_restapi.swagger_definitions.WPSStatusSuccess(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = ProcessSucceeded[source]
title = ProcessSucceeded[source]
class weaver.wps_restapi.swagger_definitions.WPSStatusFailed(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = ProcessFailed[source]
title = ProcessFailed[source]
class weaver.wps_restapi.swagger_definitions.WPSStatus(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = Status[source]
title = Status[source]
creationTime[source]
status_success[source]
status_failed[source]
class weaver.wps_restapi.swagger_definitions.WPSProcessSummary(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = Process[source]
title = Process[source]
identifier[source]
_title[source]
abstract[source]
class weaver.wps_restapi.swagger_definitions.WPSOutputBase(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

identifier[source]
_title[source]
abstract[source]
class weaver.wps_restapi.swagger_definitions.WPSOutputDefinitionItem(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = Output[source]
title = OutputDefinition[source]
class weaver.wps_restapi.swagger_definitions.WPSOutputDefinitions(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

name = OutputDefinitions[source]
title = OutputDefinitions[source]
out_def[source]
class weaver.wps_restapi.swagger_definitions.WPSOutputLiteral(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

data = [][source]
class weaver.wps_restapi.swagger_definitions.WPSReference(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

href[source]
mimeType[source]
encoding[source]
class weaver.wps_restapi.swagger_definitions.WPSOutputReference(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

title = OutputReference[source]
reference[source]
class weaver.wps_restapi.swagger_definitions.WPSOutputData(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.WPSDataOutputItem(*args, **kwargs)[source]

Allows specifying all the required partial mapping schemas for an underlying complete schema definition.

Corresponds to the allOf specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class AllRequired(AnyKeywordSchema):
    _all_of = [RequiredItem(), RequiredType()]

Value parsed with schema this definition will be valid only when every since one of the sub-schemas is valid. Any sub-schema raising an invalid error for any reason with make the whole schema validation fail.

See also

  • OneOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

name = Output[source]
title = DataOutput[source]
_all_of[source]
class weaver.wps_restapi.swagger_definitions.WPSProcessOutputs(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

name = ProcessOutputs[source]
title = ProcessOutputs[source]
output[source]
class weaver.wps_restapi.swagger_definitions.WPSExecuteResponse(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

schema_ref = http://schemas.opengis.net/wps/1.0.0/wpsExecute_response.xsd[source]
name = ExecuteResponse[source]
title = ExecuteResponse[source]
location[source]
svc_loc[source]
process[source]
status[source]
inputs[source]
out_def[source]
outputs[source]
class weaver.wps_restapi.swagger_definitions.WPSXMLSuccessBodySchema(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.OWSExceptionCodeAttribute(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = exceptionCode[source]
title = Exception[source]
attribute = True[source]
class weaver.wps_restapi.swagger_definitions.OWSExceptionLocatorAttribute(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = locator[source]
attribute = True[source]
class weaver.wps_restapi.swagger_definitions.OWSExceptionText(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
name = ExceptionText[source]
class weaver.wps_restapi.swagger_definitions.OWSException(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = Exception[source]
title = Exception[source]
code[source]
locator[source]
text[source]
class weaver.wps_restapi.swagger_definitions.OWSExceptionReport(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name = ExceptionReport[source]
title = ExceptionReport[source]
exception[source]
class weaver.wps_restapi.swagger_definitions.WPSException(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

report[source]
class weaver.wps_restapi.swagger_definitions.OkWPSResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = WPS operation successful[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.ErrorWPSResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Unhandled error occurred on WPS endpoint.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.ProviderEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.ProcessDescriptionQuery(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema[source]
class weaver.wps_restapi.swagger_definitions.ProviderProcessEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.LocalProcessDescriptionQuery(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.LocalProcessEndpointHeaders(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.ProcessEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.ProcessPackageEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.ProcessPayloadEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.ProcessVisibilityGetEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.ProcessVisibilityPutEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
body[source]
class weaver.wps_restapi.swagger_definitions.ProviderJobEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.JobEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.ProcessInputsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.ProviderInputsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.JobInputsOutputsQuery(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema[source]
class weaver.wps_restapi.swagger_definitions.JobInputsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.JobResultsQuery(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema[source]
class weaver.wps_restapi.swagger_definitions.LocalProcessJobResultsQuery(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.JobOutputsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.ProcessOutputsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.ProviderOutputsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.ProcessResultEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

deprecated = True[source]
header[source]
class weaver.wps_restapi.swagger_definitions.ProviderResultEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

deprecated = True[source]
header[source]
class weaver.wps_restapi.swagger_definitions.JobResultEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

deprecated = True[source]
header[source]
class weaver.wps_restapi.swagger_definitions.ProcessResultsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.ProviderResultsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.JobResultsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.ProviderExceptionsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.JobExceptionsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.ProcessExceptionsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.ProviderLogsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.JobLogsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.ProcessLogsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.JobStatisticsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.ProcessJobStatisticsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.ProviderJobStatisticsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.ProviderPublic(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

public[source]
class weaver.wps_restapi.swagger_definitions.CreateProviderRequestBody(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

id[source]
url[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputDataType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.ExecuteOutputDataType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.ExecuteOutputDefinition(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

transmissionMode[source]
format[source]
class weaver.wps_restapi.swagger_definitions.ExecuteOutputItem(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.ExecuteOutputSpecList(*args, **kwargs)[source]

Filter list of outputs to be obtained from execution and their reporting method.

output[source]
class weaver.wps_restapi.swagger_definitions.ExecuteOutputMapAdditionalProperties(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

output_id[source]
class weaver.wps_restapi.swagger_definitions.ExecuteOutputSpecMap(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

_any_of[source]
class weaver.wps_restapi.swagger_definitions.ExecuteOutputSpec(*args, **kwargs)[source]

Filter list of outputs to be obtained from execution and define their reporting method.

_one_of[source]
class weaver.wps_restapi.swagger_definitions.ProviderNameSchema(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

title = ProviderName[source]
description = Identifier of the remote provider.[source]
class weaver.wps_restapi.swagger_definitions.ProviderSummarySchema(*args, **kwargs)[source]

Service provider summary definition.

id[source]
url[source]
type[source]
_sort_first[source]
_sort_after[source]
class weaver.wps_restapi.swagger_definitions.ProviderCapabilitiesSchema(*args, **kwargs)[source]

Service provider detailed capabilities.

class weaver.wps_restapi.swagger_definitions.TransmissionModeList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

transmissionMode[source]
class weaver.wps_restapi.swagger_definitions.JobControlOptionsList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

jobControlOption[source]
class weaver.wps_restapi.swagger_definitions.ExceptionReportType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

code[source]
description[source]
class weaver.wps_restapi.swagger_definitions.ProcessControl(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

jobControlOptions[source]
outputTransmission[source]
class weaver.wps_restapi.swagger_definitions.ProcessLocations(*args, **kwargs)[source]

Additional endpoint locations specific to the process.

processDescriptionURL[source]
processEndpointWPS1[source]
executeEndpoint[source]
class weaver.wps_restapi.swagger_definitions.ProcessSummary(*args, **kwargs)[source]

Summary process definition.

_sort_first[source]
_sort_after[source]
class weaver.wps_restapi.swagger_definitions.ProcessSummaryList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

summary[source]
class weaver.wps_restapi.swagger_definitions.ProcessNamesList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

process_name[source]
class weaver.wps_restapi.swagger_definitions.ProcessListing(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.ProcessCollection(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

processes[source]
class weaver.wps_restapi.swagger_definitions.ProcessPagingQuery(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

sort[source]
page[source]
limit[source]
class weaver.wps_restapi.swagger_definitions.ProcessVisibility(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

visibility[source]
class weaver.wps_restapi.swagger_definitions.ProcessDeploymentProfile(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

deploymentProfile[source]
class weaver.wps_restapi.swagger_definitions.Process(*args, **kwargs)[source]

Old nested process schema for process description.

inputs[source]
outputs[source]
_sort_first[source]
_sort_after[source]
class weaver.wps_restapi.swagger_definitions.ProcessDescriptionOLD(*args, **kwargs)[source]

Old schema for process description.

deprecated = True[source]
process[source]
_sort_first[source]
_sort_after[source]
class weaver.wps_restapi.swagger_definitions.ProcessDescriptionOGC(*args, **kwargs)[source]

OGC-API schema for process description.

inputs[source]
outputs[source]
_sort_first[source]
_sort_after[source]
class weaver.wps_restapi.swagger_definitions.ProcessDescription(*args, **kwargs)[source]

Supported schema representations of a process description (based on specified query parameters).

_one_of[source]
class weaver.wps_restapi.swagger_definitions.ProcessDeployment(*args, **kwargs)[source]

Summary process definition.

id[source]
abstract[source]
inputs[source]
outputs[source]
visibility[source]
_sort_first[source]
_sort_after[source]
class weaver.wps_restapi.swagger_definitions.Duration(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Human-readable representation of the duration.[source]
example = hh:mm:ss[source]
class weaver.wps_restapi.swagger_definitions.DurationISO(*args, **kwargs)[source]

Duration represented using ISO-8601 format.

schema_ref = https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.7.3.1[source]
schema_type[source]
description = ISO-8601 representation of the duration.[source]
example = P[n]Y[n]M[n]DT[n]H[n]M[n]S[source]
format = duration[source]
deserialize(cstruct: Union[datetime.timedelta, str]) str[source]

Deserialize the cstruct into an appstruct based on the schema, run this appstruct through the preparer, if one is present, then validate the prepared appstruct. The cstruct value is deserialized into an appstruct unconditionally.

If appstruct returned by type deserialization and preparation is the value colander.null, do something special before attempting validation:

  • If the missing attribute of this node has been set explicitly, return its value. No validation of this value is performed; it is simply returned.

  • If the missing attribute of this node has not been set explicitly, raise a colander.Invalid exception error.

If the appstruct is not colander.null and cannot be validated , a colander.Invalid exception will be raised.

If a cstruct argument is not explicitly provided, it defaults to colander.null.

class weaver.wps_restapi.swagger_definitions.JobStatusInfo(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

jobID[source]
processID[source]
providerID[source]
type[source]
status[source]
message[source]
created[source]
started[source]
finished[source]
updated[source]
duration[source]
runningDuration[source]
runningSeconds[source]
expirationDate[source]
estimatedCompletion[source]
nextPoll[source]
percentCompleted[source]
progress[source]
class weaver.wps_restapi.swagger_definitions.JobEntrySchema(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.JobCollection(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

item[source]
class weaver.wps_restapi.swagger_definitions.CreatedJobStatusSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

jobID[source]
processID[source]
providerID[source]
status[source]
location[source]
class weaver.wps_restapi.swagger_definitions.CreatedQuotedJobStatusSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

bill[source]
class weaver.wps_restapi.swagger_definitions.GetPagingJobsSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

jobs[source]
limit[source]
page[source]
class weaver.wps_restapi.swagger_definitions.JobCategoryFilters(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

category[source]
class weaver.wps_restapi.swagger_definitions.GroupedJobsCategorySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

category[source]
jobs[source]
count[source]
class weaver.wps_restapi.swagger_definitions.GroupedCategoryJobsSchema(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

job_group_category_item[source]
class weaver.wps_restapi.swagger_definitions.GetGroupedJobsSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

groups[source]
class weaver.wps_restapi.swagger_definitions.GetQueriedJobsSchema(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
total[source]
_sort_first[source]
_sort_after[source]
class weaver.wps_restapi.swagger_definitions.DismissedJobSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

status[source]
jobID[source]
message[source]
percentCompleted[source]
class weaver.wps_restapi.swagger_definitions.DataEncodingAttributes(*args, **kwargs)[source]

Validation against mimeType or mediaType format.

Note

Format are validated to be retro-compatible with pre-existing/deployed/remote processes.

class weaver.wps_restapi.swagger_definitions.ReferenceBase(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

format[source]
body[source]
bodyReference[source]
class weaver.wps_restapi.swagger_definitions.Reference(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

title = Reference[source]
href[source]
class weaver.wps_restapi.swagger_definitions.ExecuteReference(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

title = ExecuteReference[source]
href[source]
class weaver.wps_restapi.swagger_definitions.ArrayReference(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

item[source]
class weaver.wps_restapi.swagger_definitions.ArrayReferenceValueType(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

value[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputAnyType(*args, **kwargs)[source]

Permissive variants that we attempt to parse automatically.

_one_of[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputItem(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Default value to be looked for uses key 'value' to conform to older drafts of OGC-API standard....[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputListValues(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

input_item[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema_ref[source]
href[source]
type[source]
rel[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputReference(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

summary = Execute input reference link definition with parameters.[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputFile(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

_any_of[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputInlineValue(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

description = Execute input value provided inline.[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputObjectData(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

schema_ref[source]
description = Data value of any schema[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputQualifiedValue(*args, **kwargs)[source]

Used to respect mediaType field as suggested per OGC-API.

schema_ref[source]
value[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputInlineOrRefData(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

schema_ref[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputArrayValues(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

item_value[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputData(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

description = Execute data definition of the input.[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputMapAdditionalProperties(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema_ref[source]
input_id[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputMapValues(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

_any_of[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputValues(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.ExecuteInputOutputs(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema_ref[source]
inputs[source]
outputs[source]
class weaver.wps_restapi.swagger_definitions.Execute(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

examples[source]
mode[source]
response[source]
notification_email[source]
class weaver.wps_restapi.swagger_definitions.QuoteStatusSchema(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.PartialQuoteSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

id[source]
status[source]
processID[source]
class weaver.wps_restapi.swagger_definitions.Price(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
format = decimal[source]
class weaver.wps_restapi.swagger_definitions.QuoteProcessParameters(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

description = Parameters passed for traditional process execution (inputs, outputs) with added metadata for...[source]
class weaver.wps_restapi.swagger_definitions.UserIdSchema(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.StepQuotation(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

detail[source]
price[source]
currency[source]
expire[source]
created[source]
userID[source]
estimatedTime[source]
estimatedSeconds[source]
estimatedDuration[source]
processParameters[source]
class weaver.wps_restapi.swagger_definitions.StepQuotationList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

description = Detailed child processes and prices part of the complete quote.[source]
step[source]
class weaver.wps_restapi.swagger_definitions.Quotation(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

steps[source]
class weaver.wps_restapi.swagger_definitions.QuoteStepReferenceList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

description = Summary of child process quote references part of the complete quote.[source]
ref[source]
class weaver.wps_restapi.swagger_definitions.QuoteSummary(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

steps[source]
total[source]
class weaver.wps_restapi.swagger_definitions.QuoteSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

total[source]
class weaver.wps_restapi.swagger_definitions.QuotationList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

quote[source]
class weaver.wps_restapi.swagger_definitions.QuotationListSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

quotations[source]
class weaver.wps_restapi.swagger_definitions.BillSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

id[source]
quoteID[source]
title[source]
description[source]
price[source]
currency[source]
created[source]
userID[source]
class weaver.wps_restapi.swagger_definitions.BillList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

bill[source]
class weaver.wps_restapi.swagger_definitions.BillListSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

bills[source]
class weaver.wps_restapi.swagger_definitions.SupportedValues(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.DefaultValues(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.CWLClass(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

name = class[source]
title = Class[source]
schema_type[source]
example = CommandLineTool[source]
validator[source]
description = CWL class specification. This is used to differentiate between single Application Package...[source]
class weaver.wps_restapi.swagger_definitions.CWLExpression(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description[source]
class weaver.wps_restapi.swagger_definitions.RequirementClass(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

name = class[source]
title = RequirementClass[source]
schema_type[source]
description = CWL requirement class specification.[source]
class weaver.wps_restapi.swagger_definitions.CUDAComputeCapability(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
example = 3.0[source]
title = CUDA compute capability[source]
description = The compute capability supported by the GPU hardware.[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.CUDAComputeCapabilityArray(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

item[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.CUDAComputeCapabilitySchema(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

title[source]
description[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.CUDARequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

cudaVersionMin[source]
cudaComputeCapability[source]
cudaDeviceCountMin[source]
cudaDeviceCountMax[source]
class weaver.wps_restapi.swagger_definitions.CUDARequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

CUDARequirement[source]
class weaver.wps_restapi.swagger_definitions.CUDARequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.NetworkAccessRequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

networkAccess[source]
class weaver.wps_restapi.swagger_definitions.NetworkAccessRequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

NetworkAccessRequirement[source]
class weaver.wps_restapi.swagger_definitions.NetworkAccessRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.ResourceRequirementValue(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.ResourceRequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

description[source]
coresMin[source]
coresMax[source]
ramMin[source]
ramMax[source]
tmpdirMin[source]
tmpdirMax[source]
outdirMin[source]
outdirMax[source]
class weaver.wps_restapi.swagger_definitions.ResourceRequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

ResourceRequirement[source]
class weaver.wps_restapi.swagger_definitions.ResourceRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.DockerRequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

dockerPull[source]
class weaver.wps_restapi.swagger_definitions.DockerRequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

DockerRequirement[source]
class weaver.wps_restapi.swagger_definitions.DockerRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.DockerGpuRequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

deprecated = True[source]
description[source]
class weaver.wps_restapi.swagger_definitions.DockerGpuRequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

deprecated = True[source]
req[source]
class weaver.wps_restapi.swagger_definitions.DockerGpuRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

deprecated = True[source]
title[source]
_class[source]
class weaver.wps_restapi.swagger_definitions.DirectoryListingItem(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

entry[source]
entryname[source]
writable[source]
class weaver.wps_restapi.swagger_definitions.InitialWorkDirListing(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

item[source]
class weaver.wps_restapi.swagger_definitions.InitialWorkDirRequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

listing[source]
class weaver.wps_restapi.swagger_definitions.InitialWorkDirRequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

req[source]
class weaver.wps_restapi.swagger_definitions.InitialWorkDirRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.InlineJavascriptLibraries(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

description[source]
exp_lib[source]
class weaver.wps_restapi.swagger_definitions.InlineJavascriptRequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

description[source]
expressionLib[source]
class weaver.wps_restapi.swagger_definitions.InlineJavascriptRequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

req[source]
class weaver.wps_restapi.swagger_definitions.InlineJavascriptRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.InplaceUpdateRequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

description[source]
inplaceUpdate[source]
class weaver.wps_restapi.swagger_definitions.InplaceUpdateRequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

req[source]
class weaver.wps_restapi.swagger_definitions.InplaceUpdateRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.LoadListingEnum(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
title = LoadListingEnum[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.LoadListingRequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

description[source]
loadListing[source]
class weaver.wps_restapi.swagger_definitions.LoadListingRequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

req[source]
class weaver.wps_restapi.swagger_definitions.LoadListingRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.IdentifierArray(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

item[source]
class weaver.wps_restapi.swagger_definitions.ScatterIdentifiersSchema(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

title = Scatter[source]
description[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.ScatterFeatureRequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

description[source]
scatter[source]
scatterMethod[source]
class weaver.wps_restapi.swagger_definitions.ScatterFeatureRequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

req[source]
class weaver.wps_restapi.swagger_definitions.ScatterFeatureRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.TimeLimitValue(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.ToolTimeLimitRequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

description[source]
timelimit[source]
class weaver.wps_restapi.swagger_definitions.ToolTimeLimitRequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

req[source]
class weaver.wps_restapi.swagger_definitions.ToolTimeLimitRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.EnableReuseValue(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.WorkReuseRequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

description[source]
enableReuse[source]
class weaver.wps_restapi.swagger_definitions.WorkReuseRequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

req[source]
class weaver.wps_restapi.swagger_definitions.WorkReuseRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.BuiltinRequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

title[source]
description = Hint indicating that the Application Package corresponds to a builtin process of this instance....[source]
process[source]
class weaver.wps_restapi.swagger_definitions.BuiltinRequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

req[source]
class weaver.wps_restapi.swagger_definitions.BuiltinRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.ESGF_CWT_RequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

title[source]
description = Hint indicating that the Application Package corresponds to an ESGF-CWT provider processthat...[source]
process[source]
provider[source]
class weaver.wps_restapi.swagger_definitions.ESGF_CWT_RequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

req[source]
class weaver.wps_restapi.swagger_definitions.ESGF_CWT_RequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.OGCAPIRequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

title[source]
description = Hint indicating that the Application Package corresponds to an OGC API - Processes providerthat...[source]
process[source]
class weaver.wps_restapi.swagger_definitions.OGCAPIRequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

req[source]
class weaver.wps_restapi.swagger_definitions.OGCAPIRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.WPS1RequirementSpecification(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

title[source]
description = Hint indicating that the Application Package corresponds to a WPS-1 provider processthat should...[source]
process[source]
provider[source]
class weaver.wps_restapi.swagger_definitions.WPS1RequirementMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

req[source]
class weaver.wps_restapi.swagger_definitions.WPS1RequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.UnknownRequirementMap(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

description = Generic schema to allow alternative CWL requirements/hints not explicitly defined in schemas.[source]
class weaver.wps_restapi.swagger_definitions.UnknownRequirementClass(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
class weaver.wps_restapi.swagger_definitions.CWLRequirementsMap(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

_any_of[source]
class weaver.wps_restapi.swagger_definitions.CWLRequirementsItem(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

discriminator = class[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.CWLRequirementsList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

requirement[source]
class weaver.wps_restapi.swagger_definitions.CWLRequirements(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.CWLHintsMap(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

_any_of[source]
class weaver.wps_restapi.swagger_definitions.CWLHintsItem(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

discriminator = class[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.CWLHintsList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

hint[source]
class weaver.wps_restapi.swagger_definitions.CWLHints(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.CWLArguments(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

argument[source]
class weaver.wps_restapi.swagger_definitions.CWLTypeString(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Field type definition.[source]
example = float[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.CWLTypeSymbolValues(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.CWLTypeSymbols(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

symbol[source]
class weaver.wps_restapi.swagger_definitions.CWLTypeArray(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

type[source]
items[source]
class weaver.wps_restapi.swagger_definitions.CWLTypeEnum(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

type[source]
symbols[source]
class weaver.wps_restapi.swagger_definitions.CWLTypeBase(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.CWLTypeList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

type[source]
class weaver.wps_restapi.swagger_definitions.CWLType(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

title = CWL Type[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.AnyLiteralList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

default[source]
class weaver.wps_restapi.swagger_definitions.CWLDefault(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.CWLInputObject(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

type[source]
default[source]
inputBinding[source]
class weaver.wps_restapi.swagger_definitions.CWLTypeStringList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

description = List of allowed direct CWL type specifications as strings.[source]
type[source]
class weaver.wps_restapi.swagger_definitions.CWLInputType(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

description = CWL type definition of the input.[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.CWLInputMap(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

input_id[source]
class weaver.wps_restapi.swagger_definitions.CWLInputItem(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

id[source]
class weaver.wps_restapi.swagger_definitions.CWLInputList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

input[source]
class weaver.wps_restapi.swagger_definitions.CWLInputEmpty(*args: Any, **kwargs: Any)[source]

Mapping that guarantees it is completely empty for validation during deserialization.

Any children added to this schema are removed automatically.

class weaver.wps_restapi.swagger_definitions.CWLInputsDefinition(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.OutputBinding(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

glob[source]
class weaver.wps_restapi.swagger_definitions.CWLOutputObject(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

type[source]
outputBinding[source]
class weaver.wps_restapi.swagger_definitions.CWLOutputType(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.CWLOutputMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

output_id[source]
class weaver.wps_restapi.swagger_definitions.CWLOutputItem(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

id[source]
class weaver.wps_restapi.swagger_definitions.CWLOutputList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

input[source]
class weaver.wps_restapi.swagger_definitions.CWLOutputsDefinition(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.CWLCommandParts(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

cmd[source]
class weaver.wps_restapi.swagger_definitions.CWLCommand(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.CWLVersion(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

description = CWL version of the described application package.[source]
example[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.CWLIdentifier(*args, **kwargs)[source]

Allows specifying all mapping schemas that can be matched for an underlying schema definition.

Corresponds to the anyOf specifier of OpenAPI specification.

Contrary to OneOfKeywordSchema that MUST be validated with exactly one schema, this definition will continue parsing all possibilities and apply validated sub-schemas on top of each other. Not all schemas have to be valid like in the case of AllOfKeywordSchema to succeed, as long as at least one of them is valid.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class RequiredFields(ExtendedMappingSchema):
    field_str = ExtendedSchemaNode(String())
    field_int = ExtendedSchemaNode(Integer())

class AnyRequired(AnyKeywordSchema):
    _any_of = [RequiredItem(), RequiredType(), RequiredFields()]

# following is valid because their individual parts have all required sub-fields, result is their composition
AnyRequired().deserialize({"type": "test", "item": "valid"})     # result: {"type": "test", "item": "valid"}

# following is also valid because even though 'item' is missing, the 'type' is present
AnyRequired().deserialize({"type": "test"})                      # result: {"type": "test"}

# following is invalid because every one of the sub-field of individual parts are missing
AnyRequired().deserialize({"type": "test"})

# following is invalid because fields of 'RequiredFields' are only partially fulfilled
AnyRequired().deserialize({"field_str": "str"})

# following is valid because although fields of 'RequiredFields' are not all fulfilled, 'RequiredType' is valid
AnyRequired().deserialize({"field_str": "str", "type": "str"})  # result: {"type": "test"}

# following is invalid because 'RequiredFields' field 'field_int' is incorrect schema type
AnyRequired().deserialize({"field_str": "str", "field_int": "str"})

# following is valid, but result omits 'type' because its schema-type is incorrect, while others are valid
AnyRequired().deserialize({"field_str": "str", "field_int": 1, "items": "fields", "type": 1})
# result: {"field_str": "str", "field_int": 1, "items": "fields"}

Warning

Because valid items are applied on top of each other by merging fields during combinations, conflicting field names of any valid schema will contain only the final valid parsing during deserialization.

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • NotKeywordSchema

description = Reference to the process identifier. If CWL is provided within a process deployment payload,...[source]
class weaver.wps_restapi.swagger_definitions.CWLIntentURL(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

description = Identifier URL to a concept for the type of computational operation accomplished by this Process...[source]
class weaver.wps_restapi.swagger_definitions.CWLIntent(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

item[source]
class weaver.wps_restapi.swagger_definitions.CWLBase(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

cwlVersion[source]
class weaver.wps_restapi.swagger_definitions.CWLScatterMulti(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

id[source]
class weaver.wps_restapi.swagger_definitions.CWLScatter(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.CWLScatterMethod(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Describes how to decompose the scattered input into a discrete set of jobs. When 'dotproduct',...[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.CWLApp(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

_class[source]
id[source]
intent[source]
requirements[source]
hints[source]
baseCommand[source]
arguments[source]
inputs[source]
outputs[source]
scatter[source]
scatterMethod[source]
class weaver.wps_restapi.swagger_definitions.CWL(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

_sort_first = ['cwlVersion', 'id', 'class'][source]
class weaver.wps_restapi.swagger_definitions.Unit(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

unit[source]
class weaver.wps_restapi.swagger_definitions.UndeploymentResult(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

id[source]
class weaver.wps_restapi.swagger_definitions.DeploymentResult(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

processSummary[source]
class weaver.wps_restapi.swagger_definitions.ProviderSummaryList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

provider_service[source]
class weaver.wps_restapi.swagger_definitions.ProviderNamesList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

provider_name[source]
class weaver.wps_restapi.swagger_definitions.ProviderListing(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.ProvidersBodySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

checked[source]
providers[source]
class weaver.wps_restapi.swagger_definitions.ProviderProcessesSchema(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

provider_process[source]
class weaver.wps_restapi.swagger_definitions.JobOutputReference(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

href[source]
type[source]
format[source]
class weaver.wps_restapi.swagger_definitions.JobOutputValue(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.JobOutput(*args, **kwargs)[source]

Allows specifying all the required partial mapping schemas for an underlying complete schema definition.

Corresponds to the allOf specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class RequiredType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class AllRequired(AnyKeywordSchema):
    _all_of = [RequiredItem(), RequiredType()]

Value parsed with schema this definition will be valid only when every since one of the sub-schemas is valid. Any sub-schema raising an invalid error for any reason with make the whole schema validation fail.

See also

  • OneOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_all_of[source]
class weaver.wps_restapi.swagger_definitions.JobOutputMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

output_id[source]
class weaver.wps_restapi.swagger_definitions.JobOutputList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

title = JobOutputList[source]
output[source]
class weaver.wps_restapi.swagger_definitions.JobOutputs(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.ResultLiteral(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.ResultLiteralList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

result[source]
class weaver.wps_restapi.swagger_definitions.ValueFormatted(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

value[source]
format[source]
class weaver.wps_restapi.swagger_definitions.ValueFormattedList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

result[source]
class weaver.wps_restapi.swagger_definitions.ResultReference(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

href[source]
type[source]
format[source]
class weaver.wps_restapi.swagger_definitions.ResultReferenceList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

result[source]
class weaver.wps_restapi.swagger_definitions.ResultData(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

schema_ref[source]
_one_of[source]
class weaver.wps_restapi.swagger_definitions.Result(*args, **kwargs)[source]

Result outputs obtained from a successful process job execution.

example_ref[source]
output_id[source]
class weaver.wps_restapi.swagger_definitions.JobInputsBody(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.JobOutputsBody(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

outputs[source]
class weaver.wps_restapi.swagger_definitions.JobExceptionPlain(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Generic exception description corresponding to any error message.[source]
class weaver.wps_restapi.swagger_definitions.JobExceptionDetailed(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Fields correspond exactly to 'owslib.wps.WPSException' represented as dictionary.[source]
Code[source]
Locator[source]
Text[source]
class weaver.wps_restapi.swagger_definitions.JobException(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.JobExceptionsSchema(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

exceptions[source]
class weaver.wps_restapi.swagger_definitions.JobLogsSchema(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

log[source]
class weaver.wps_restapi.swagger_definitions.ApplicationStatisticsSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

mem[source]
mem_bytes[source]
class weaver.wps_restapi.swagger_definitions.ProcessStatisticsSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

rss[source]
rss_bytes[source]
uss[source]
uss_bytes[source]
vms[source]
vms_bytes[source]
used_threads[source]
used_cpu[source]
used_handles[source]
mem[source]
mem_bytes[source]
total_size[source]
total_size_bytes[source]
class weaver.wps_restapi.swagger_definitions.OutputStatisticsSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

size[source]
size_bytes[source]
class weaver.wps_restapi.swagger_definitions.OutputStatisticsMap(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

output[source]
class weaver.wps_restapi.swagger_definitions.JobStatisticsSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

application[source]
process[source]
outputs[source]
class weaver.wps_restapi.swagger_definitions.FrontpageParameterSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name[source]
enabled[source]
url[source]
doc[source]
class weaver.wps_restapi.swagger_definitions.FrontpageParameters(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

parameter[source]
class weaver.wps_restapi.swagger_definitions.FrontpageSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

message[source]
configuration[source]
parameters[source]
class weaver.wps_restapi.swagger_definitions.OpenAPISpecSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema_ref = https://spec.openapis.org/oas/3.0/schema/2021-09-28[source]
class weaver.wps_restapi.swagger_definitions.SwaggerUISpecSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.VersionsSpecSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

name[source]
type[source]
version[source]
class weaver.wps_restapi.swagger_definitions.VersionsList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

version[source]
class weaver.wps_restapi.swagger_definitions.VersionsSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

versions[source]
class weaver.wps_restapi.swagger_definitions.ConformanceList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

conformance[source]
class weaver.wps_restapi.swagger_definitions.ConformanceSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

conformsTo[source]
class weaver.wps_restapi.swagger_definitions.PackageBody(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.ExecutionUnit(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.ExecutionUnitList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

unit[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.ProcessDeploymentWithContext(*args, **kwargs)[source]

Summary process definition.

description = Process deployment with OWS Context reference.[source]
owsContext[source]
class weaver.wps_restapi.swagger_definitions.ProcessVersionField(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

processVersion[source]
class weaver.wps_restapi.swagger_definitions.DeployProcessOfferingContext(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

process[source]
class weaver.wps_restapi.swagger_definitions.DeployProcessDescriptionContext(*args, **kwargs)[source]

Allows specifying specific schema conditions that fails underlying schema definition validation if present.

Corresponds to the not specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class MappingWithType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class MappingWithoutType(NotKeywordSchema, RequiredItem):
    _not = [MappingWithType()]

class MappingOnlyNotType(NotKeywordSchema):
    _not = [MappingWithType()]

# following will raise invalid error even if 'item' is valid because 'type' is also present
MappingWithoutType().deserialize({"type": "invalid", "item": "valid"})

# following will return successfully with only 'item' because 'type' was not present
MappingWithoutType().deserialize({"item": "valid", "value": "ignore"})
# result: {"item": "valid"}

# following will return an empty mapping dropping 'item' since it only needs to ensure 'type' was not present,
# but did not provide any additional fields requirement from other class inheritances
MappingOnlyNotType().deserialize({"item": "valid"})
# result: {}

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

_not[source]
class weaver.wps_restapi.swagger_definitions.DeployProcessContextChoiceType(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.DeployProcessOffering(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

process[source]
class weaver.wps_restapi.swagger_definitions.DeployProcessDescription(*args, **kwargs)[source]

Allows specifying specific schema conditions that fails underlying schema definition validation if present.

Corresponds to the not specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class MappingWithType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class MappingWithoutType(NotKeywordSchema, RequiredItem):
    _not = [MappingWithType()]

class MappingOnlyNotType(NotKeywordSchema):
    _not = [MappingWithType()]

# following will raise invalid error even if 'item' is valid because 'type' is also present
MappingWithoutType().deserialize({"type": "invalid", "item": "valid"})

# following will return successfully with only 'item' because 'type' was not present
MappingWithoutType().deserialize({"item": "valid", "value": "ignore"})
# result: {"item": "valid"}

# following will return an empty mapping dropping 'item' since it only needs to ensure 'type' was not present,
# but did not provide any additional fields requirement from other class inheritances
MappingOnlyNotType().deserialize({"item": "valid"})
# result: {}

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

_not[source]
schema_ref[source]
description = Process description fields directly provided.[source]
class weaver.wps_restapi.swagger_definitions.DeployReference(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

id[source]
class weaver.wps_restapi.swagger_definitions.ProcessDescriptionChoiceType(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.ExecutionUnitDefinition(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

executionUnit[source]
class weaver.wps_restapi.swagger_definitions.DeployParameters(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

immediateDeployment[source]
deploymentProfileName[source]
class weaver.wps_restapi.swagger_definitions.DeployOGCAppPackage(*args, **kwargs)[source]

Allows specifying specific schema conditions that fails underlying schema definition validation if present.

Corresponds to the not specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class MappingWithType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class MappingWithoutType(NotKeywordSchema, RequiredItem):
    _not = [MappingWithType()]

class MappingOnlyNotType(NotKeywordSchema):
    _not = [MappingWithType()]

# following will raise invalid error even if 'item' is valid because 'type' is also present
MappingWithoutType().deserialize({"type": "invalid", "item": "valid"})

# following will return successfully with only 'item' because 'type' was not present
MappingWithoutType().deserialize({"item": "valid", "value": "ignore"})
# result: {"item": "valid"}

# following will return an empty mapping dropping 'item' since it only needs to ensure 'type' was not present,
# but did not provide any additional fields requirement from other class inheritances
MappingOnlyNotType().deserialize({"item": "valid"})
# result: {}

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

description = Deployment using standard OGC Application Package definition.[source]
schema_ref[source]
_not[source]
processDescription[source]
class weaver.wps_restapi.swagger_definitions.DeployContextDefinition(*args, **kwargs)[source]

Allows specifying specific schema conditions that fails underlying schema definition validation if present.

Corresponds to the not specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class MappingWithType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class MappingWithoutType(NotKeywordSchema, RequiredItem):
    _not = [MappingWithType()]

class MappingOnlyNotType(NotKeywordSchema):
    _not = [MappingWithType()]

# following will raise invalid error even if 'item' is valid because 'type' is also present
MappingWithoutType().deserialize({"type": "invalid", "item": "valid"})

# following will return successfully with only 'item' because 'type' was not present
MappingWithoutType().deserialize({"item": "valid", "value": "ignore"})
# result: {"item": "valid"}

# following will return an empty mapping dropping 'item' since it only needs to ensure 'type' was not present,
# but did not provide any additional fields requirement from other class inheritances
MappingOnlyNotType().deserialize({"item": "valid"})
# result: {}

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

_not[source]
processDescription[source]
class weaver.wps_restapi.swagger_definitions.CWLGraphItem(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

id[source]
class weaver.wps_restapi.swagger_definitions.CWLGraphList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

cwl[source]
class weaver.wps_restapi.swagger_definitions.CWLGraphBase(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

graph[source]
class weaver.wps_restapi.swagger_definitions.UpdateVersion(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

version[source]
class weaver.wps_restapi.swagger_definitions.DeployCWLGraph(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

_sort_first = ['cwlVersion', 'version', '$graph'][source]
class weaver.wps_restapi.swagger_definitions.DeployCWL(*args, **kwargs)[source]

Allows specifying specific schema conditions that fails underlying schema definition validation if present.

Corresponds to the not specifier of OpenAPI specification.

Example:

class RequiredItem(ExtendedMappingSchema):
    item = ExtendedSchemaNode(String())

class MappingWithType(ExtendedMappingSchema):
    type = ExtendedSchemaNode(String())

class MappingWithoutType(NotKeywordSchema, RequiredItem):
    _not = [MappingWithType()]

class MappingOnlyNotType(NotKeywordSchema):
    _not = [MappingWithType()]

# following will raise invalid error even if 'item' is valid because 'type' is also present
MappingWithoutType().deserialize({"type": "invalid", "item": "valid"})

# following will return successfully with only 'item' because 'type' was not present
MappingWithoutType().deserialize({"item": "valid", "value": "ignore"})
# result: {"item": "valid"}

# following will return an empty mapping dropping 'item' since it only needs to ensure 'type' was not present,
# but did not provide any additional fields requirement from other class inheritances
MappingOnlyNotType().deserialize({"item": "valid"})
# result: {}

See also

  • OneOfKeywordSchema

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

_sort_first = ['cwlVersion', 'version', 'id', 'class'][source]
_not[source]
id[source]
class weaver.wps_restapi.swagger_definitions.DeployOGCRemoteProcess(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

id[source]
process[source]
class weaver.wps_restapi.swagger_definitions.Deploy(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.DeployContentType(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

example[source]
default[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.DeployHeaders(*args, **kwargs)[source]

Headers that can indicate how to adjust the behavior and/or result to be provided in the response.

x_auth_docker[source]
content_type[source]
class weaver.wps_restapi.swagger_definitions.PostProcessesEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.UpdateInputOutputBase(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.UpdateInputOutputItem(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.UpdateInputOutputList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

io_item[source]
class weaver.wps_restapi.swagger_definitions.UpdateInputOutputMap(*args: Any, **kwargs: Any)[source]

Object schema that will preserve any unknown field to remain present in the resulting deserialization.

This type is useful for defining a dictionary where some field names are not known in advance, or when more optional keys that don’t need to all be exhaustively provided in the schema are acceptable.

..note::

When doing schema deserialization to validate it, unknown keys would normally be removed without this class (default behaviour is to ignore them). With this schema, content under an unknown key using preserve are passed down without any validation. Other fields that are explicitly specified with sub-schema nodes will still be validated as per usual behaviour.

See also

StrictMappingSchema

Example:

class AnyKeyObject(PermissiveMappingSchema):
    known_key = SchemaNode(String())

AnyKeyObject().deserialize({"unknown": "kept", "known_key": "requirement"}))
# result: dictionary returned as is instead of removing 'unknown' entry
#         'known_key' is still validated with its string schema

Note

This class is only a shorthand definition of unknown keyword for convenience. All colander.MappingSchema support this natively.

io_id[source]
class weaver.wps_restapi.swagger_definitions.UpdateInputOutputDefinition(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.PatchProcessBodySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

title[source]
description[source]
keywords[source]
metadata[source]
inputs[source]
outputs[source]
jobControlOptions[source]
outputTransmission[source]
visibility[source]
class weaver.wps_restapi.swagger_definitions.PutProcessBodySchema(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

description = Process re-deployment using an updated version and definition.[source]
class weaver.wps_restapi.swagger_definitions.PatchProcessEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

headers[source]
querystring[source]
body[source]
class weaver.wps_restapi.swagger_definitions.PutProcessEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

headers[source]
querystring[source]
body[source]
class weaver.wps_restapi.swagger_definitions.WpsOutputContextHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

name = X-WPS-Output-Context[source]
description = ['Contextual location where to store WPS output results from job execution. ', 'When provided,...[source]
schema_type[source]
missing[source]
example = my-directory/sub-project[source]
default[source]
class weaver.wps_restapi.swagger_definitions.ExecuteHeadersBase(*args, **kwargs)[source]

Headers that can indicate how to adjust the behavior and/or result to be provided in the response.

description = Request headers supported for job execution.[source]
x_wps_output_context[source]
class weaver.wps_restapi.swagger_definitions.ExecuteHeadersJSON(*args, **kwargs)[source]

Headers that can indicate how to adjust the behavior and/or result to be provided in the response.

content_type[source]
class weaver.wps_restapi.swagger_definitions.ExecuteHeadersXML(*args, **kwargs)[source]

Headers that can indicate how to adjust the behavior and/or result to be provided in the response.

content_type[source]
class weaver.wps_restapi.swagger_definitions.PostProcessJobsEndpointJSON(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

content_type[source]
header[source]
querystring[source]
body[source]
class weaver.wps_restapi.swagger_definitions.PostProcessJobsEndpointXML(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

content_type[source]
header[source]
querystring[source]
body[source]
class weaver.wps_restapi.swagger_definitions.GetJobsQueries(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

detail[source]
groups[source]
page[source]
limit[source]
min_duration[source]
max_duration[source]
datetime[source]
status[source]
processID[source]
process[source]
version[source]
service[source]
provider[source]
type[source]
sort[source]
access[source]
notification_email[source]
tags[source]
class weaver.wps_restapi.swagger_definitions.GetProcessJobsQuery(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.GetProviderJobsQueries(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.GetJobsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.GetProcessJobsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.GetProviderJobsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.JobIdentifierList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

job_id[source]
class weaver.wps_restapi.swagger_definitions.DeleteJobsBodySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

jobs[source]
class weaver.wps_restapi.swagger_definitions.DeleteJobsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.DeleteProcessJobsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

querystring[source]
class weaver.wps_restapi.swagger_definitions.DeleteProviderJobsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.GetProcessJobEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.DeleteProcessJobEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.BillsEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.BillEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.ProcessQuotesEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.ProcessQuoteEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.GetQuotesQueries(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

page[source]
limit[source]
process[source]
sort[source]
class weaver.wps_restapi.swagger_definitions.QuotesEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.QuoteEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.PostProcessQuote(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
body[source]
class weaver.wps_restapi.swagger_definitions.PostQuote(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.QuoteProcessParametersSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.PostProcessQuoteRequestEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
body[source]
class weaver.wps_restapi.swagger_definitions.ProvidersQuerySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

detail[source]
check[source]
ignore[source]
class weaver.wps_restapi.swagger_definitions.GetProviders(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

querystring[source]
header[source]
class weaver.wps_restapi.swagger_definitions.PostProvider(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.ProcessDetailQuery(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

detail[source]
class weaver.wps_restapi.swagger_definitions.ProcessRevisionsQuery(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

process[source]
revisions[source]
class weaver.wps_restapi.swagger_definitions.ProviderProcessesQuery(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.ProviderProcessesEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
querystring[source]
class weaver.wps_restapi.swagger_definitions.GetProviderProcess(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.PostProviderProcessJobRequest(*args, **kwargs)[source]

Launching a new process request definition.

header[source]
querystring[source]
body[source]
class weaver.wps_restapi.swagger_definitions.ErrorDetail(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

code[source]
status[source]
class weaver.wps_restapi.swagger_definitions.OWSErrorCode(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
example = InvalidParameterValue[source]
description = OWS error code.[source]
class weaver.wps_restapi.swagger_definitions.OWSExceptionResponse(*args, **kwargs)[source]

Error content in XML format.

description = OWS formatted exception.[source]
code[source]
locator[source]
message[source]
class weaver.wps_restapi.swagger_definitions.ErrorCause(*args, **kwargs)[source]

Allows specifying multiple supported mapping schemas variants for an underlying schema definition.

Corresponds to the oneOf specifier of OpenAPI specification.

Example:

class Variant1(MappingSchema):
    [...fields of Variant1...]

class Variant2(MappingSchema):
    [...fields of Variant2...]

class RequiredByBoth(MappingSchema):
    [...fields required by both Variant1 and Variant2...]

class OneOfWithRequiredFields(OneOfKeywordSchema, RequiredByBoth):
    _one_of = (Variant1, Variant2)
    [...alternatively, field required by all variants here...]

In the above example, the validation (ie: deserialize) process will succeed if only one of the _one_of variants’ validator completely succeed, and will fail if every variant fails validation execution. The operation will also fail if more than one validation succeeds.

Note

Class OneOfWithRequiredFields in the example is a shortcut variant to generate a specification that represents the pseudo-code oneOf([<list-of-objects-with-same-base>]).

The real OpenAPI method to implement the above very commonly occurring situation is as presented by the following pseudo-code:

oneOf[allOf[RequiredByBoth, Variant1], allOf[RequiredByBoth, Variant2]]

This is both painful to read and is a lot of extra code to write when you actually expand it all into classes (each oneOf/allOf is another class). Class OneOfKeywordSchema will actually simplify this by automatically making the allOf definitions for you if it detects other schema nodes than oneOf specified in the class bases. You can still do the full oneOf/allOf classes expansion manually though, it will result into the same specification.

Warning

When oneOf/allOf automatic expansion occurs during schema generation

Warning

When calling deserialize(), because the validation process requires exactly one of the variants to succeed to consider the whole object to evaluate as valid, it is important to insert more permissive validators later in the _one_of iterator (or validator keyword). For example, having a variant with all fields defined as optional (ie: with missing=drop) inserted as first item in _one_of will make it always succeed regardless of following variants (since an empty schema with everything dropped is valid for optional-only elements). This would have as side effect of potentially failing the validation if other object are also valid depending on the received schema because the schema cannot be discriminated between many. If this occurs, it means the your schemas are too permissive.

In the event that you have very similar schemas that can sometime match except one identifier (e.g.: field type defining the type of object), consider adding a validator to each sub-node with explicit values to solve the discrimination problem.

As a shortcut, the OpenAPI keyword discriminator can be provided to try matching as a last resort.

For example:

class Animal(ExtendedMappingSchema):
    name = ExtendedSchemaNode(String())
    type = ExtendedSchemaNode(String())  # with explicit definition, this shouldn't be here

    ## With explicit definitions, each below 'Animal' class should be defined as follows
    ## type = ExtendedSchemaNode(String(), validator=colander.OneOf(['<animal>']))

class Cat(Animal):
    [...]   # many **OPTIONAL** fields

class Dog(Animal):
    [...]   # many **OPTIONAL** fields

# With the discriminator keyword, following is possible
# (each schema must provide the same property name)
class SomeAnimal(OneOfMappingSchema):
    discriminator = "type"
    _one_of = [
        Cat(),
        Dog(),
    ]

# If more specific mapping resolutions than 1-to-1 by name are needed,
# an explicit dictionary can be specified instead.
class SomeAnimal(OneOfMappingSchema):
    discriminator = {
        "propertyName": "type",     # correspond to 'type' of 'Animal'
        "mapping": {
            "cat": Cat, "dog": Dog  # map expected values to target schemas
        }
    }
    _one_of = [
        Cat(),
        Dog(),
    ]

Note

Keyword discriminator supports a map of key-string to schemas-type as presented in the example, and the key must be located at the top level of the mapping. If only discriminator = "<field>" is provided, the definition will be created automatically using the example (which should be only the matching value) of the corresponding field of each node within the _one_of mapping.

When multiple valid schemas are matched against the input data, the error will be raised and returned with corresponding erroneous elements for each sub-schema (fully listed).

See also

  • AllOfKeywordSchema

  • AnyOfKeywordSchema

  • NotKeywordSchema

_one_of[source]
class weaver.wps_restapi.swagger_definitions.ErrorJsonResponseBodySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

schema_ref[source]
description = JSON schema for exceptions based on RFC 7807[source]
type[source]
title[source]
detail[source]
status[source]
cause[source]
value[source]
error[source]
instance[source]
exception[source]
class weaver.wps_restapi.swagger_definitions.BadRequestResponseSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Incorrectly formed request contents.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.ConflictRequestResponseSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Conflict between the affected entity and another existing definition.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.UnprocessableEntityResponseSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Wrong format of given parameters.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.UnsupportedMediaTypeResponseSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Media-Type not supported for this request.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.ForbiddenProcessAccessResponseSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Referenced process is not accessible.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.ForbiddenProviderAccessResponseSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Referenced provider is not accessible.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.ForbiddenProviderLocalResponseSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.InternalServerErrorResponseSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Unhandled internal server error.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetFrontpageResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OpenAPIResponseContentTypeHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

example[source]
default[source]
validator[source]
class weaver.wps_restapi.swagger_definitions.OpenAPIResponseHeaders(*args, **kwargs)[source]

Headers describing resulting response.

content_type[source]
class weaver.wps_restapi.swagger_definitions.OkGetSwaggerJSONResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
examples[source]
class weaver.wps_restapi.swagger_definitions.OkGetSwaggerUIResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetRedocUIResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetVersionsResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetConformanceResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetProvidersListResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetProviderCapabilitiesSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.NoContentDeleteProviderSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.NotImplementedDeleteProviderResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Provider removal not supported using referenced storage.[source]
class weaver.wps_restapi.swagger_definitions.OkGetProviderProcessesSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.GetProcessesQuery(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

providers[source]
ignore[source]
class weaver.wps_restapi.swagger_definitions.GetProcessesEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

querystring[source]
class weaver.wps_restapi.swagger_definitions.ProviderProcessesListing(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

_sort_first = ['id', 'processes'][source]
id[source]
class weaver.wps_restapi.swagger_definitions.ProviderProcessesList(*args, **kwargs)[source]

Sequence schema that supports all applicable extended schema node functionalities.

Combines DefaultSequenceSchema and DefaultSequenceSchema extensions so that default keyword is used first to resolve a missing sequence during deserialize() call, and then removes the node completely if no default was provided.

See also

  • ExtendedSchemaNode

  • ExtendedMappingSchema

item[source]
class weaver.wps_restapi.swagger_definitions.ProvidersProcessesCollection(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

providers[source]
class weaver.wps_restapi.swagger_definitions.ProcessListingMetadata(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Metadata relative to the listed processes.[source]
page[source]
limit[source]
total[source]
class weaver.wps_restapi.swagger_definitions.MultiProcessesListing(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

_sort_first[source]
_sort_after[source]
class weaver.wps_restapi.swagger_definitions.OkGetProcessesListResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Listing of available processes successful.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkPostProcessDeployBodySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description[source]
deploymentDone[source]
processSummary[source]
failureReason[source]
class weaver.wps_restapi.swagger_definitions.OkPostProcessesResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Process successfully deployed.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkPatchProcessUpdatedBodySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description[source]
processSummary[source]
class weaver.wps_restapi.swagger_definitions.OkPatchProcessResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Process successfully updated.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.BadRequestGetProcessInfoResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Missing process identifier.[source]
body[source]
class weaver.wps_restapi.swagger_definitions.NotFoundProcessResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Process with specified reference identifier does not exist.[source]
examples[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetProcessInfoResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetProcessPackageSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetProcessPayloadSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.ProcessVisibilityResponseBodySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

value[source]
class weaver.wps_restapi.swagger_definitions.OkGetProcessVisibilitySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkPutProcessVisibilitySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.ForbiddenVisibilityUpdateResponseSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Visibility value modification not allowed.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkDeleteProcessUndeployBodySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

deploymentDone[source]
identifier[source]
failureReason[source]
class weaver.wps_restapi.swagger_definitions.OkDeleteProcessResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Process successfully undeployed.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetProviderProcessDescriptionResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.CreatedPostProvider(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.NotImplementedPostProviderResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Provider registration not supported using specified definition.[source]
class weaver.wps_restapi.swagger_definitions.PreferenceAppliedHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

description = Applied preferences from submitted 'Prefer' header after validation.[source]
name = Preference-Applied[source]
schema_type[source]
example = wait=10s, respond-async[source]
class weaver.wps_restapi.swagger_definitions.LocationHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

name = Location[source]
class weaver.wps_restapi.swagger_definitions.CreatedJobLocationHeader(*args, **kwargs)[source]

Headers describing resulting response.

location[source]
prefer_applied[source]
class weaver.wps_restapi.swagger_definitions.CreatedLaunchJobResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Job successfully submitted to processing queue. Execution should begin when resources are available.[source]
examples[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.CompletedJobLocationHeader(*args, **kwargs)[source]

Headers describing resulting response.

location[source]
prefer_applied[source]
class weaver.wps_restapi.swagger_definitions.CompletedJobStatusSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.CompletedJobResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Job submitted and completed execution synchronously.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.FailedSyncJobResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Job submitted and failed synchronous execution. See server logs for more details.[source]
class weaver.wps_restapi.swagger_definitions.OkDeleteProcessJobResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetQueriedJobsResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.BatchDismissJobsBodySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

jobs[source]
class weaver.wps_restapi.swagger_definitions.OkBatchDismissJobsResponseSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkDismissJobResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetJobStatusResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.InvalidJobResponseSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Job reference is not a valid UUID.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.NotFoundJobResponseSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Job reference UUID cannot be found.[source]
examples[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.GoneJobResponseSchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Job reference UUID cannot be dismissed again or its result artifacts were removed.[source]
examples[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetJobInputsResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetJobOutputsResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.RedirectResultResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.OkGetJobResultsResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.NoContentJobResultsHeaders(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

content_length[source]
class weaver.wps_restapi.swagger_definitions.NoContentJobResultsResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.CreatedQuoteExecuteResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.CreatedQuoteResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Quote successfully obtained for process execution definition.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.AcceptedQuoteResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

summary = Quote successfully submitted.[source]
description = Quote successfully submitted for evaluating process execution definition. Complete details will...[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetQuoteInfoResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetQuoteListResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetBillDetailResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetBillListResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetJobExceptionsResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetJobLogsResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkGetJobStatsResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.VaultFileID(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

description = Vault file identifier.[source]
example = 78977deb-28af-46f3-876b-cdd272742678[source]
class weaver.wps_restapi.swagger_definitions.VaultAccessToken(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

description = Vault file access token.[source]
example = 30d889cfb7ae3a63229a8de5f91abc1ef5966bb664972f234a4db9d28f8148e0e[source]
class weaver.wps_restapi.swagger_definitions.VaultEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
class weaver.wps_restapi.swagger_definitions.VaultUploadBody(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

schema_type[source]
description = Multipart file contents for upload to the vault.[source]
examples[source]
class weaver.wps_restapi.swagger_definitions.VaultUploadEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.VaultFileUploadedBodySchema(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

access_token[source]
file_id[source]
file_href[source]
class weaver.wps_restapi.swagger_definitions.VaultFileUploadedHeaders(*args, **kwargs)[source]

Headers describing resulting response.

location[source]
class weaver.wps_restapi.swagger_definitions.OkVaultFileUploadedResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = File successfully uploaded to vault.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.BadRequestVaultFileUploadResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Missing or incorrectly formed file contents.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.UnprocessableEntityVaultFileUploadResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Invalid filename refused for upload. Filename should include only alphanumeric, underscore,...[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.XAuthVaultFileHeader(*args, **kwargs)[source]

Base schema node with support of extended functionalities.

Combines all colander.SchemaNode extensions so that default keyword is used first to resolve a missing field value during deserialize() call, and then removes the node completely if no default was provided, and evaluate variables as needed.

See also

  • ExtendedMappingSchema

  • ExtendedSequenceSchema

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

summary = Authorization header with token for Vault file access.[source]
description[source]
name = X-Auth-Vault[source]
example = token {access-token}[; id={vault-id}][source]
schema_type[source]
class weaver.wps_restapi.swagger_definitions.VaultFileRequestHeaders(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

access_token[source]
class weaver.wps_restapi.swagger_definitions.VaultFileEndpoint(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
file_id[source]
class weaver.wps_restapi.swagger_definitions.OkVaultFileDetailResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.OkVaultFileDownloadResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

class weaver.wps_restapi.swagger_definitions.BadRequestVaultFileAccessResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Invalid file vault reference.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.ForbiddenVaultFileDownloadResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Forbidden access to vault file. Invalid authorization from provided token.[source]
header[source]
body[source]
class weaver.wps_restapi.swagger_definitions.GoneVaultFileDownloadResponse(*args, **kwargs)[source]

Combines multiple extensions of colander.MappingSchema handle their corresponding keywords.

Resolution is done so that default keyword is used first to resolve a missing object during deserialize() call, and then removes the node completely if no default was provided.

See also

  • DefaultSchemaNode

  • DropableSchemaNode

  • VariableSchemaNode

  • ExtendedSchemaNode

  • ExtendedSequenceSchema

  • SortableMappingSchema

  • PermissiveMappingSchema

description = Vault File resource corresponding to specified ID is not available anymore.[source]
header[source]
body[source]
weaver.wps_restapi.swagger_definitions.get_api_frontpage_responses[source]
weaver.wps_restapi.swagger_definitions.get_openapi_json_responses[source]
weaver.wps_restapi.swagger_definitions.get_api_swagger_ui_responses[source]
weaver.wps_restapi.swagger_definitions.get_api_redoc_ui_responses[source]
weaver.wps_restapi.swagger_definitions.get_api_versions_responses[source]
weaver.wps_restapi.swagger_definitions.get_api_conformance_responses[source]
weaver.wps_restapi.swagger_definitions.get_processes_responses[source]
weaver.wps_restapi.swagger_definitions.post_processes_responses[source]
weaver.wps_restapi.swagger_definitions.put_process_responses[source]
weaver.wps_restapi.swagger_definitions.patch_process_responses[source]
weaver.wps_restapi.swagger_definitions.get_process_responses[source]
weaver.wps_restapi.swagger_definitions.get_process_package_responses[source]
weaver.wps_restapi.swagger_definitions.get_process_payload_responses[source]
weaver.wps_restapi.swagger_definitions.get_process_visibility_responses[source]
weaver.wps_restapi.swagger_definitions.put_process_visibility_responses[source]
weaver.wps_restapi.swagger_definitions.delete_process_responses[source]
weaver.wps_restapi.swagger_definitions.get_providers_list_responses[source]
weaver.wps_restapi.swagger_definitions.get_provider_responses[source]
weaver.wps_restapi.swagger_definitions.delete_provider_responses[source]
weaver.wps_restapi.swagger_definitions.get_provider_processes_responses[source]
weaver.wps_restapi.swagger_definitions.get_provider_process_responses[source]
weaver.wps_restapi.swagger_definitions.post_provider_responses[source]
weaver.wps_restapi.swagger_definitions.post_provider_process_job_responses[source]
weaver.wps_restapi.swagger_definitions.post_process_jobs_responses[source]
weaver.wps_restapi.swagger_definitions.get_all_jobs_responses[source]
weaver.wps_restapi.swagger_definitions.delete_jobs_responses[source]
weaver.wps_restapi.swagger_definitions.get_prov_all_jobs_responses[source]
weaver.wps_restapi.swagger_definitions.get_single_job_status_responses[source]
weaver.wps_restapi.swagger_definitions.get_prov_single_job_status_responses[source]
weaver.wps_restapi.swagger_definitions.delete_job_responses[source]
weaver.wps_restapi.swagger_definitions.delete_prov_job_responses[source]
weaver.wps_restapi.swagger_definitions.get_job_inputs_responses[source]
weaver.wps_restapi.swagger_definitions.get_prov_inputs_responses[source]
weaver.wps_restapi.swagger_definitions.get_job_outputs_responses[source]
weaver.wps_restapi.swagger_definitions.get_prov_outputs_responses[source]
weaver.wps_restapi.swagger_definitions.get_result_redirect_responses[source]
weaver.wps_restapi.swagger_definitions.get_job_results_responses[source]
weaver.wps_restapi.swagger_definitions.get_prov_results_responses[source]
weaver.wps_restapi.swagger_definitions.get_exceptions_responses[source]
weaver.wps_restapi.swagger_definitions.get_prov_exceptions_responses[source]
weaver.wps_restapi.swagger_definitions.get_logs_responses[source]
weaver.wps_restapi.swagger_definitions.get_prov_logs_responses[source]
weaver.wps_restapi.swagger_definitions.get_stats_responses[source]
weaver.wps_restapi.swagger_definitions.get_prov_stats_responses[source]
weaver.wps_restapi.swagger_definitions.get_quote_list_responses[source]
weaver.wps_restapi.swagger_definitions.get_quote_responses[source]
weaver.wps_restapi.swagger_definitions.post_quotes_responses[source]
weaver.wps_restapi.swagger_definitions.post_quote_responses[source]
weaver.wps_restapi.swagger_definitions.get_bill_list_responses[source]
weaver.wps_restapi.swagger_definitions.get_bill_responses[source]
weaver.wps_restapi.swagger_definitions.post_vault_responses[source]
weaver.wps_restapi.swagger_definitions.head_vault_file_responses[source]
weaver.wps_restapi.swagger_definitions.get_vault_file_responses[source]
weaver.wps_restapi.swagger_definitions.wps_responses[source]
weaver.wps_restapi.swagger_definitions.service_api_route_info(service_api: weaver.wps_restapi.patches.ServiceOnlyExplicitGetHead, settings: weaver.typedefs.SettingsType) ViewInfo[source]

Automatically generates the view configuration parameters from the cornice service definition.

Parameters
  • service_api – cornice service with name and path definition.

  • settings – settings to obtain the base path of the application.

Returns

view configuration parameters that can be passed directly to config.add_route call.

weaver.wps_restapi.swagger_definitions.datetime_interval_parser(datetime_interval: str) weaver.typedefs.DatetimeIntervalType[source]

This function parses a given datetime or interval into a dictionary that will be easy for database process.