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 definitions 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.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.1[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_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.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', 'abstract', 'description', 'keywords', 'metadata', 'inputs', 'outputs'][source]
weaver.wps_restapi.swagger_definitions.PROCESS_DESCRIPTION_FIELD_AFTER = ['processDescriptionURL', 'processEndpointWPS1', 'executeEndpoint', '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.PROVIDER_DESCRIPTION_FIELD_FIRST = ['id', 'title', 'version', 'description', 'url', 'type', 'public', 'keywords', 'metadata'][source]
weaver.wps_restapi.swagger_definitions.PROVIDER_DESCRIPTION_FIELD_AFTER = ['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_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.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_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_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]
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 = ^[A-Za-z0-9]+(?:(-|_)[A-Za-z0-9]+)*$[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 = ^\w+\/[-.\w]+(?:\+[-.\w]+)?(?:\;\s*.+)*$[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 = (\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(([+-]\d\d:\d\d)|Z)?)[source]
regex_interval_closed[source]
regex_interval_open_start[source]
regex_interval_open_end[source]
pattern[source]
class weaver.wps_restapi.swagger_definitions.S3Bucket(*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>/<job-uuid>/<output>.ext][source]
pattern = ^s3://\S+$[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]
validator[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.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.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]
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.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.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

description = Authentication header for private registry access in order to retrieve the Docker image...[source]
name = X-Auth-Docker[source]
schema_type[source]
missing[source]
class weaver.wps_restapi.swagger_definitions.RequestContentTypeHeader(*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
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.ResponseContentTypeHeader(*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
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.RequestHeaders(*args, **kwargs)[source]

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

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

Headers describing resulting response.

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

Headers describing resulting response.

Location[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.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.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

type[source]
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
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]

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

Resolution is done so that default keyword is used first to resolve a missing 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.

This is equivalent to OpenAPI object mapping with additionalProperties: false, but is more explicit in the definition of invalid or conflicting field names with explicit definitions during deserialization.

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]
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
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
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
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(self, 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.

mediaType[source]
encoding[source]
schema[source]
class weaver.wps_restapi.swagger_definitions.DeployFormatDefaultMimeType(*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.DeployFormatDefault(*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
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
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
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, **kwargs)[source]

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

Resolution is done so that default keyword is used first to resolve a missing 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.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
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
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]
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
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
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.

This is equivalent to OpenAPI object mapping with additionalProperties: false, but is more explicit in the definition of invalid or conflicting field names with explicit definitions during deserialization.

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.

This is equivalent to OpenAPI object mapping with additionalProperties: false, but is more explicit in the definition of invalid or conflicting field names with explicit definitions during deserialization.

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
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
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, **kwargs)[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, **kwargs)[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
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.

This is equivalent to OpenAPI object mapping with additionalProperties: false, but is more explicit in the definition of invalid or conflicting field names with explicit definitions during deserialization.

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
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
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, **kwargs)[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, **kwargs)[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
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_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_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.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.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.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.Visibility(*args, **kwargs)[source]

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

Resolution is done so that default keyword is used first to resolve a missing 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.ProcessPath(*args, **kwargs)[source]

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

Resolution is done so that default keyword is used first to resolve a missing 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.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.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]
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
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