diff --git a/schemas/index_openapi_schema.json b/schemas/index_openapi_schema.json index 8eb692156..a58cf0b1e 100644 --- a/schemas/index_openapi_schema.json +++ b/schemas/index_openapi_schema.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.2", + "openapi": "3.1.0", "info": { "title": "OPTIMADE API - Index meta-database", - "description": "The [Open Databases Integration for Materials Design (OPTIMADE) consortium](https://www.optimade.org/) aims to make materials databases interoperational by developing a common REST API.\nThis is the \"special\" index meta-database.\n\nThis specification is generated using [`optimade-python-tools`](https://github.com/Materials-Consortia/optimade-python-tools/tree/v0.16.0) v0.16.0.", - "version": "1.1.0~develop" + "description": "The [Open Databases Integration for Materials Design (OPTIMADE) consortium](https://www.optimade.org/) aims to make materials databases interoperational by developing a common REST API.\nThis is the \"special\" index meta-database.\n\nThis specification is generated using [`optimade-python-tools`](https://github.com/Materials-Consortia/optimade-python-tools/tree/v0.25.3) v0.25.3.", + "version": "1.2.0~develop" }, "paths": { "/info": { @@ -17,7 +17,7 @@ "200": { "description": "Successful Response", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/IndexInfoResponse" } @@ -27,7 +27,7 @@ "400": { "description": "Bad Request", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -37,7 +37,7 @@ "403": { "description": "Forbidden", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -47,7 +47,7 @@ "404": { "description": "Not Found", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -57,7 +57,7 @@ "422": { "description": "Unprocessable Entity", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -67,7 +67,7 @@ "500": { "description": "Internal Server Error", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -77,7 +77,7 @@ "501": { "description": "Not Implemented", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -87,7 +87,7 @@ "553": { "description": "Version Not Supported", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -109,8 +109,8 @@ "description": "A filter string, in the format described in section API Filtering Format Specification of the specification.", "required": false, "schema": { - "title": "Filter", "type": "string", + "title": "Filter", "description": "A filter string, in the format described in section API Filtering Format Specification of the specification.", "default": "" }, @@ -121,8 +121,8 @@ "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", "required": false, "schema": { - "title": "Response Format", "type": "string", + "title": "Response Format", "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", "default": "json" }, @@ -133,10 +133,10 @@ "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "required": false, "schema": { - "title": "Email Address", "type": "string", - "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "format": "email", + "title": "Email Address", + "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "default": "" }, "name": "email_address", @@ -146,9 +146,9 @@ "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", "required": false, "schema": { - "title": "Response Fields", - "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", "type": "string", + "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", + "title": "Response Fields", "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", "default": "" }, @@ -159,9 +159,9 @@ "description": "If supporting sortable queries, an implementation MUST use the `sort` query parameter with format as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-sorting).\n\nAn implementation MAY support multiple sort fields for a single query.\nIf it does, it again MUST conform to the JSON API 1.0 specification.\n\nIf an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`.\nIf a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name.\nThe set of field names, with `sortable` equal to `true` are allowed to be used in the \"sort fields\" list according to its definition in the JSON API 1.0 specification.\nThe field `sortable` is in addition to each property description and other OPTIONAL fields.\nAn example is shown in the section Entry Listing Info Endpoints.", "required": false, "schema": { - "title": "Sort", - "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", "type": "string", + "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", + "title": "Sort", "description": "If supporting sortable queries, an implementation MUST use the `sort` query parameter with format as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-sorting).\n\nAn implementation MAY support multiple sort fields for a single query.\nIf it does, it again MUST conform to the JSON API 1.0 specification.\n\nIf an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`.\nIf a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name.\nThe set of field names, with `sortable` equal to `true` are allowed to be used in the \"sort fields\" list according to its definition in the JSON API 1.0 specification.\nThe field `sortable` is in addition to each property description and other OPTIONAL fields.\nAn example is shown in the section Entry Listing Info Endpoints.", "default": "" }, @@ -172,9 +172,9 @@ "description": "Sets a numerical limit on the number of entries returned.\nSee [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination).\nThe API implementation MUST return no more than the number specified.\nIt MAY return fewer.\nThe database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned).\nThe default limit value is up to the API implementation to decide.\nExample: `http://example.com/optimade/v1/structures?page_limit=100`", "required": false, "schema": { - "title": "Page Limit", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Page Limit", "description": "Sets a numerical limit on the number of entries returned.\nSee [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination).\nThe API implementation MUST return no more than the number specified.\nIt MAY return fewer.\nThe database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned).\nThe default limit value is up to the API implementation to decide.\nExample: `http://example.com/optimade/v1/structures?page_limit=100`", "default": 20 }, @@ -185,9 +185,9 @@ "description": "RECOMMENDED for use with _offset-based_ pagination: using `page_offset` and `page_limit` is RECOMMENDED.\nExample: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`.", "required": false, "schema": { - "title": "Page Offset", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Page Offset", "description": "RECOMMENDED for use with _offset-based_ pagination: using `page_offset` and `page_limit` is RECOMMENDED.\nExample: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`.", "default": 0 }, @@ -198,11 +198,9 @@ "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`.", "required": false, "schema": { - "title": "Page Number", - "minimum": 0.0, "type": "integer", - "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`.", - "default": 0 + "title": "Page Number", + "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`." }, "name": "page_number", "in": "query" @@ -211,9 +209,9 @@ "description": "RECOMMENDED for use with _cursor-based_ pagination: using `page_cursor` and `page_limit` is RECOMMENDED.", "required": false, "schema": { - "title": "Page Cursor", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Page Cursor", "description": "RECOMMENDED for use with _cursor-based_ pagination: using `page_cursor` and `page_limit` is RECOMMENDED.", "default": 0 }, @@ -224,11 +222,9 @@ "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`.", "required": false, "schema": { + "type": "string", "title": "Page Above", - "minimum": 0.0, - "type": "integer", - "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`.", - "default": 0 + "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`." }, "name": "page_above", "in": "query" @@ -237,11 +233,9 @@ "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.", "required": false, "schema": { + "type": "string", "title": "Page Below", - "minimum": 0.0, - "type": "integer", - "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.", - "default": 0 + "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED." }, "name": "page_below", "in": "query" @@ -250,8 +244,8 @@ "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", "required": false, "schema": { - "title": "Include", "type": "string", + "title": "Include", "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", "default": "references" }, @@ -262,9 +256,9 @@ "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", "required": false, "schema": { - "title": "Api Hint", - "pattern": "(v[0-9]+(\\.[0-9]+)?)?", "type": "string", + "pattern": "(v[0-9]+(\\.[0-9]+)?)?", + "title": "Api Hint", "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", "default": "" }, @@ -276,7 +270,7 @@ "200": { "description": "Successful Response", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/LinksResponse" } @@ -286,7 +280,7 @@ "400": { "description": "Bad Request", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -296,7 +290,7 @@ "403": { "description": "Forbidden", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -306,7 +300,7 @@ "404": { "description": "Not Found", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -316,7 +310,7 @@ "422": { "description": "Unprocessable Entity", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -326,7 +320,7 @@ "500": { "description": "Internal Server Error", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -336,7 +330,7 @@ "501": { "description": "Not Implemented", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -346,7 +340,7 @@ "553": { "description": "Version Not Supported", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -382,1542 +376,1604 @@ "components": { "schemas": { "Aggregate": { - "title": "Aggregate", "enum": [ "ok", "test", "staging", "no" ], + "title": "Aggregate", "description": "Enumeration of aggregate values" }, "Attributes": { - "title": "Attributes", - "type": "object", "properties": {}, + "type": "object", + "title": "Attributes", "description": "Members of the attributes object (\"attributes\") represent information about the resource object in which it's defined.\nThe keys for Attributes MUST NOT be:\n relationships\n links\n id\n type" }, "AvailableApiVersion": { - "title": "AvailableApiVersion", - "required": [ - "url", - "version" - ], - "type": "object", "properties": { "url": { - "title": "Url", + "type": "string", "maxLength": 65536, "minLength": 1, "pattern": ".+/v[0-1](\\.[0-9]+)*/?$", - "type": "string", - "description": "A string specifying a versioned base URL that MUST adhere to the rules in section Base URL", - "format": "uri" + "format": "uri", + "title": "Url", + "description": "A string specifying a versioned base URL that MUST adhere to the rules in section Base URL" }, "version": { - "title": "Version", - "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", "type": "string", - "description": "A string containing the full version number of the API served at that versioned base URL.\nThe version number string MUST NOT be prefixed by, e.g., 'v'.\nExamples: `1.0.0`, `1.0.0-rc.2`." + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", + "title": "Version", + "description": "A string containing the full version number of the API served at that versioned base URL.\nThe version number string MUST NOT be prefixed by, e.g., 'v'.\nExamples: `1.0.0`, `1.0.0-rc.2`.", + "example": [ + "0.10.1", + "1.0.0-rc.2", + "1.2.3-rc.5+develop" + ] } }, + "type": "object", + "required": [ + "url", + "version" + ], + "title": "AvailableApiVersion", "description": "A JSON object containing information about an available API version" }, "BaseRelationshipMeta": { - "title": "BaseRelationshipMeta", - "required": [ - "description" - ], - "type": "object", "properties": { "description": { - "title": "Description", "type": "string", - "description": "OPTIONAL human-readable description of the relationship" + "title": "Description", + "description": "OPTIONAL human-readable description of the relationship." } }, + "type": "object", + "required": [ + "description" + ], + "title": "BaseRelationshipMeta", "description": "Specific meta field for base relationship resource" }, "BaseRelationshipResource": { - "title": "BaseRelationshipResource", - "required": [ - "id", - "type" - ], - "type": "object", "properties": { "id": { - "title": "Id", "type": "string", + "title": "Id", "description": "Resource ID" }, "type": { - "title": "Type", "type": "string", + "title": "Type", "description": "Resource type" }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/BaseRelationshipMeta" } ], + "title": "Meta", "description": "Relationship meta field. MUST contain 'description' if supplied." } }, + "type": "object", + "required": [ + "id", + "type" + ], + "title": "BaseRelationshipResource", "description": "Minimum requirements to represent a relationship resource" }, "EntryRelationships": { - "title": "EntryRelationships", - "type": "object", "properties": { "references": { - "title": "References", "allOf": [ { "$ref": "#/components/schemas/ReferenceRelationship" } ], + "title": "References", "description": "Object containing links to relationships with entries of the `references` type." }, "structures": { - "title": "Structures", "allOf": [ { "$ref": "#/components/schemas/StructureRelationship" } ], + "title": "Structures", "description": "Object containing links to relationships with entries of the `structures` type." } }, + "type": "object", + "title": "EntryRelationships", "description": "This model wraps the JSON API Relationships to include type-specific top level keys." }, "EntryResource": { - "title": "EntryResource", - "required": [ - "id", - "type", - "attributes" - ], - "type": "object", "properties": { "id": { - "title": "Id", "type": "string", - "description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`" + "title": "Id", + "description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`", + "x-optimade-support": "must", + "x-optimade-queryable": "must" }, "type": { - "title": "Type", "type": "string", - "description": "The name of the type of an entry.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n - MUST be an existing entry type.\n - The entry of type `` and ID `` MUST be returned in response to a request for `//` under the versioned base URL.\n\n- **Example**: `\"structures\"`" + "title": "Type", + "description": "The name of the type of an entry.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n - MUST be an existing entry type.\n - The entry of type `` and ID `` MUST be returned in response to a request for `//` under the versioned base URL.\n\n- **Example**: `\"structures\"`", + "x-optimade-support": "must", + "x-optimade-queryable": "must" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ResourceLinks" } ], + "title": "Links", "description": "a links object containing links related to the resource." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship." }, "attributes": { - "title": "Attributes", "allOf": [ { "$ref": "#/components/schemas/EntryResourceAttributes" } ], + "title": "Attributes", "description": "A dictionary, containing key-value pairs representing the entry's properties, except for `type` and `id`.\nDatabase-provider-specific properties need to include the database-provider-specific prefix (see section on Database-Provider-Specific Namespace Prefixes)." }, "relationships": { - "title": "Relationships", "allOf": [ { "$ref": "#/components/schemas/EntryRelationships" } ], + "title": "Relationships", "description": "A dictionary containing references to other entries according to the description in section Relationships encoded as [JSON API Relationships](https://jsonapi.org/format/1.0/#document-resource-object-relationships).\nThe OPTIONAL human-readable description of the relationship MAY be provided in the `description` field inside the `meta` dictionary of the JSON API resource identifier object." } }, + "type": "object", + "required": [ + "id", + "type", + "attributes" + ], + "title": "EntryResource", "description": "The base model for an entry resource." }, "EntryResourceAttributes": { - "title": "EntryResourceAttributes", - "required": [ - "last_modified" - ], - "type": "object", "properties": { "immutable_id": { - "title": "Immutable Id", "type": "string", - "description": "The entry's immutable ID (e.g., an UUID). This is important for databases having preferred IDs that point to \"the latest version\" of a record, but still offer access to older variants. This ID maps to the version-specific record, in case it changes in the future.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n\n- **Examples**:\n - `\"8bd3e750-b477-41a0-9b11-3a799f21b44f\"`\n - `\"fjeiwoj,54;@=%<>#32\"` (Strings that are not URL-safe are allowed.)" + "title": "Immutable Id", + "description": "The entry's immutable ID (e.g., an UUID). This is important for databases having preferred IDs that point to \"the latest version\" of a record, but still offer access to older variants. This ID maps to the version-specific record, in case it changes in the future.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n\n- **Examples**:\n - `\"8bd3e750-b477-41a0-9b11-3a799f21b44f\"`\n - `\"fjeiwoj,54;@=%<>#32\"` (Strings that are not URL-safe are allowed.)", + "x-optimade-support": "optional", + "x-optimade-queryable": "must" }, "last_modified": { - "title": "Last Modified", "type": "string", + "format": "date-time", + "title": "Last Modified", "description": "Date and time representing when the entry was last modified.\n\n- **Type**: timestamp.\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response unless the query parameter `response_fields` is present and does not include this property.\n\n- **Example**:\n - As part of JSON response format: `\"2007-04-05T14:30:20Z\"` (i.e., encoded as an [RFC 3339 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6) string.)", - "format": "date-time" + "x-optimade-support": "should", + "x-optimade-queryable": "must" } }, + "type": "object", + "required": [ + "last_modified" + ], + "title": "EntryResourceAttributes", "description": "Contains key-value pairs representing the entry's properties." }, "Error": { - "title": "Error", - "type": "object", "properties": { "id": { - "title": "Id", "type": "string", + "title": "Id", "description": "A unique identifier for this particular occurrence of the problem." }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ErrorLinks" } ], + "title": "Links", "description": "A links object storing about" }, "status": { - "title": "Status", "type": "string", + "title": "Status", "description": "the HTTP status code applicable to this problem, expressed as a string value." }, "code": { - "title": "Code", "type": "string", + "title": "Code", "description": "an application-specific error code, expressed as a string value." }, "title": { - "title": "Title", "type": "string", + "title": "Title", "description": "A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization." }, "detail": { - "title": "Detail", "type": "string", + "title": "Detail", "description": "A human-readable explanation specific to this occurrence of the problem." }, "source": { - "title": "Source", "allOf": [ { "$ref": "#/components/schemas/ErrorSource" } ], + "title": "Source", "description": "An object containing references to the source of the error" }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about the error." } }, + "type": "object", + "title": "Error", "description": "An error response" }, "ErrorLinks": { - "title": "ErrorLinks", - "type": "object", "properties": { "about": { - "title": "About", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "About", "description": "A link that leads to further details about this particular occurrence of the problem." } }, + "type": "object", + "title": "ErrorLinks", "description": "A Links object specific to Error objects" }, "ErrorResponse": { - "title": "ErrorResponse", - "required": [ - "meta", - "errors" - ], - "type": "object", "properties": { "data": { - "title": "Data", - "uniqueItems": true, "anyOf": [ { "$ref": "#/components/schemas/Resource" }, { - "type": "array", "items": { "$ref": "#/components/schemas/Resource" - } + }, + "type": "array" } ], + "uniqueItems": true, + "title": "Data", "description": "Outputted Data" }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/ResponseMeta" } ], - "description": "A meta object containing non-standard information" + "title": "Meta", + "description": "A meta object containing non-standard information." }, "errors": { - "title": "Errors", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/OptimadeError" }, + "type": "array", + "uniqueItems": true, + "title": "Errors", "description": "A list of OPTIMADE-specific JSON API error objects, where the field detail MUST be present." }, "included": { - "title": "Included", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Resource" }, + "type": "array", + "uniqueItems": true, + "title": "Included", "description": "A list of unique included resources" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ToplevelLinks" } ], + "title": "Links", "description": "Links associated with the primary data or errors" }, "jsonapi": { - "title": "Jsonapi", "allOf": [ { "$ref": "#/components/schemas/JsonApi" } ], + "title": "Jsonapi", "description": "Information about the JSON API used" } }, + "type": "object", + "required": [ + "meta", + "errors" + ], + "title": "ErrorResponse", "description": "errors MUST be present and data MUST be skipped" }, "ErrorSource": { - "title": "ErrorSource", - "type": "object", "properties": { "pointer": { - "title": "Pointer", "type": "string", + "title": "Pointer", "description": "a JSON Pointer [RFC6901] to the associated entity in the request document [e.g. \"/data\" for a primary data object, or \"/data/attributes/title\" for a specific attribute]." }, "parameter": { - "title": "Parameter", "type": "string", + "title": "Parameter", "description": "a string indicating which URI query parameter caused the error." } }, + "type": "object", + "title": "ErrorSource", "description": "an object containing references to the source of the error" }, "Implementation": { - "title": "Implementation", - "type": "object", "properties": { "name": { - "title": "Name", "type": "string", + "title": "Name", "description": "name of the implementation" }, "version": { - "title": "Version", "type": "string", + "title": "Version", "description": "version string of the current implementation" }, "homepage": { - "title": "Homepage", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Homepage", "description": "A [JSON API links object](http://jsonapi.org/format/1.0/#document-links) pointing to the homepage of the implementation." }, "source_url": { - "title": "Source Url", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Source Url", "description": "A [JSON API links object](http://jsonapi.org/format/1.0/#document-links) pointing to the implementation source, either downloadable archive or version control system." }, "maintainer": { - "title": "Maintainer", "allOf": [ { "$ref": "#/components/schemas/ImplementationMaintainer" } ], + "title": "Maintainer", "description": "A dictionary providing details about the maintainer of the implementation." }, "issue_tracker": { - "title": "Issue Tracker", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Issue Tracker", "description": "A [JSON API links object](http://jsonapi.org/format/1.0/#document-links) pointing to the implementation's issue tracker." } }, + "type": "object", + "title": "Implementation", "description": "Information on the server implementation" }, "ImplementationMaintainer": { - "title": "ImplementationMaintainer", - "required": [ - "email" - ], - "type": "object", "properties": { "email": { - "title": "Email", "type": "string", - "description": "the maintainer's email address", - "format": "email" + "format": "email", + "title": "Email", + "description": "the maintainer's email address" } }, - "description": "Details about the maintainer of the implementation" - }, - "IndexInfoAttributes": { - "title": "IndexInfoAttributes", + "type": "object", "required": [ - "api_version", - "available_api_versions", - "available_endpoints", - "entry_types_by_format" + "email" ], - "type": "object", + "title": "ImplementationMaintainer", + "description": "Details about the maintainer of the implementation" + }, + "IndexInfoAttributes": { "properties": { "api_version": { - "title": "Api Version", - "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", "type": "string", - "description": "Presently used full version of the OPTIMADE API.\nThe version number string MUST NOT be prefixed by, e.g., \"v\".\nExamples: `1.0.0`, `1.0.0-rc.2`." + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", + "title": "Api Version", + "description": "Presently used full version of the OPTIMADE API.\nThe version number string MUST NOT be prefixed by, e.g., \"v\".\nExamples: `1.0.0`, `1.0.0-rc.2`.", + "example": [ + "0.10.1", + "1.0.0-rc.2", + "1.2.3-rc.5+develop" + ] }, "available_api_versions": { - "title": "Available Api Versions", - "type": "array", "items": { "$ref": "#/components/schemas/AvailableApiVersion" }, + "type": "array", + "title": "Available Api Versions", "description": "A list of dictionaries of available API versions at other base URLs" }, "formats": { - "title": "Formats", - "type": "array", "items": { "type": "string" }, + "type": "array", + "title": "Formats", "description": "List of available output formats.", "default": [ "json" ] }, "available_endpoints": { - "title": "Available Endpoints", - "type": "array", "items": { "type": "string" }, + "type": "array", + "title": "Available Endpoints", "description": "List of available endpoints (i.e., the string to be appended to the versioned base URL)." }, "entry_types_by_format": { - "title": "Entry Types By Format", - "type": "object", "additionalProperties": { - "type": "array", "items": { "type": "string" - } + }, + "type": "array" }, + "type": "object", + "title": "Entry Types By Format", "description": "Available entry endpoints as a function of output formats." }, + "license": { + "anyOf": [ + { + "$ref": "#/components/schemas/Link" + }, + { + "type": "string", + "maxLength": 65536, + "minLength": 1, + "format": "uri" + } + ], + "title": "License", + "description": "A [JSON API links object](http://jsonapi.org/format/1.0/#document-links) giving a URL to a web page containing a human-readable text describing the license (or licensing options if there are multiple) covering all the data and metadata provided by this database.\nClients are advised not to try automated parsing of this link or its content, but rather rely on the field `available_licenses` instead." + }, + "available_licenses": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Available Licenses", + "description": "List of [SPDX license identifiers](https://spdx.org/licenses/) specifying a set of alternative licenses under which the client is granted access to all the data and metadata in this database.\n\nIf the data and metadata is available under multiple alternative licenses, identifiers of these multiple licenses SHOULD be provided to let clients know under which conditions the data and metadata can be used.\nInclusion of a license identifier in the list is a commitment of the database that the rights are in place to grant clients access to all the data and metadata according to the terms of either of these licenses (at the choice of the client).\nIf the licensing information provided via the field `license` omits licensing options specified in `available_licenses`, or if it otherwise contradicts them, a client MUST still be allowed to interpret the inclusion of a license in `available_licenses` as a full commitment from the database that the data and metadata is available, without exceptions, under the respective licenses.\nIf the database cannot make that commitment, e.g., if only part of the data is available under a license, the corresponding license identifier MUST NOT appear in `available_licenses` (but, rather, the field `license` is to be used to clarify the licensing situation.)\nAn empty list indicates that none of the SPDX licenses apply for the entirety of the database and that the licensing situation is clarified in human readable form in the field `license`." + }, "is_index": { - "title": "Is Index", "type": "boolean", - "description": "This must be `true` since this is an index meta-database (see section Index Meta-Database)." + "title": "Is Index", + "description": "This must be `true` since this is an index meta-database (see section Index Meta-Database).", + "default": true } }, + "type": "object", + "required": [ + "api_version", + "available_api_versions", + "available_endpoints", + "entry_types_by_format", + "license", + "available_licenses" + ], + "title": "IndexInfoAttributes", "description": "Attributes for Base URL Info endpoint for an Index Meta-Database" }, "IndexInfoResource": { - "title": "IndexInfoResource", - "required": [ - "id", - "type", - "attributes", - "relationships" - ], - "type": "object", "properties": { "id": { - "title": "Id", + "type": "string", "pattern": "^/$", - "type": "string" + "title": "Id", + "default": "/" }, "type": { - "title": "Type", + "type": "string", "pattern": "^info$", - "type": "string" + "title": "Type", + "default": "info" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ResourceLinks" } ], + "title": "Links", "description": "a links object containing links related to the resource." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship." }, "attributes": { "$ref": "#/components/schemas/IndexInfoAttributes" }, "relationships": { - "title": "Relationships", - "type": "object", "additionalProperties": { "$ref": "#/components/schemas/IndexRelationship" }, + "type": "object", + "title": "Relationships", "description": "Reference to the Links identifier object under the `links` endpoint that the provider has chosen as their 'default' OPTIMADE API database.\nA client SHOULD present this database as the first choice when an end-user chooses this provider." } }, + "type": "object", + "required": [ + "id", + "type", + "attributes", + "relationships" + ], + "title": "IndexInfoResource", "description": "Index Meta-Database Base URL Info endpoint resource" }, "IndexInfoResponse": { - "title": "IndexInfoResponse", - "required": [ - "data", - "meta" - ], - "type": "object", "properties": { "data": { - "title": "Data", "allOf": [ { "$ref": "#/components/schemas/IndexInfoResource" } ], - "description": "Index meta-database /info data" + "title": "Data", + "description": "Index meta-database /info data." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/ResponseMeta" } ], + "title": "Meta", "description": "A meta object containing non-standard information" }, "errors": { - "title": "Errors", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Error" }, + "type": "array", + "uniqueItems": true, + "title": "Errors", "description": "A list of unique errors" }, "included": { - "title": "Included", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Resource" }, + "type": "array", + "uniqueItems": true, + "title": "Included", "description": "A list of unique included resources" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ToplevelLinks" } ], + "title": "Links", "description": "Links associated with the primary data or errors" }, "jsonapi": { - "title": "Jsonapi", "allOf": [ { "$ref": "#/components/schemas/JsonApi" } ], + "title": "Jsonapi", "description": "Information about the JSON API used" } }, + "type": "object", + "required": [ + "data", + "meta" + ], + "title": "IndexInfoResponse", "description": "errors are not allowed" }, "IndexRelationship": { - "title": "IndexRelationship", - "required": [ - "data" - ], - "type": "object", "properties": { "data": { - "title": "Data", "allOf": [ { "$ref": "#/components/schemas/RelatedLinksResource" } ], + "title": "Data", "description": "[JSON API resource linkage](http://jsonapi.org/format/1.0/#document-links).\nIt MUST be either `null` or contain a single Links identifier object with the fields `id` and `type`" } }, + "type": "object", + "required": [ + "data" + ], + "title": "IndexRelationship", "description": "Index Meta-Database relationship" }, "JsonApi": { - "title": "JsonApi", - "type": "object", "properties": { "version": { - "title": "Version", "type": "string", + "title": "Version", "description": "Version of the json API used", "default": "1.0" }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "Non-standard meta information" } }, + "type": "object", + "title": "JsonApi", "description": "An object describing the server's implementation" }, "Link": { - "title": "Link", - "required": [ - "href" - ], - "type": "object", "properties": { "href": { - "title": "Href", + "type": "string", "maxLength": 65536, "minLength": 1, - "type": "string", - "description": "a string containing the link\u2019s URL.", - "format": "uri" + "format": "uri", + "title": "Href", + "description": "a string containing the link\u2019s URL." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about the link." } }, + "type": "object", + "required": [ + "href" + ], + "title": "Link", "description": "A link **MUST** be represented as either: a string containing the link's URL or a link object." }, "LinkType": { - "title": "LinkType", "enum": [ "child", "root", "external", "providers" ], + "title": "LinkType", "description": "Enumeration of link_type values" }, "LinksResource": { - "title": "LinksResource", - "required": [ - "id", - "type", - "attributes" - ], - "type": "object", "properties": { "id": { - "title": "Id", "type": "string", - "description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`" + "title": "Id", + "description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`", + "x-optimade-support": "must", + "x-optimade-queryable": "must" }, "type": { - "title": "Type", - "pattern": "^links$", "type": "string", - "description": "These objects are described in detail in the section Links Endpoint" + "pattern": "^links$", + "title": "Type", + "description": "These objects are described in detail in the section Links Endpoint", + "default": "links" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ResourceLinks" } ], + "title": "Links", "description": "a links object containing links related to the resource." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship." }, "attributes": { - "title": "Attributes", "allOf": [ { "$ref": "#/components/schemas/LinksResourceAttributes" } ], + "title": "Attributes", "description": "A dictionary containing key-value pairs representing the Links resource's properties." }, "relationships": { - "title": "Relationships", "allOf": [ { "$ref": "#/components/schemas/EntryRelationships" } ], + "title": "Relationships", "description": "A dictionary containing references to other entries according to the description in section Relationships encoded as [JSON API Relationships](https://jsonapi.org/format/1.0/#document-resource-object-relationships).\nThe OPTIONAL human-readable description of the relationship MAY be provided in the `description` field inside the `meta` dictionary of the JSON API resource identifier object." } }, + "type": "object", + "required": [ + "id", + "type", + "attributes" + ], + "title": "LinksResource", "description": "A Links endpoint resource object" }, "LinksResourceAttributes": { - "title": "LinksResourceAttributes", - "required": [ - "name", - "description", - "base_url", - "homepage", - "link_type" - ], - "type": "object", "properties": { "name": { - "title": "Name", "type": "string", + "title": "Name", "description": "Human-readable name for the OPTIMADE API implementation, e.g., for use in clients to show the name to the end-user." }, "description": { - "title": "Description", "type": "string", + "title": "Description", "description": "Human-readable description for the OPTIMADE API implementation, e.g., for use in clients to show a description to the end-user." }, "base_url": { - "title": "Base Url", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Base Url", "description": "JSON API links object, pointing to the base URL for this implementation" }, "homepage": { - "title": "Homepage", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Homepage", "description": "JSON API links object, pointing to a homepage URL for this implementation" }, "link_type": { - "title": "Link Type", "allOf": [ { "$ref": "#/components/schemas/LinkType" } ], + "title": "Link Type", "description": "The type of the linked relation.\nMUST be one of these values: 'child', 'root', 'external', 'providers'." }, "aggregate": { - "title": "Aggregate", "allOf": [ { "$ref": "#/components/schemas/Aggregate" } ], + "title": "Aggregate", "description": "A string indicating whether a client that is following links to aggregate results from different OPTIMADE implementations should follow this link or not.\nThis flag SHOULD NOT be indicated for links where `link_type` is not `child`.\n\nIf not specified, clients MAY assume that the value is `ok`.\nIf specified, and the value is anything different than `ok`, the client MUST assume that the server is suggesting not to follow the link during aggregation by default (also if the value is not among the known ones, in case a future specification adds new accepted values).\n\nSpecific values indicate the reason why the server is providing the suggestion.\nA client MAY follow the link anyway if it has reason to do so (e.g., if the client is looking for all test databases, it MAY follow the links marked with `aggregate`=`test`).\n\nIf specified, it MUST be one of the values listed in section Link Aggregate Options.", "default": "ok" }, "no_aggregate_reason": { - "title": "No Aggregate Reason", "type": "string", + "title": "No Aggregate Reason", "description": "An OPTIONAL human-readable string indicating the reason for suggesting not to aggregate results following the link.\nIt SHOULD NOT be present if `aggregate`=`ok`." } }, + "type": "object", + "required": [ + "name", + "description", + "base_url", + "homepage", + "link_type" + ], + "title": "LinksResourceAttributes", "description": "Links endpoint resource object attributes" }, "LinksResponse": { - "title": "LinksResponse", - "required": [ - "data", - "meta" - ], - "type": "object", "properties": { "data": { - "title": "Data", - "uniqueItems": true, "anyOf": [ { - "type": "array", "items": { "$ref": "#/components/schemas/LinksResource" - } + }, + "type": "array" }, { - "type": "array", "items": { "type": "object" - } + }, + "type": "array" } ], - "description": "List of unique OPTIMADE links resource objects" + "uniqueItems": true, + "title": "Data", + "description": "List of unique OPTIMADE links resource objects." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/ResponseMeta" } ], + "title": "Meta", "description": "A meta object containing non-standard information" }, "errors": { - "title": "Errors", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Error" }, + "type": "array", + "uniqueItems": true, + "title": "Errors", "description": "A list of unique errors" }, "included": { - "title": "Included", - "uniqueItems": true, "anyOf": [ { - "type": "array", "items": { "$ref": "#/components/schemas/EntryResource" - } + }, + "type": "array" }, { - "type": "array", "items": { "type": "object" - } + }, + "type": "array" } - ] + ], + "uniqueItems": true, + "title": "Included" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ToplevelLinks" } ], + "title": "Links", "description": "Links associated with the primary data or errors" }, "jsonapi": { - "title": "Jsonapi", "allOf": [ { "$ref": "#/components/schemas/JsonApi" } ], + "title": "Jsonapi", "description": "Information about the JSON API used" } }, + "type": "object", + "required": [ + "data", + "meta" + ], + "title": "LinksResponse", "description": "errors are not allowed" }, "Meta": { - "title": "Meta", - "type": "object", "properties": {}, + "type": "object", + "title": "Meta", "description": "Non-standard meta-information that can not be represented as an attribute or relationship." }, "OptimadeError": { - "title": "OptimadeError", - "required": [ - "detail" - ], - "type": "object", "properties": { "id": { - "title": "Id", "type": "string", + "title": "Id", "description": "A unique identifier for this particular occurrence of the problem." }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ErrorLinks" } ], + "title": "Links", "description": "A links object storing about" }, "status": { - "title": "Status", "type": "string", + "title": "Status", "description": "the HTTP status code applicable to this problem, expressed as a string value." }, "code": { - "title": "Code", "type": "string", + "title": "Code", "description": "an application-specific error code, expressed as a string value." }, "title": { - "title": "Title", "type": "string", + "title": "Title", "description": "A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization." }, "detail": { - "title": "Detail", "type": "string", + "title": "Detail", "description": "A human-readable explanation specific to this occurrence of the problem." }, "source": { - "title": "Source", "allOf": [ { "$ref": "#/components/schemas/ErrorSource" } ], + "title": "Source", "description": "An object containing references to the source of the error" }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about the error." } }, + "type": "object", + "required": [ + "detail" + ], + "title": "OptimadeError", "description": "detail MUST be present" }, "Provider": { - "title": "Provider", - "required": [ - "name", - "description", - "prefix" - ], - "type": "object", "properties": { "name": { - "title": "Name", "type": "string", + "title": "Name", "description": "a short name for the database provider" }, "description": { - "title": "Description", "type": "string", + "title": "Description", "description": "a longer description of the database provider" }, "prefix": { - "title": "Prefix", - "pattern": "^[a-z]([a-z]|[0-9]|_)*$", "type": "string", + "pattern": "^[a-z]([a-z]|[0-9]|_)*$", + "title": "Prefix", "description": "database-provider-specific prefix as found in section Database-Provider-Specific Namespace Prefixes." }, "homepage": { - "title": "Homepage", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Homepage", "description": "a [JSON API links object](http://jsonapi.org/format/1.0#document-links) pointing to homepage of the database provider, either directly as a string, or as a link object." } }, + "type": "object", + "required": [ + "name", + "description", + "prefix" + ], + "title": "Provider", "description": "Information on the database provider of the implementation." }, "ReferenceRelationship": { - "title": "ReferenceRelationship", - "type": "object", "properties": { "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/RelationshipLinks" } ], + "title": "Links", "description": "a links object containing at least one of the following: self, related" }, "data": { - "title": "Data", - "uniqueItems": true, "anyOf": [ { "$ref": "#/components/schemas/BaseRelationshipResource" }, { - "type": "array", "items": { "$ref": "#/components/schemas/BaseRelationshipResource" - } + }, + "type": "array" } ], + "uniqueItems": true, + "title": "Data", "description": "Resource linkage" }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object that contains non-standard meta-information about the relationship." } }, - "description": "Similar to normal JSON API relationship, but with addition of OPTIONAL meta field for a resource" + "type": "object", + "title": "ReferenceRelationship", + "description": "Similar to normal JSON API relationship, but with addition of OPTIONAL meta field for a resource." }, "RelatedLinksResource": { - "title": "RelatedLinksResource", - "required": [ - "id", - "type" - ], - "type": "object", "properties": { "id": { - "title": "Id", "type": "string", + "title": "Id", "description": "Resource ID" }, "type": { - "title": "Type", + "type": "string", "pattern": "^links$", - "type": "string" + "title": "Type", + "default": "links" } }, + "type": "object", + "required": [ + "id", + "type" + ], + "title": "RelatedLinksResource", "description": "A related Links resource object" }, "RelationshipLinks": { - "title": "RelationshipLinks", - "type": "object", "properties": { "self": { - "title": "Self", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Self", "description": "A link for the relationship itself (a 'relationship link').\nThis link allows the client to directly manipulate the relationship.\nWhen fetched successfully, this link returns the [linkage](https://jsonapi.org/format/1.0/#document-resource-object-linkage) for the related resources as its primary data.\n(See [Fetching Relationships](https://jsonapi.org/format/1.0/#fetching-relationships).)" }, "related": { - "title": "Related", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Related", "description": "A [related resource link](https://jsonapi.org/format/1.0/#document-resource-object-related-resource-links)." } }, + "type": "object", + "title": "RelationshipLinks", "description": "A resource object **MAY** contain references to other resource objects (\"relationships\").\nRelationships may be to-one or to-many.\nRelationships can be specified by including a member in a resource's links object." }, "Relationships": { - "title": "Relationships", - "type": "object", "properties": {}, + "type": "object", + "title": "Relationships", "description": "Members of the relationships object (\"relationships\") represent references from the resource object in which it's defined to other resource objects.\nKeys MUST NOT be:\n type\n id" }, "Resource": { - "title": "Resource", - "required": [ - "id", - "type" - ], - "type": "object", "properties": { "id": { - "title": "Id", "type": "string", + "title": "Id", "description": "Resource ID" }, "type": { - "title": "Type", "type": "string", + "title": "Type", "description": "Resource type" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ResourceLinks" } ], + "title": "Links", "description": "a links object containing links related to the resource." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship." }, "attributes": { - "title": "Attributes", "allOf": [ { "$ref": "#/components/schemas/Attributes" } ], + "title": "Attributes", "description": "an attributes object representing some of the resource\u2019s data." }, "relationships": { - "title": "Relationships", "allOf": [ { "$ref": "#/components/schemas/Relationships" } ], + "title": "Relationships", "description": "[Relationships object](https://jsonapi.org/format/1.0/#document-resource-object-relationships)\ndescribing relationships between the resource and other JSON API resources." } }, + "type": "object", + "required": [ + "id", + "type" + ], + "title": "Resource", "description": "Resource objects appear in a JSON API document to represent resources." }, "ResourceLinks": { - "title": "ResourceLinks", - "type": "object", "properties": { "self": { - "title": "Self", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Self", "description": "A link that identifies the resource represented by the resource object." } }, + "type": "object", + "title": "ResourceLinks", "description": "A Resource Links object" }, "ResponseMeta": { - "title": "ResponseMeta", - "required": [ - "query", - "api_version", - "more_data_available" - ], - "type": "object", "properties": { "query": { - "title": "Query", "allOf": [ { "$ref": "#/components/schemas/ResponseMetaQuery" } ], + "title": "Query", "description": "Information on the Query that was requested" }, "api_version": { - "title": "Api Version", - "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", "type": "string", - "description": "Presently used full version of the OPTIMADE API.\nThe version number string MUST NOT be prefixed by, e.g., \"v\".\nExamples: `1.0.0`, `1.0.0-rc.2`." + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", + "title": "Api Version", + "description": "Presently used full version of the OPTIMADE API.\nThe version number string MUST NOT be prefixed by, e.g., \"v\".\nExamples: `1.0.0`, `1.0.0-rc.2`.", + "example": [ + "0.10.1", + "1.0.0-rc.2", + "1.2.3-rc.5+develop" + ] }, "more_data_available": { - "title": "More Data Available", "type": "boolean", + "title": "More Data Available", "description": "`false` if the response contains all data for the request (e.g., a request issued to a single entry endpoint, or a `filter` query at the last page of a paginated response) and `true` if the response is incomplete in the sense that multiple objects match the request, and not all of them have been included in the response (e.g., a query with multiple pages that is not at the last page)." }, "schema": { - "title": "Schema", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Schema", "description": "A [JSON API links object](http://jsonapi.org/format/1.0/#document-links) that points to a schema for the response.\nIf it is a string, or a dictionary containing no `meta` field, the provided URL MUST point at an [OpenAPI](https://swagger.io/specification/) schema.\nIt is possible that future versions of this specification allows for alternative schema types.\nHence, if the `meta` field of the JSON API links object is provided and contains a field `schema_type` that is not equal to the string `OpenAPI` the client MUST not handle failures to parse the schema or to validate the response against the schema as errors." }, "time_stamp": { - "title": "Time Stamp", "type": "string", - "description": "A timestamp containing the date and time at which the query was executed.", - "format": "date-time" + "format": "date-time", + "title": "Time Stamp", + "description": "A timestamp containing the date and time at which the query was executed." }, "data_returned": { - "title": "Data Returned", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Data Returned", "description": "An integer containing the total number of data resource objects returned for the current `filter` query, independent of pagination." }, "provider": { - "title": "Provider", "allOf": [ { "$ref": "#/components/schemas/Provider" } ], + "title": "Provider", "description": "information on the database provider of the implementation." }, "data_available": { - "title": "Data Available", "type": "integer", + "title": "Data Available", "description": "An integer containing the total number of data resource objects available in the database for the endpoint." }, "last_id": { - "title": "Last Id", "type": "string", + "title": "Last Id", "description": "a string containing the last ID returned" }, "response_message": { - "title": "Response Message", "type": "string", + "title": "Response Message", "description": "response string from the server" }, + "request_delay": { + "type": "number", + "minimum": 0.0, + "title": "Request Delay", + "description": "A non-negative float giving time in seconds that the client is suggested to wait before issuing a subsequent request." + }, "implementation": { - "title": "Implementation", "allOf": [ { "$ref": "#/components/schemas/Implementation" } ], + "title": "Implementation", "description": "a dictionary describing the server implementation" }, "warnings": { - "title": "Warnings", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Warnings" }, + "type": "array", + "uniqueItems": true, + "title": "Warnings", "description": "A list of warning resource objects representing non-critical errors or warnings.\nA warning resource object is defined similarly to a [JSON API error object](http://jsonapi.org/format/1.0/#error-objects), but MUST also include the field `type`, which MUST have the value `\"warning\"`.\nThe field `detail` MUST be present and SHOULD contain a non-critical message, e.g., reporting unrecognized search attributes or deprecated features.\nThe field `status`, representing a HTTP response status code, MUST NOT be present for a warning resource object.\nThis is an exclusive field for error resource objects." } }, + "type": "object", + "required": [ + "query", + "api_version", + "more_data_available" + ], + "title": "ResponseMeta", "description": "A [JSON API meta member](https://jsonapi.org/format/1.0#document-meta)\nthat contains JSON API meta objects of non-standard\nmeta-information.\n\nOPTIONAL additional information global to the query that is not\nspecified in this document, MUST start with a\ndatabase-provider-specific prefix." }, "ResponseMetaQuery": { - "title": "ResponseMetaQuery", - "required": [ - "representation" - ], - "type": "object", "properties": { "representation": { - "title": "Representation", "type": "string", + "title": "Representation", "description": "A string with the part of the URL following the versioned or unversioned base URL that serves the API.\nQuery parameters that have not been used in processing the request MAY be omitted.\nIn particular, if no query parameters have been involved in processing the request, the query part of the URL MAY be excluded.\nExample: `/structures?filter=nelements=2`" } }, + "type": "object", + "required": [ + "representation" + ], + "title": "ResponseMetaQuery", "description": "Information on the query that was requested." }, "StructureRelationship": { - "title": "StructureRelationship", - "type": "object", "properties": { "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/RelationshipLinks" } ], + "title": "Links", "description": "a links object containing at least one of the following: self, related" }, "data": { - "title": "Data", - "uniqueItems": true, "anyOf": [ { "$ref": "#/components/schemas/BaseRelationshipResource" }, { - "type": "array", "items": { "$ref": "#/components/schemas/BaseRelationshipResource" - } + }, + "type": "array" } ], + "uniqueItems": true, + "title": "Data", "description": "Resource linkage" }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object that contains non-standard meta-information about the relationship." } }, - "description": "Similar to normal JSON API relationship, but with addition of OPTIONAL meta field for a resource" + "type": "object", + "title": "StructureRelationship", + "description": "Similar to normal JSON API relationship, but with addition of OPTIONAL meta field for a resource." }, "ToplevelLinks": { - "title": "ToplevelLinks", - "type": "object", "properties": { "self": { - "title": "Self", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Self", "description": "A link to itself" }, "related": { - "title": "Related", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Related", "description": "A related resource link" }, "first": { - "title": "First", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "First", "description": "The first page of data" }, "last": { - "title": "Last", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Last", "description": "The last page of data" }, "prev": { - "title": "Prev", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Prev", "description": "The previous page of data" }, "next": { - "title": "Next", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Next", "description": "The next page of data" } }, + "type": "object", + "title": "ToplevelLinks", "description": "A set of Links objects, possibly including pagination" }, "Warnings": { - "title": "Warnings", - "required": [ - "detail", - "type" - ], - "type": "object", "properties": { "id": { - "title": "Id", "type": "string", + "title": "Id", "description": "A unique identifier for this particular occurrence of the problem." }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ErrorLinks" } ], + "title": "Links", "description": "A links object storing about" }, "code": { - "title": "Code", "type": "string", + "title": "Code", "description": "an application-specific error code, expressed as a string value." }, "title": { - "title": "Title", "type": "string", + "title": "Title", "description": "A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization." }, "detail": { - "title": "Detail", "type": "string", + "title": "Detail", "description": "A human-readable explanation specific to this occurrence of the problem." }, "source": { - "title": "Source", "allOf": [ { "$ref": "#/components/schemas/ErrorSource" } ], + "title": "Source", "description": "An object containing references to the source of the error" }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about the error." }, "type": { - "title": "Type", - "pattern": "^warning$", "type": "string", - "description": "Warnings must be of type \"warning\"" + "pattern": "^warning$", + "title": "Type", + "description": "Warnings must be of type \"warning\"", + "default": "warning" } }, + "type": "object", + "required": [ + "detail", + "type" + ], + "title": "Warnings", "description": "OPTIMADE-specific warning class based on OPTIMADE-specific JSON API Error.\n\nFrom the specification:\n\nA warning resource object is defined similarly to a JSON API error object, but MUST also include the field type, which MUST have the value \"warning\".\nThe field detail MUST be present and SHOULD contain a non-critical message, e.g., reporting unrecognized search attributes or deprecated features.\n\nNote: Must be named \"Warnings\", since \"Warning\" is a built-in Python class." } } diff --git a/schemas/openapi_schema.json b/schemas/openapi_schema.json index 5eda933b9..0b40a43fe 100644 --- a/schemas/openapi_schema.json +++ b/schemas/openapi_schema.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.2", + "openapi": "3.1.0", "info": { "title": "OPTIMADE API", - "description": "The [Open Databases Integration for Materials Design (OPTIMADE) consortium](https://www.optimade.org/) aims to make materials databases interoperational by developing a common REST API.\n\nThis specification is generated using [`optimade-python-tools`](https://github.com/Materials-Consortia/optimade-python-tools/tree/v0.16.0) v0.16.0.", - "version": "1.1.0~develop" + "description": "The [Open Databases Integration for Materials Design (OPTIMADE) consortium](https://www.optimade.org/) aims to make materials databases interoperational by developing a common REST API.\n\nThis specification is generated using [`optimade-python-tools`](https://github.com/Materials-Consortia/optimade-python-tools/tree/v0.25.3) v0.25.3.", + "version": "1.2.0~develop" }, "paths": { "/info": { @@ -17,7 +17,7 @@ "200": { "description": "Successful Response", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/InfoResponse" } @@ -27,7 +27,7 @@ "400": { "description": "Bad Request", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -37,7 +37,7 @@ "403": { "description": "Forbidden", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -47,7 +47,7 @@ "404": { "description": "Not Found", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -57,7 +57,7 @@ "422": { "description": "Unprocessable Entity", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -67,7 +67,7 @@ "500": { "description": "Internal Server Error", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -77,7 +77,7 @@ "501": { "description": "Not Implemented", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -87,7 +87,7 @@ "553": { "description": "Version Not Supported", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -108,8 +108,8 @@ { "required": true, "schema": { - "title": "Entry", - "type": "string" + "type": "string", + "title": "Entry" }, "name": "entry", "in": "path" @@ -119,7 +119,7 @@ "200": { "description": "Successful Response", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/EntryInfoResponse" } @@ -129,7 +129,7 @@ "400": { "description": "Bad Request", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -139,7 +139,7 @@ "403": { "description": "Forbidden", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -149,7 +149,7 @@ "404": { "description": "Not Found", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -159,7 +159,7 @@ "422": { "description": "Unprocessable Entity", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -169,7 +169,7 @@ "500": { "description": "Internal Server Error", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -179,7 +179,7 @@ "501": { "description": "Not Implemented", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -189,7 +189,7 @@ "553": { "description": "Version Not Supported", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -211,8 +211,8 @@ "description": "A filter string, in the format described in section API Filtering Format Specification of the specification.", "required": false, "schema": { - "title": "Filter", "type": "string", + "title": "Filter", "description": "A filter string, in the format described in section API Filtering Format Specification of the specification.", "default": "" }, @@ -223,8 +223,8 @@ "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", "required": false, "schema": { - "title": "Response Format", "type": "string", + "title": "Response Format", "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", "default": "json" }, @@ -235,10 +235,10 @@ "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "required": false, "schema": { - "title": "Email Address", "type": "string", - "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "format": "email", + "title": "Email Address", + "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "default": "" }, "name": "email_address", @@ -248,9 +248,9 @@ "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", "required": false, "schema": { - "title": "Response Fields", - "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", "type": "string", + "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", + "title": "Response Fields", "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", "default": "" }, @@ -261,9 +261,9 @@ "description": "If supporting sortable queries, an implementation MUST use the `sort` query parameter with format as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-sorting).\n\nAn implementation MAY support multiple sort fields for a single query.\nIf it does, it again MUST conform to the JSON API 1.0 specification.\n\nIf an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`.\nIf a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name.\nThe set of field names, with `sortable` equal to `true` are allowed to be used in the \"sort fields\" list according to its definition in the JSON API 1.0 specification.\nThe field `sortable` is in addition to each property description and other OPTIONAL fields.\nAn example is shown in the section Entry Listing Info Endpoints.", "required": false, "schema": { - "title": "Sort", - "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", "type": "string", + "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", + "title": "Sort", "description": "If supporting sortable queries, an implementation MUST use the `sort` query parameter with format as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-sorting).\n\nAn implementation MAY support multiple sort fields for a single query.\nIf it does, it again MUST conform to the JSON API 1.0 specification.\n\nIf an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`.\nIf a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name.\nThe set of field names, with `sortable` equal to `true` are allowed to be used in the \"sort fields\" list according to its definition in the JSON API 1.0 specification.\nThe field `sortable` is in addition to each property description and other OPTIONAL fields.\nAn example is shown in the section Entry Listing Info Endpoints.", "default": "" }, @@ -274,9 +274,9 @@ "description": "Sets a numerical limit on the number of entries returned.\nSee [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination).\nThe API implementation MUST return no more than the number specified.\nIt MAY return fewer.\nThe database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned).\nThe default limit value is up to the API implementation to decide.\nExample: `http://example.com/optimade/v1/structures?page_limit=100`", "required": false, "schema": { - "title": "Page Limit", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Page Limit", "description": "Sets a numerical limit on the number of entries returned.\nSee [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination).\nThe API implementation MUST return no more than the number specified.\nIt MAY return fewer.\nThe database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned).\nThe default limit value is up to the API implementation to decide.\nExample: `http://example.com/optimade/v1/structures?page_limit=100`", "default": 20 }, @@ -287,9 +287,9 @@ "description": "RECOMMENDED for use with _offset-based_ pagination: using `page_offset` and `page_limit` is RECOMMENDED.\nExample: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`.", "required": false, "schema": { - "title": "Page Offset", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Page Offset", "description": "RECOMMENDED for use with _offset-based_ pagination: using `page_offset` and `page_limit` is RECOMMENDED.\nExample: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`.", "default": 0 }, @@ -300,11 +300,9 @@ "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`.", "required": false, "schema": { - "title": "Page Number", - "minimum": 0.0, "type": "integer", - "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`.", - "default": 0 + "title": "Page Number", + "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`." }, "name": "page_number", "in": "query" @@ -313,9 +311,9 @@ "description": "RECOMMENDED for use with _cursor-based_ pagination: using `page_cursor` and `page_limit` is RECOMMENDED.", "required": false, "schema": { - "title": "Page Cursor", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Page Cursor", "description": "RECOMMENDED for use with _cursor-based_ pagination: using `page_cursor` and `page_limit` is RECOMMENDED.", "default": 0 }, @@ -326,11 +324,9 @@ "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`.", "required": false, "schema": { + "type": "string", "title": "Page Above", - "minimum": 0.0, - "type": "integer", - "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`.", - "default": 0 + "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`." }, "name": "page_above", "in": "query" @@ -339,11 +335,9 @@ "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.", "required": false, "schema": { + "type": "string", "title": "Page Below", - "minimum": 0.0, - "type": "integer", - "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.", - "default": 0 + "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED." }, "name": "page_below", "in": "query" @@ -352,8 +346,8 @@ "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", "required": false, "schema": { - "title": "Include", "type": "string", + "title": "Include", "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", "default": "references" }, @@ -364,9 +358,9 @@ "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", "required": false, "schema": { - "title": "Api Hint", - "pattern": "(v[0-9]+(\\.[0-9]+)?)?", "type": "string", + "pattern": "(v[0-9]+(\\.[0-9]+)?)?", + "title": "Api Hint", "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", "default": "" }, @@ -378,7 +372,7 @@ "200": { "description": "Successful Response", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/LinksResponse" } @@ -388,7 +382,7 @@ "400": { "description": "Bad Request", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -398,7 +392,7 @@ "403": { "description": "Forbidden", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -408,7 +402,7 @@ "404": { "description": "Not Found", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -418,7 +412,7 @@ "422": { "description": "Unprocessable Entity", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -428,7 +422,7 @@ "500": { "description": "Internal Server Error", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -438,7 +432,7 @@ "501": { "description": "Not Implemented", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -448,7 +442,7 @@ "553": { "description": "Version Not Supported", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -470,8 +464,8 @@ "description": "A filter string, in the format described in section API Filtering Format Specification of the specification.", "required": false, "schema": { - "title": "Filter", "type": "string", + "title": "Filter", "description": "A filter string, in the format described in section API Filtering Format Specification of the specification.", "default": "" }, @@ -482,8 +476,8 @@ "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", "required": false, "schema": { - "title": "Response Format", "type": "string", + "title": "Response Format", "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", "default": "json" }, @@ -494,10 +488,10 @@ "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "required": false, "schema": { - "title": "Email Address", "type": "string", - "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "format": "email", + "title": "Email Address", + "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "default": "" }, "name": "email_address", @@ -507,9 +501,9 @@ "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", "required": false, "schema": { - "title": "Response Fields", - "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", "type": "string", + "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", + "title": "Response Fields", "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", "default": "" }, @@ -520,9 +514,9 @@ "description": "If supporting sortable queries, an implementation MUST use the `sort` query parameter with format as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-sorting).\n\nAn implementation MAY support multiple sort fields for a single query.\nIf it does, it again MUST conform to the JSON API 1.0 specification.\n\nIf an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`.\nIf a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name.\nThe set of field names, with `sortable` equal to `true` are allowed to be used in the \"sort fields\" list according to its definition in the JSON API 1.0 specification.\nThe field `sortable` is in addition to each property description and other OPTIONAL fields.\nAn example is shown in the section Entry Listing Info Endpoints.", "required": false, "schema": { - "title": "Sort", - "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", "type": "string", + "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", + "title": "Sort", "description": "If supporting sortable queries, an implementation MUST use the `sort` query parameter with format as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-sorting).\n\nAn implementation MAY support multiple sort fields for a single query.\nIf it does, it again MUST conform to the JSON API 1.0 specification.\n\nIf an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`.\nIf a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name.\nThe set of field names, with `sortable` equal to `true` are allowed to be used in the \"sort fields\" list according to its definition in the JSON API 1.0 specification.\nThe field `sortable` is in addition to each property description and other OPTIONAL fields.\nAn example is shown in the section Entry Listing Info Endpoints.", "default": "" }, @@ -533,9 +527,9 @@ "description": "Sets a numerical limit on the number of entries returned.\nSee [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination).\nThe API implementation MUST return no more than the number specified.\nIt MAY return fewer.\nThe database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned).\nThe default limit value is up to the API implementation to decide.\nExample: `http://example.com/optimade/v1/structures?page_limit=100`", "required": false, "schema": { - "title": "Page Limit", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Page Limit", "description": "Sets a numerical limit on the number of entries returned.\nSee [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination).\nThe API implementation MUST return no more than the number specified.\nIt MAY return fewer.\nThe database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned).\nThe default limit value is up to the API implementation to decide.\nExample: `http://example.com/optimade/v1/structures?page_limit=100`", "default": 20 }, @@ -546,9 +540,9 @@ "description": "RECOMMENDED for use with _offset-based_ pagination: using `page_offset` and `page_limit` is RECOMMENDED.\nExample: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`.", "required": false, "schema": { - "title": "Page Offset", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Page Offset", "description": "RECOMMENDED for use with _offset-based_ pagination: using `page_offset` and `page_limit` is RECOMMENDED.\nExample: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`.", "default": 0 }, @@ -559,11 +553,9 @@ "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`.", "required": false, "schema": { - "title": "Page Number", - "minimum": 0.0, "type": "integer", - "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`.", - "default": 0 + "title": "Page Number", + "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`." }, "name": "page_number", "in": "query" @@ -572,9 +564,9 @@ "description": "RECOMMENDED for use with _cursor-based_ pagination: using `page_cursor` and `page_limit` is RECOMMENDED.", "required": false, "schema": { - "title": "Page Cursor", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Page Cursor", "description": "RECOMMENDED for use with _cursor-based_ pagination: using `page_cursor` and `page_limit` is RECOMMENDED.", "default": 0 }, @@ -585,11 +577,9 @@ "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`.", "required": false, "schema": { + "type": "string", "title": "Page Above", - "minimum": 0.0, - "type": "integer", - "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`.", - "default": 0 + "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`." }, "name": "page_above", "in": "query" @@ -598,11 +588,9 @@ "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.", "required": false, "schema": { + "type": "string", "title": "Page Below", - "minimum": 0.0, - "type": "integer", - "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.", - "default": 0 + "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED." }, "name": "page_below", "in": "query" @@ -611,8 +599,8 @@ "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", "required": false, "schema": { - "title": "Include", "type": "string", + "title": "Include", "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", "default": "references" }, @@ -623,9 +611,9 @@ "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", "required": false, "schema": { - "title": "Api Hint", - "pattern": "(v[0-9]+(\\.[0-9]+)?)?", "type": "string", + "pattern": "(v[0-9]+(\\.[0-9]+)?)?", + "title": "Api Hint", "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", "default": "" }, @@ -637,7 +625,7 @@ "200": { "description": "Successful Response", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ReferenceResponseMany" } @@ -647,7 +635,7 @@ "400": { "description": "Bad Request", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -657,7 +645,7 @@ "403": { "description": "Forbidden", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -667,7 +655,7 @@ "404": { "description": "Not Found", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -677,7 +665,7 @@ "422": { "description": "Unprocessable Entity", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -687,7 +675,7 @@ "500": { "description": "Internal Server Error", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -697,7 +685,7 @@ "501": { "description": "Not Implemented", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -707,7 +695,7 @@ "553": { "description": "Version Not Supported", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -728,8 +716,8 @@ { "required": true, "schema": { - "title": "Entry Id", - "type": "string" + "type": "string", + "title": "Entry Id" }, "name": "entry_id", "in": "path" @@ -738,8 +726,8 @@ "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", "required": false, "schema": { - "title": "Response Format", "type": "string", + "title": "Response Format", "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", "default": "json" }, @@ -750,10 +738,10 @@ "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "required": false, "schema": { - "title": "Email Address", "type": "string", - "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "format": "email", + "title": "Email Address", + "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "default": "" }, "name": "email_address", @@ -763,9 +751,9 @@ "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", "required": false, "schema": { - "title": "Response Fields", - "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", "type": "string", + "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", + "title": "Response Fields", "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", "default": "" }, @@ -776,8 +764,8 @@ "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", "required": false, "schema": { - "title": "Include", "type": "string", + "title": "Include", "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", "default": "references" }, @@ -788,9 +776,9 @@ "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", "required": false, "schema": { - "title": "Api Hint", - "pattern": "(v[0-9]+(\\.[0-9]+)?)?", "type": "string", + "pattern": "(v[0-9]+(\\.[0-9]+)?)?", + "title": "Api Hint", "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", "default": "" }, @@ -802,7 +790,7 @@ "200": { "description": "Successful Response", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ReferenceResponseOne" } @@ -812,7 +800,7 @@ "400": { "description": "Bad Request", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -822,7 +810,7 @@ "403": { "description": "Forbidden", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -832,7 +820,7 @@ "404": { "description": "Not Found", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -842,7 +830,7 @@ "422": { "description": "Unprocessable Entity", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -852,7 +840,7 @@ "500": { "description": "Internal Server Error", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -862,7 +850,7 @@ "501": { "description": "Not Implemented", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -872,7 +860,7 @@ "553": { "description": "Version Not Supported", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -894,8 +882,8 @@ "description": "A filter string, in the format described in section API Filtering Format Specification of the specification.", "required": false, "schema": { - "title": "Filter", "type": "string", + "title": "Filter", "description": "A filter string, in the format described in section API Filtering Format Specification of the specification.", "default": "" }, @@ -906,8 +894,8 @@ "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", "required": false, "schema": { - "title": "Response Format", "type": "string", + "title": "Response Format", "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", "default": "json" }, @@ -918,10 +906,10 @@ "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "required": false, "schema": { - "title": "Email Address", "type": "string", - "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "format": "email", + "title": "Email Address", + "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "default": "" }, "name": "email_address", @@ -931,9 +919,9 @@ "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", "required": false, "schema": { - "title": "Response Fields", - "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", "type": "string", + "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", + "title": "Response Fields", "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", "default": "" }, @@ -944,9 +932,9 @@ "description": "If supporting sortable queries, an implementation MUST use the `sort` query parameter with format as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-sorting).\n\nAn implementation MAY support multiple sort fields for a single query.\nIf it does, it again MUST conform to the JSON API 1.0 specification.\n\nIf an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`.\nIf a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name.\nThe set of field names, with `sortable` equal to `true` are allowed to be used in the \"sort fields\" list according to its definition in the JSON API 1.0 specification.\nThe field `sortable` is in addition to each property description and other OPTIONAL fields.\nAn example is shown in the section Entry Listing Info Endpoints.", "required": false, "schema": { - "title": "Sort", - "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", "type": "string", + "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", + "title": "Sort", "description": "If supporting sortable queries, an implementation MUST use the `sort` query parameter with format as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-sorting).\n\nAn implementation MAY support multiple sort fields for a single query.\nIf it does, it again MUST conform to the JSON API 1.0 specification.\n\nIf an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`.\nIf a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name.\nThe set of field names, with `sortable` equal to `true` are allowed to be used in the \"sort fields\" list according to its definition in the JSON API 1.0 specification.\nThe field `sortable` is in addition to each property description and other OPTIONAL fields.\nAn example is shown in the section Entry Listing Info Endpoints.", "default": "" }, @@ -957,9 +945,9 @@ "description": "Sets a numerical limit on the number of entries returned.\nSee [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination).\nThe API implementation MUST return no more than the number specified.\nIt MAY return fewer.\nThe database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned).\nThe default limit value is up to the API implementation to decide.\nExample: `http://example.com/optimade/v1/structures?page_limit=100`", "required": false, "schema": { - "title": "Page Limit", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Page Limit", "description": "Sets a numerical limit on the number of entries returned.\nSee [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination).\nThe API implementation MUST return no more than the number specified.\nIt MAY return fewer.\nThe database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned).\nThe default limit value is up to the API implementation to decide.\nExample: `http://example.com/optimade/v1/structures?page_limit=100`", "default": 20 }, @@ -970,9 +958,9 @@ "description": "RECOMMENDED for use with _offset-based_ pagination: using `page_offset` and `page_limit` is RECOMMENDED.\nExample: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`.", "required": false, "schema": { - "title": "Page Offset", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Page Offset", "description": "RECOMMENDED for use with _offset-based_ pagination: using `page_offset` and `page_limit` is RECOMMENDED.\nExample: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`.", "default": 0 }, @@ -983,11 +971,9 @@ "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`.", "required": false, "schema": { - "title": "Page Number", - "minimum": 0.0, "type": "integer", - "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`.", - "default": 0 + "title": "Page Number", + "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`." }, "name": "page_number", "in": "query" @@ -996,9 +982,9 @@ "description": "RECOMMENDED for use with _cursor-based_ pagination: using `page_cursor` and `page_limit` is RECOMMENDED.", "required": false, "schema": { - "title": "Page Cursor", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Page Cursor", "description": "RECOMMENDED for use with _cursor-based_ pagination: using `page_cursor` and `page_limit` is RECOMMENDED.", "default": 0 }, @@ -1009,11 +995,9 @@ "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`.", "required": false, "schema": { + "type": "string", "title": "Page Above", - "minimum": 0.0, - "type": "integer", - "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`.", - "default": 0 + "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`." }, "name": "page_above", "in": "query" @@ -1022,11 +1006,9 @@ "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.", "required": false, "schema": { + "type": "string", "title": "Page Below", - "minimum": 0.0, - "type": "integer", - "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.", - "default": 0 + "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED." }, "name": "page_below", "in": "query" @@ -1035,8 +1017,8 @@ "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", "required": false, "schema": { - "title": "Include", "type": "string", + "title": "Include", "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", "default": "references" }, @@ -1047,9 +1029,9 @@ "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", "required": false, "schema": { - "title": "Api Hint", - "pattern": "(v[0-9]+(\\.[0-9]+)?)?", "type": "string", + "pattern": "(v[0-9]+(\\.[0-9]+)?)?", + "title": "Api Hint", "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", "default": "" }, @@ -1061,7 +1043,7 @@ "200": { "description": "Successful Response", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/StructureResponseMany" } @@ -1071,7 +1053,7 @@ "400": { "description": "Bad Request", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1081,7 +1063,7 @@ "403": { "description": "Forbidden", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1091,7 +1073,7 @@ "404": { "description": "Not Found", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1101,7 +1083,7 @@ "422": { "description": "Unprocessable Entity", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1111,7 +1093,7 @@ "500": { "description": "Internal Server Error", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1121,7 +1103,7 @@ "501": { "description": "Not Implemented", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1131,7 +1113,7 @@ "553": { "description": "Version Not Supported", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1152,8 +1134,8 @@ { "required": true, "schema": { - "title": "Entry Id", - "type": "string" + "type": "string", + "title": "Entry Id" }, "name": "entry_id", "in": "path" @@ -1162,8 +1144,8 @@ "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", "required": false, "schema": { - "title": "Response Format", "type": "string", + "title": "Response Format", "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", "default": "json" }, @@ -1174,10 +1156,10 @@ "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "required": false, "schema": { - "title": "Email Address", "type": "string", - "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "format": "email", + "title": "Email Address", + "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", "default": "" }, "name": "email_address", @@ -1187,9 +1169,9 @@ "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", "required": false, "schema": { - "title": "Response Fields", - "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", "type": "string", + "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", + "title": "Response Fields", "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", "default": "" }, @@ -1200,8 +1182,8 @@ "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", "required": false, "schema": { - "title": "Include", "type": "string", + "title": "Include", "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", "default": "references" }, @@ -1212,9 +1194,9 @@ "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", "required": false, "schema": { - "title": "Api Hint", - "pattern": "(v[0-9]+(\\.[0-9]+)?)?", "type": "string", + "pattern": "(v[0-9]+(\\.[0-9]+)?)?", + "title": "Api Hint", "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", "default": "" }, @@ -1226,7 +1208,7 @@ "200": { "description": "Successful Response", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/StructureResponseOne" } @@ -1236,7 +1218,7 @@ "400": { "description": "Bad Request", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1246,7 +1228,7 @@ "403": { "description": "Forbidden", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1256,7 +1238,7 @@ "404": { "description": "Not Found", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1266,7 +1248,7 @@ "422": { "description": "Unprocessable Entity", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1276,7 +1258,7 @@ "500": { "description": "Internal Server Error", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1286,7 +1268,7 @@ "501": { "description": "Not Implemented", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1296,7 +1278,7 @@ "553": { "description": "Version Not Supported", "content": { - "application/json": { + "application/vnd.api+json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } @@ -1306,1618 +1288,2758 @@ } } }, - "/versions": { + "/files": { "get": { "tags": [ - "Versions" - ], - "summary": "Get Versions", - "description": "Respond with the text/csv representation for the served versions.", - "operationId": "get_versions_versions_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "text/csv; header=present": { - "schema": { - "type": "string" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Aggregate": { - "title": "Aggregate", - "enum": [ - "ok", - "test", - "staging", - "no" - ], - "description": "Enumeration of aggregate values" - }, - "Assembly": { - "title": "Assembly", - "required": [ - "sites_in_groups", - "group_probabilities" + "Files" ], - "type": "object", - "properties": { - "sites_in_groups": { - "title": "Sites In Groups", - "type": "array", - "items": { - "type": "array", - "items": { - "type": "integer" - } + "summary": "Get Files", + "operationId": "get_files_files_get", + "parameters": [ + { + "description": "A filter string, in the format described in section API Filtering Format Specification of the specification.", + "required": false, + "schema": { + "type": "string", + "title": "Filter", + "description": "A filter string, in the format described in section API Filtering Format Specification of the specification.", + "default": "" }, - "description": "Index of the sites (0-based) that belong to each group for each assembly.\n\n- **Examples**:\n - `[[1], [2]]`: two groups, one with the second site, one with the third.\n - `[[1,2], [3]]`: one group with the second and third site, one with the fourth." + "name": "filter", + "in": "query" }, - "group_probabilities": { - "title": "Group Probabilities", - "type": "array", - "items": { - "type": "number" + { + "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", + "required": false, + "schema": { + "type": "string", + "title": "Response Format", + "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", + "default": "json" }, - "description": "Statistical probability of each group. It MUST have the same length as `sites_in_groups`.\nIt SHOULD sum to one.\nSee below for examples of how to specify the probability of the occurrence of a vacancy.\nThe possible reasons for the values not to sum to one are the same as already specified above for the `concentration` of each `species`." - } - }, - "description": "A description of groups of sites that are statistically correlated.\n\n- **Examples** (for each entry of the assemblies list):\n - `{\"sites_in_groups\": [[0], [1]], \"group_probabilities: [0.3, 0.7]}`: the first site and the second site never occur at the same time in the unit cell.\n Statistically, 30 % of the times the first site is present, while 70 % of the times the second site is present.\n - `{\"sites_in_groups\": [[1,2], [3]], \"group_probabilities: [0.3, 0.7]}`: the second and third site are either present together or not present; they form the first group of atoms for this assembly.\n The second group is formed by the fourth site. Sites of the first group (the second and the third) are never present at the same time as the fourth site.\n 30 % of times sites 1 and 2 are present (and site 3 is absent); 70 % of times site 3 is present (and sites 1 and 2 are absent)." - }, - "Attributes": { - "title": "Attributes", - "type": "object", - "properties": {}, - "description": "Members of the attributes object (\"attributes\") represent information about the resource object in which it's defined.\nThe keys for Attributes MUST NOT be:\n relationships\n links\n id\n type" + "name": "response_format", + "in": "query" + }, + { + "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", + "required": false, + "schema": { + "type": "string", + "format": "email", + "title": "Email Address", + "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", + "default": "" + }, + "name": "email_address", + "in": "query" + }, + { + "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", + "required": false, + "schema": { + "type": "string", + "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", + "title": "Response Fields", + "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", + "default": "" + }, + "name": "response_fields", + "in": "query" + }, + { + "description": "If supporting sortable queries, an implementation MUST use the `sort` query parameter with format as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-sorting).\n\nAn implementation MAY support multiple sort fields for a single query.\nIf it does, it again MUST conform to the JSON API 1.0 specification.\n\nIf an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`.\nIf a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name.\nThe set of field names, with `sortable` equal to `true` are allowed to be used in the \"sort fields\" list according to its definition in the JSON API 1.0 specification.\nThe field `sortable` is in addition to each property description and other OPTIONAL fields.\nAn example is shown in the section Entry Listing Info Endpoints.", + "required": false, + "schema": { + "type": "string", + "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", + "title": "Sort", + "description": "If supporting sortable queries, an implementation MUST use the `sort` query parameter with format as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-sorting).\n\nAn implementation MAY support multiple sort fields for a single query.\nIf it does, it again MUST conform to the JSON API 1.0 specification.\n\nIf an implementation supports sorting for an entry listing endpoint, then the `/info/` endpoint MUST include, for each field name `` in its `data.properties.` response value that can be used for sorting, the key `sortable` with value `true`.\nIf a field name under an entry listing endpoint supporting sorting cannot be used for sorting, the server MUST either leave out the `sortable` key or set it equal to `false` for the specific field name.\nThe set of field names, with `sortable` equal to `true` are allowed to be used in the \"sort fields\" list according to its definition in the JSON API 1.0 specification.\nThe field `sortable` is in addition to each property description and other OPTIONAL fields.\nAn example is shown in the section Entry Listing Info Endpoints.", + "default": "" + }, + "name": "sort", + "in": "query" + }, + { + "description": "Sets a numerical limit on the number of entries returned.\nSee [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination).\nThe API implementation MUST return no more than the number specified.\nIt MAY return fewer.\nThe database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned).\nThe default limit value is up to the API implementation to decide.\nExample: `http://example.com/optimade/v1/structures?page_limit=100`", + "required": false, + "schema": { + "type": "integer", + "minimum": 0.0, + "title": "Page Limit", + "description": "Sets a numerical limit on the number of entries returned.\nSee [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-pagination).\nThe API implementation MUST return no more than the number specified.\nIt MAY return fewer.\nThe database MAY have a maximum limit and not accept larger numbers (in which case an error code -- 403 Forbidden -- MUST be returned).\nThe default limit value is up to the API implementation to decide.\nExample: `http://example.com/optimade/v1/structures?page_limit=100`", + "default": 20 + }, + "name": "page_limit", + "in": "query" + }, + { + "description": "RECOMMENDED for use with _offset-based_ pagination: using `page_offset` and `page_limit` is RECOMMENDED.\nExample: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0.0, + "title": "Page Offset", + "description": "RECOMMENDED for use with _offset-based_ pagination: using `page_offset` and `page_limit` is RECOMMENDED.\nExample: Skip 50 structures and fetch up to 100: `/structures?page_offset=50&page_limit=100`.", + "default": 0 + }, + "name": "page_offset", + "in": "query" + }, + { + "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`.", + "required": false, + "schema": { + "type": "integer", + "title": "Page Number", + "description": "RECOMMENDED for use with _page-based_ pagination: using `page_number` and `page_limit` is RECOMMENDED.\nIt is RECOMMENDED that the first page has number 1, i.e., that `page_number` is 1-based.\nExample: Fetch page 2 of up to 50 structures per page: `/structures?page_number=2&page_limit=50`." + }, + "name": "page_number", + "in": "query" + }, + { + "description": "RECOMMENDED for use with _cursor-based_ pagination: using `page_cursor` and `page_limit` is RECOMMENDED.", + "required": false, + "schema": { + "type": "integer", + "minimum": 0.0, + "title": "Page Cursor", + "description": "RECOMMENDED for use with _cursor-based_ pagination: using `page_cursor` and `page_limit` is RECOMMENDED.", + "default": 0 + }, + "name": "page_cursor", + "in": "query" + }, + { + "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`.", + "required": false, + "schema": { + "type": "string", + "title": "Page Above", + "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.\nExample: Fetch up to 100 structures above sort-field value 4000 (in this example, server chooses to fetch results sorted by increasing `id`, so `page_above` value refers to an `id` value): `/structures?page_above=4000&page_limit=100`." + }, + "name": "page_above", + "in": "query" + }, + { + "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED.", + "required": false, + "schema": { + "type": "string", + "title": "Page Below", + "description": "RECOMMENDED for use with _value-based_ pagination: using `page_above`/`page_below` and `page_limit` is RECOMMENDED." + }, + "name": "page_below", + "in": "query" + }, + { + "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", + "required": false, + "schema": { + "type": "string", + "title": "Include", + "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", + "default": "references" + }, + "name": "include", + "in": "query" + }, + { + "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", + "required": false, + "schema": { + "type": "string", + "pattern": "(v[0-9]+(\\.[0-9]+)?)?", + "title": "Api Hint", + "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", + "default": "" + }, + "name": "api_hint", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/FileResponseMany" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "501": { + "description": "Not Implemented", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "553": { + "description": "Version Not Supported", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/files/{entry_id}": { + "get": { + "tags": [ + "Files" + ], + "summary": "Get Single File", + "operationId": "get_single_file_files__entry_id__get", + "parameters": [ + { + "required": true, + "schema": { + "type": "string", + "title": "Entry Id" + }, + "name": "entry_id", + "in": "path" + }, + { + "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", + "required": false, + "schema": { + "type": "string", + "title": "Response Format", + "description": "The output format requested (see section Response Format).\nDefaults to the format string 'json', which specifies the standard output format described in this specification.\nExample: `http://example.com/v1/structures?response_format=xml`", + "default": "json" + }, + "name": "response_format", + "in": "query" + }, + { + "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", + "required": false, + "schema": { + "type": "string", + "format": "email", + "title": "Email Address", + "description": "An email address of the user making the request.\nThe email SHOULD be that of a person and not an automatic system.\nExample: `http://example.com/v1/structures?email_address=user@example.com`", + "default": "" + }, + "name": "email_address", + "in": "query" + }, + { + "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", + "required": false, + "schema": { + "type": "string", + "pattern": "([a-z_][a-z_0-9]*(,[a-z_][a-z_0-9]*)*)?", + "title": "Response Fields", + "description": "A comma-delimited set of fields to be provided in the output.\nIf provided, these fields MUST be returned along with the REQUIRED fields.\nOther OPTIONAL fields MUST NOT be returned when this parameter is present.\nExample: `http://example.com/v1/structures?response_fields=last_modified,nsites`", + "default": "" + }, + "name": "response_fields", + "in": "query" + }, + { + "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", + "required": false, + "schema": { + "type": "string", + "title": "Include", + "description": "A server MAY implement the JSON API concept of returning [compound documents](https://jsonapi.org/format/1.0/#document-compound-documents) by utilizing the `include` query parameter as specified by [JSON API 1.0](https://jsonapi.org/format/1.0/#fetching-includes).\n\nAll related resource objects MUST be returned as part of an array value for the top-level `included` field, see the section JSON Response Schema: Common Fields.\n\nThe value of `include` MUST be a comma-separated list of \"relationship paths\", as defined in the [JSON API](https://jsonapi.org/format/1.0/#fetching-includes).\nIf relationship paths are not supported, or a server is unable to identify a relationship path a `400 Bad Request` response MUST be made.\n\nThe **default value** for `include` is `references`.\nThis means `references` entries MUST always be included under the top-level field `included` as default, since a server assumes if `include` is not specified by a client in the request, it is still specified as `include=references`.\nNote, if a client explicitly specifies `include` and leaves out `references`, `references` resource objects MUST NOT be included under the top-level field `included`, as per the definition of `included`, see section JSON Response Schema: Common Fields.\n\n> **Note**: A query with the parameter `include` set to the empty string means no related resource objects are to be returned under the top-level field `included`.", + "default": "references" + }, + "name": "include", + "in": "query" + }, + { + "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", + "required": false, + "schema": { + "type": "string", + "pattern": "(v[0-9]+(\\.[0-9]+)?)?", + "title": "Api Hint", + "description": "If the client provides the parameter, the value SHOULD have the format `vMAJOR` or `vMAJOR.MINOR`, where MAJOR is a major version and MINOR is a minor version of the API. For example, if a client appends `api_hint=v1.0` to the query string, the hint provided is for major version 1 and minor version 0.", + "default": "" + }, + "name": "api_hint", + "in": "query" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/FileResponseOne" + } + } + } + }, + "400": { + "description": "Bad Request", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "404": { + "description": "Not Found", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "422": { + "description": "Unprocessable Entity", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "Internal Server Error", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "501": { + "description": "Not Implemented", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "553": { + "description": "Version Not Supported", + "content": { + "application/vnd.api+json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + } + } + }, + "/versions": { + "get": { + "tags": [ + "Versions" + ], + "summary": "Get Versions", + "description": "Respond with the text/csv representation for the served versions.", + "operationId": "get_versions_versions_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "text/csv; header=present": { + "schema": { + "type": "string" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Aggregate": { + "enum": [ + "ok", + "test", + "staging", + "no" + ], + "title": "Aggregate", + "description": "Enumeration of aggregate values" }, - "AvailableApiVersion": { - "title": "AvailableApiVersion", + "AllowedJSONSchemaDataType": { + "enum": [ + "boolean", + "object", + "array", + "number", + "string", + "integer" + ], + "title": "AllowedJSONSchemaDataType", + "description": "The allowed values for `type` in the Property Definition restricted JSON Schema syntax." + }, + "Assembly": { + "properties": { + "sites_in_groups": { + "items": { + "items": { + "type": "integer" + }, + "type": "array" + }, + "type": "array", + "title": "Sites In Groups", + "description": "Index of the sites (0-based) that belong to each group for each assembly.\n\n- **Examples**:\n - `[[1], [2]]`: two groups, one with the second site, one with the third.\n - `[[1,2], [3]]`: one group with the second and third site, one with the fourth.", + "x-optimade-support": "must", + "x-optimade-queryable": "optional" + }, + "group_probabilities": { + "items": { + "type": "number" + }, + "type": "array", + "title": "Group Probabilities", + "description": "Statistical probability of each group. It MUST have the same length as `sites_in_groups`.\nIt SHOULD sum to one.\nSee below for examples of how to specify the probability of the occurrence of a vacancy.\nThe possible reasons for the values not to sum to one are the same as already specified above for the `concentration` of each `species`.", + "x-optimade-support": "must", + "x-optimade-queryable": "optional" + } + }, + "type": "object", "required": [ - "url", - "version" + "sites_in_groups", + "group_probabilities" ], + "title": "Assembly", + "description": "A description of groups of sites that are statistically correlated.\n\n- **Examples** (for each entry of the assemblies list):\n - `{\"sites_in_groups\": [[0], [1]], \"group_probabilities: [0.3, 0.7]}`: the first site and the second site never occur at the same time in the unit cell.\n Statistically, 30 % of the times the first site is present, while 70 % of the times the second site is present.\n - `{\"sites_in_groups\": [[1,2], [3]], \"group_probabilities: [0.3, 0.7]}`: the second and third site are either present together or not present; they form the first group of atoms for this assembly.\n The second group is formed by the fourth site. Sites of the first group (the second and the third) are never present at the same time as the fourth site.\n 30 % of times sites 1 and 2 are present (and site 3 is absent); 70 % of times site 3 is present (and sites 1 and 2 are absent)." + }, + "Attributes": { + "properties": {}, "type": "object", + "title": "Attributes", + "description": "Members of the attributes object (\"attributes\") represent information about the resource object in which it's defined.\nThe keys for Attributes MUST NOT be:\n relationships\n links\n id\n type" + }, + "AvailableApiVersion": { "properties": { "url": { - "title": "Url", + "type": "string", "maxLength": 65536, "minLength": 1, "pattern": ".+/v[0-1](\\.[0-9]+)*/?$", - "type": "string", - "description": "A string specifying a versioned base URL that MUST adhere to the rules in section Base URL", - "format": "uri" + "format": "uri", + "title": "Url", + "description": "A string specifying a versioned base URL that MUST adhere to the rules in section Base URL" }, "version": { + "type": "string", + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", "title": "Version", + "description": "A string containing the full version number of the API served at that versioned base URL.\nThe version number string MUST NOT be prefixed by, e.g., 'v'.\nExamples: `1.0.0`, `1.0.0-rc.2`.", + "example": [ + "0.10.1", + "1.0.0-rc.2", + "1.2.3-rc.5+develop" + ] + } + }, + "type": "object", + "required": [ + "url", + "version" + ], + "title": "AvailableApiVersion", + "description": "A JSON object containing information about an available API version" + }, + "BaseInfoAttributes": { + "properties": { + "api_version": { + "type": "string", "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", + "title": "Api Version", + "description": "Presently used full version of the OPTIMADE API.\nThe version number string MUST NOT be prefixed by, e.g., \"v\".\nExamples: `1.0.0`, `1.0.0-rc.2`.", + "example": [ + "0.10.1", + "1.0.0-rc.2", + "1.2.3-rc.5+develop" + ] + }, + "available_api_versions": { + "items": { + "$ref": "#/components/schemas/AvailableApiVersion" + }, + "type": "array", + "title": "Available Api Versions", + "description": "A list of dictionaries of available API versions at other base URLs" + }, + "formats": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Formats", + "description": "List of available output formats.", + "default": [ + "json" + ] + }, + "available_endpoints": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Available Endpoints", + "description": "List of available endpoints (i.e., the string to be appended to the versioned base URL)." + }, + "entry_types_by_format": { + "additionalProperties": { + "items": { + "type": "string" + }, + "type": "array" + }, + "type": "object", + "title": "Entry Types By Format", + "description": "Available entry endpoints as a function of output formats." + }, + "license": { + "anyOf": [ + { + "$ref": "#/components/schemas/Link" + }, + { + "type": "string", + "maxLength": 65536, + "minLength": 1, + "format": "uri" + } + ], + "title": "License", + "description": "A [JSON API links object](http://jsonapi.org/format/1.0/#document-links) giving a URL to a web page containing a human-readable text describing the license (or licensing options if there are multiple) covering all the data and metadata provided by this database.\nClients are advised not to try automated parsing of this link or its content, but rather rely on the field `available_licenses` instead." + }, + "available_licenses": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Available Licenses", + "description": "List of [SPDX license identifiers](https://spdx.org/licenses/) specifying a set of alternative licenses under which the client is granted access to all the data and metadata in this database.\n\nIf the data and metadata is available under multiple alternative licenses, identifiers of these multiple licenses SHOULD be provided to let clients know under which conditions the data and metadata can be used.\nInclusion of a license identifier in the list is a commitment of the database that the rights are in place to grant clients access to all the data and metadata according to the terms of either of these licenses (at the choice of the client).\nIf the licensing information provided via the field `license` omits licensing options specified in `available_licenses`, or if it otherwise contradicts them, a client MUST still be allowed to interpret the inclusion of a license in `available_licenses` as a full commitment from the database that the data and metadata is available, without exceptions, under the respective licenses.\nIf the database cannot make that commitment, e.g., if only part of the data is available under a license, the corresponding license identifier MUST NOT appear in `available_licenses` (but, rather, the field `license` is to be used to clarify the licensing situation.)\nAn empty list indicates that none of the SPDX licenses apply for the entirety of the database and that the licensing situation is clarified in human readable form in the field `license`." + }, + "is_index": { + "type": "boolean", + "title": "Is Index", + "description": "If true, this is an index meta-database base URL (see section Index Meta-Database). If this member is not provided, the client MUST assume this is not an index meta-database base URL (i.e., the default is for `is_index` to be `false`).", + "default": false + } + }, + "type": "object", + "required": [ + "api_version", + "available_api_versions", + "available_endpoints", + "entry_types_by_format", + "license", + "available_licenses" + ], + "title": "BaseInfoAttributes", + "description": "Attributes for Base URL Info endpoint" + }, + "BaseInfoResource": { + "properties": { + "id": { + "type": "string", + "pattern": "^/$", + "title": "Id", + "default": "/" + }, + "type": { + "type": "string", + "pattern": "^info$", + "title": "Type", + "default": "info" + }, + "links": { + "allOf": [ + { + "$ref": "#/components/schemas/ResourceLinks" + } + ], + "title": "Links", + "description": "a links object containing links related to the resource." + }, + "meta": { + "allOf": [ + { + "$ref": "#/components/schemas/Meta" + } + ], + "title": "Meta", + "description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship." + }, + "attributes": { + "$ref": "#/components/schemas/BaseInfoAttributes" + }, + "relationships": { + "allOf": [ + { + "$ref": "#/components/schemas/Relationships" + } + ], + "title": "Relationships", + "description": "[Relationships object](https://jsonapi.org/format/1.0/#document-resource-object-relationships)\ndescribing relationships between the resource and other JSON API resources." + } + }, + "type": "object", + "required": [ + "id", + "type", + "attributes" + ], + "title": "BaseInfoResource", + "description": "Resource objects appear in a JSON API document to represent resources." + }, + "BaseRelationshipMeta": { + "properties": { + "description": { + "type": "string", + "title": "Description", + "description": "OPTIONAL human-readable description of the relationship." + } + }, + "type": "object", + "required": [ + "description" + ], + "title": "BaseRelationshipMeta", + "description": "Specific meta field for base relationship resource" + }, + "BaseRelationshipResource": { + "properties": { + "id": { + "type": "string", + "title": "Id", + "description": "Resource ID" + }, + "type": { "type": "string", - "description": "A string containing the full version number of the API served at that versioned base URL.\nThe version number string MUST NOT be prefixed by, e.g., 'v'.\nExamples: `1.0.0`, `1.0.0-rc.2`." + "title": "Type", + "description": "Resource type" + }, + "meta": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseRelationshipMeta" + } + ], + "title": "Meta", + "description": "Relationship meta field. MUST contain 'description' if supplied." } }, - "description": "A JSON object containing information about an available API version" - }, - "BaseInfoAttributes": { - "title": "BaseInfoAttributes", + "type": "object", "required": [ - "api_version", - "available_api_versions", - "available_endpoints", - "entry_types_by_format" + "id", + "type" ], - "type": "object", + "title": "BaseRelationshipResource", + "description": "Minimum requirements to represent a relationship resource" + }, + "EntryInfoProperty": { "properties": { - "api_version": { - "title": "Api Version", - "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", + "title": { "type": "string", - "description": "Presently used full version of the OPTIMADE API.\nThe version number string MUST NOT be prefixed by, e.g., \"v\".\nExamples: `1.0.0`, `1.0.0-rc.2`." + "title": "Title", + "description": "A short single-line human-readable explanation of the defined property appropriate to show as part of a user interface." }, - "available_api_versions": { - "title": "Available Api Versions", - "type": "array", - "items": { - "$ref": "#/components/schemas/AvailableApiVersion" - }, - "description": "A list of dictionaries of available API versions at other base URLs" + "description": { + "type": "string", + "title": "Description", + "description": "A human-readable multi-line description that explains the purpose, requirements, and conventions of the defined property.\n\nThe format SHOULD be a one-line description, followed by a new paragraph (two newlines), followed by a more detailed description of all the requirements and conventions of the defined property.\nFormatting in the text SHOULD use Markdown in the CommonMark v0.3 format." }, - "formats": { - "title": "Formats", + "x-optimade-property": { + "allOf": [ + { + "$ref": "#/components/schemas/OptimadePropertyDefinition" + } + ], + "title": "X-Optimade-Property", + "description": "Additional information to define the property that is not covered by fields in the JSON Schema standard." + }, + "x-optimade-unit": { + "type": "string", + "title": "X-Optimade-Unit", + "description": "A (compound) symbol for the physical unit in which the value of the defined property is given or one of the strings `dimensionless` or `inapplicable`." + }, + "x-optimade-implementation": { + "allOf": [ + { + "$ref": "#/components/schemas/PropertyImplementationInfo" + } + ], + "title": "X-Optimade-Implementation", + "description": "A dictionary describing the level of OPTIMADE API functionality provided by the present implementation.\nIf an implementation omits this field in its response, a client interacting with that implementation SHOULD NOT make any assumptions about the availability of these features." + }, + "x-optimade-requirements": { + "allOf": [ + { + "$ref": "#/components/schemas/PropertyRequirementsInfo" + } + ], + "title": "X-Optimade-Requirements", + "description": "A dictionary describing the level of OPTIMADE API functionality required by all implementations of this property.\nOmitting this field means the corresponding functionality is OPTIONAL." + }, + "type": { + "anyOf": [ + { + "$ref": "#/components/schemas/AllowedJSONSchemaDataType" + }, + { + "items": { + "$ref": "#/components/schemas/AllowedJSONSchemaDataType" + }, + "type": "array" + } + ], + "title": "Type", + "description": "A string or list that specifies the type of the defined property.\nIt MUST be one of:\n\n- One of the strings `\"boolean\"`, `\"object\"` (refers to an OPTIMADE dictionary), `\"array\"` (refers to an OPTIMADE list), `\"number\"` (refers to an OPTIMADE float), `\"string\"`, or `\"integer\"`.\n- A list where the first item MUST be one of the strings above, and the second item MUST be the string `\"null\"`." + }, + "deprecated": { + "type": "boolean", + "title": "Deprecated", + "description": " If `TRUE`, implementations SHOULD not use the defined property, and it MAY be removed in the future.\nIf `FALSE`, the defined property is not deprecated.\nThe field not being present means `FALSE`." + }, + "enum": { + "items": {}, "type": "array", - "items": { - "type": "string" - }, - "description": "List of available output formats.", - "default": [ - "json" - ] + "title": "Enum", + "description": "The defined property MUST take one of the values given in the provided list.\nThe items in the list MUST all be of a data type that matches the `type` field and otherwise adhere to the rest of the Property Description.\nIf this key is given, for `null` to be a valid value of the defined property, the list MUST contain a `null` value and the `type` MUST be a list where the second value is the string `\"null\"`." }, - "available_endpoints": { - "title": "Available Endpoints", + "examples": { + "items": {}, "type": "array", + "title": "Examples", + "description": "A list of example values that the defined property can have.\nThese examples MUST all be of a data type that matches the `type` field and otherwise adhere to the rest of the Property Description." + } + }, + "type": "object", + "required": [ + "title", + "description", + "x-optimade-property", + "x-optimade-implementation", + "x-optimade-requirements", + "deprecated", + "enum", + "examples" + ], + "title": "EntryInfoProperty" + }, + "EntryInfoResource": { + "properties": { + "formats": { "items": { "type": "string" }, - "description": "List of available endpoints (i.e., the string to be appended to the versioned base URL)." + "type": "array", + "title": "Formats", + "description": "List of output formats available for this type of entry." }, - "entry_types_by_format": { - "title": "Entry Types By Format", + "description": { + "type": "string", + "title": "Description", + "description": "Description of the entry." + }, + "properties": { + "additionalProperties": { + "$ref": "#/components/schemas/EntryInfoProperty" + }, "type": "object", + "title": "Properties", + "description": "A dictionary describing queryable properties for this entry type, where each key is a property name." + }, + "output_fields_by_format": { "additionalProperties": { - "type": "array", "items": { "type": "string" + }, + "type": "array" + }, + "type": "object", + "title": "Output Fields By Format", + "description": "Dictionary of available output fields for this entry type, where the keys are the values of the `formats` list and the values are the keys of the `properties` dictionary." + } + }, + "type": "object", + "required": [ + "formats", + "description", + "properties", + "output_fields_by_format" + ], + "title": "EntryInfoResource" + }, + "EntryInfoResponse": { + "properties": { + "data": { + "allOf": [ + { + "$ref": "#/components/schemas/EntryInfoResource" + } + ], + "title": "Data", + "description": "OPTIMADE information for an entry endpoint." + }, + "meta": { + "allOf": [ + { + "$ref": "#/components/schemas/ResponseMeta" } + ], + "title": "Meta", + "description": "A meta object containing non-standard information" + }, + "errors": { + "items": { + "$ref": "#/components/schemas/Error" }, - "description": "Available entry endpoints as a function of output formats." + "type": "array", + "uniqueItems": true, + "title": "Errors", + "description": "A list of unique errors" }, - "is_index": { - "title": "Is Index", - "type": "boolean", - "description": "If true, this is an index meta-database base URL (see section Index Meta-Database). If this member is not provided, the client MUST assume this is not an index meta-database base URL (i.e., the default is for `is_index` to be `false`).", - "default": false + "included": { + "items": { + "$ref": "#/components/schemas/Resource" + }, + "type": "array", + "uniqueItems": true, + "title": "Included", + "description": "A list of unique included resources" + }, + "links": { + "allOf": [ + { + "$ref": "#/components/schemas/ToplevelLinks" + } + ], + "title": "Links", + "description": "Links associated with the primary data or errors" + }, + "jsonapi": { + "allOf": [ + { + "$ref": "#/components/schemas/JsonApi" + } + ], + "title": "Jsonapi", + "description": "Information about the JSON API used" } }, - "description": "Attributes for Base URL Info endpoint" - }, - "BaseInfoResource": { - "title": "BaseInfoResource", + "type": "object", "required": [ - "id", - "type", - "attributes" + "data", + "meta" ], + "title": "EntryInfoResponse", + "description": "errors are not allowed" + }, + "EntryRelationships": { + "properties": { + "references": { + "allOf": [ + { + "$ref": "#/components/schemas/ReferenceRelationship" + } + ], + "title": "References", + "description": "Object containing links to relationships with entries of the `references` type." + }, + "structures": { + "allOf": [ + { + "$ref": "#/components/schemas/StructureRelationship" + } + ], + "title": "Structures", + "description": "Object containing links to relationships with entries of the `structures` type." + } + }, "type": "object", + "title": "EntryRelationships", + "description": "This model wraps the JSON API Relationships to include type-specific top level keys." + }, + "EntryResource": { "properties": { "id": { + "type": "string", "title": "Id", - "pattern": "^/$", - "type": "string" + "description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`", + "x-optimade-support": "must", + "x-optimade-queryable": "must" }, "type": { + "type": "string", "title": "Type", - "pattern": "^info$", - "type": "string" + "description": "The name of the type of an entry.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n - MUST be an existing entry type.\n - The entry of type `` and ID `` MUST be returned in response to a request for `//` under the versioned base URL.\n\n- **Example**: `\"structures\"`", + "x-optimade-support": "must", + "x-optimade-queryable": "must" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ResourceLinks" } ], + "title": "Links", "description": "a links object containing links related to the resource." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship." }, "attributes": { - "$ref": "#/components/schemas/BaseInfoAttributes" + "allOf": [ + { + "$ref": "#/components/schemas/EntryResourceAttributes" + } + ], + "title": "Attributes", + "description": "A dictionary, containing key-value pairs representing the entry's properties, except for `type` and `id`.\nDatabase-provider-specific properties need to include the database-provider-specific prefix (see section on Database-Provider-Specific Namespace Prefixes)." }, "relationships": { - "title": "Relationships", "allOf": [ { - "$ref": "#/components/schemas/Relationships" + "$ref": "#/components/schemas/EntryRelationships" } ], - "description": "[Relationships object](https://jsonapi.org/format/1.0/#document-resource-object-relationships)\ndescribing relationships between the resource and other JSON API resources." + "title": "Relationships", + "description": "A dictionary containing references to other entries according to the description in section Relationships encoded as [JSON API Relationships](https://jsonapi.org/format/1.0/#document-resource-object-relationships).\nThe OPTIONAL human-readable description of the relationship MAY be provided in the `description` field inside the `meta` dictionary of the JSON API resource identifier object." } }, - "description": "Resource objects appear in a JSON API document to represent resources." - }, - "BaseRelationshipMeta": { - "title": "BaseRelationshipMeta", + "type": "object", "required": [ - "description" + "id", + "type", + "attributes" ], - "type": "object", + "title": "EntryResource", + "description": "The base model for an entry resource." + }, + "EntryResourceAttributes": { "properties": { - "description": { - "title": "Description", + "immutable_id": { + "type": "string", + "title": "Immutable Id", + "description": "The entry's immutable ID (e.g., an UUID). This is important for databases having preferred IDs that point to \"the latest version\" of a record, but still offer access to older variants. This ID maps to the version-specific record, in case it changes in the future.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n\n- **Examples**:\n - `\"8bd3e750-b477-41a0-9b11-3a799f21b44f\"`\n - `\"fjeiwoj,54;@=%<>#32\"` (Strings that are not URL-safe are allowed.)", + "x-optimade-support": "optional", + "x-optimade-queryable": "must" + }, + "last_modified": { "type": "string", - "description": "OPTIONAL human-readable description of the relationship" + "format": "date-time", + "title": "Last Modified", + "description": "Date and time representing when the entry was last modified.\n\n- **Type**: timestamp.\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response unless the query parameter `response_fields` is present and does not include this property.\n\n- **Example**:\n - As part of JSON response format: `\"2007-04-05T14:30:20Z\"` (i.e., encoded as an [RFC 3339 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6) string.)", + "x-optimade-support": "should", + "x-optimade-queryable": "must" } }, - "description": "Specific meta field for base relationship resource" - }, - "BaseRelationshipResource": { - "title": "BaseRelationshipResource", + "type": "object", "required": [ - "id", - "type" + "last_modified" ], - "type": "object", + "title": "EntryResourceAttributes", + "description": "Contains key-value pairs representing the entry's properties." + }, + "Error": { "properties": { "id": { - "title": "Id", - "type": "string", - "description": "Resource ID" - }, - "type": { - "title": "Type", "type": "string", - "description": "Resource type" + "title": "Id", + "description": "A unique identifier for this particular occurrence of the problem." }, - "meta": { - "title": "Meta", + "links": { "allOf": [ { - "$ref": "#/components/schemas/BaseRelationshipMeta" + "$ref": "#/components/schemas/ErrorLinks" } ], - "description": "Relationship meta field. MUST contain 'description' if supplied." - } - }, - "description": "Minimum requirements to represent a relationship resource" - }, - "DataType": { - "title": "DataType", - "enum": [ - "string", - "integer", - "float", - "boolean", - "timestamp", - "list", - "dictionary", - "unknown" - ], - "description": "Optimade Data Types\n\nSee the section \"Data types\" in the OPTIMADE API specification for more information." - }, - "EntryInfoProperty": { - "title": "EntryInfoProperty", - "required": [ - "description" - ], - "type": "object", - "properties": { - "description": { - "title": "Description", + "title": "Links", + "description": "A links object storing about" + }, + "status": { "type": "string", - "description": "A human-readable description of the entry property" + "title": "Status", + "description": "the HTTP status code applicable to this problem, expressed as a string value." }, - "unit": { - "title": "Unit", + "code": { "type": "string", - "description": "The physical unit of the entry property.\nThis MUST be a valid representation of units according to version 2.1 of [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html).\nIt is RECOMMENDED that non-standard (non-SI) units are described in the description for the property." + "title": "Code", + "description": "an application-specific error code, expressed as a string value." }, - "sortable": { - "title": "Sortable", - "type": "boolean", - "description": "Defines whether the entry property can be used for sorting with the \"sort\" parameter.\nIf the entry listing endpoint supports sorting, this key MUST be present for sortable properties with value `true`." + "title": { + "type": "string", + "title": "Title", + "description": "A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization." }, - "type": { - "title": "Type", + "detail": { + "type": "string", + "title": "Detail", + "description": "A human-readable explanation specific to this occurrence of the problem." + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorSource" + } + ], + "title": "Source", + "description": "An object containing references to the source of the error" + }, + "meta": { "allOf": [ { - "$ref": "#/components/schemas/DataType" + "$ref": "#/components/schemas/Meta" } ], - "description": "The type of the property's value.\nThis MUST be any of the types defined in the Data types section.\nFor the purpose of compatibility with future versions of this specification, a client MUST accept values that are not `string` values specifying any of the OPTIMADE Data types, but MUST then also disregard the `type` field.\nNote, if the value is a nested type, only the outermost type should be reported.\nE.g., for the entry resource `structures`, the `species` property is defined as a list of dictionaries, hence its `type` value would be `list`." + "title": "Meta", + "description": "a meta object containing non-standard meta-information about the error." } - } - }, - "EntryInfoResource": { - "title": "EntryInfoResource", - "required": [ - "formats", - "description", - "properties", - "output_fields_by_format" - ], + }, "type": "object", + "title": "Error", + "description": "An error response" + }, + "ErrorLinks": { "properties": { - "formats": { - "title": "Formats", - "type": "array", - "items": { - "type": "string" - }, - "description": "List of output formats available for this type of entry." - }, - "description": { - "title": "Description", - "type": "string", - "description": "Description of the entry." - }, - "properties": { - "title": "Properties", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/EntryInfoProperty" - }, - "description": "A dictionary describing queryable properties for this entry type, where each key is a property name." - }, - "output_fields_by_format": { - "title": "Output Fields By Format", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" + "about": { + "anyOf": [ + { + "type": "string", + "maxLength": 65536, + "minLength": 1, + "format": "uri" + }, + { + "$ref": "#/components/schemas/Link" } - }, - "description": "Dictionary of available output fields for this entry type, where the keys are the values of the `formats` list and the values are the keys of the `properties` dictionary." + ], + "title": "About", + "description": "A link that leads to further details about this particular occurrence of the problem." } - } - }, - "EntryInfoResponse": { - "title": "EntryInfoResponse", - "required": [ - "data", - "meta" - ], + }, "type": "object", + "title": "ErrorLinks", + "description": "A Links object specific to Error objects" + }, + "ErrorResponse": { "properties": { "data": { - "title": "Data", - "allOf": [ + "anyOf": [ { - "$ref": "#/components/schemas/EntryInfoResource" + "$ref": "#/components/schemas/Resource" + }, + { + "items": { + "$ref": "#/components/schemas/Resource" + }, + "type": "array" } ], - "description": "OPTIMADE information for an entry endpoint" + "uniqueItems": true, + "title": "Data", + "description": "Outputted Data" }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/ResponseMeta" } ], - "description": "A meta object containing non-standard information" + "title": "Meta", + "description": "A meta object containing non-standard information." }, "errors": { - "title": "Errors", - "uniqueItems": true, - "type": "array", "items": { - "$ref": "#/components/schemas/Error" + "$ref": "#/components/schemas/OptimadeError" }, - "description": "A list of unique errors" + "type": "array", + "uniqueItems": true, + "title": "Errors", + "description": "A list of OPTIMADE-specific JSON API error objects, where the field detail MUST be present." }, "included": { - "title": "Included", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Resource" }, + "type": "array", + "uniqueItems": true, + "title": "Included", "description": "A list of unique included resources" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ToplevelLinks" } ], + "title": "Links", "description": "Links associated with the primary data or errors" }, "jsonapi": { - "title": "Jsonapi", "allOf": [ { "$ref": "#/components/schemas/JsonApi" } ], + "title": "Jsonapi", "description": "Information about the JSON API used" } }, - "description": "errors are not allowed" - }, - "EntryRelationships": { - "title": "EntryRelationships", "type": "object", + "required": [ + "meta", + "errors" + ], + "title": "ErrorResponse", + "description": "errors MUST be present and data MUST be skipped" + }, + "ErrorSource": { "properties": { - "references": { - "title": "References", - "allOf": [ - { - "$ref": "#/components/schemas/ReferenceRelationship" - } - ], - "description": "Object containing links to relationships with entries of the `references` type." + "pointer": { + "type": "string", + "title": "Pointer", + "description": "a JSON Pointer [RFC6901] to the associated entity in the request document [e.g. \"/data\" for a primary data object, or \"/data/attributes/title\" for a specific attribute]." }, - "structures": { - "title": "Structures", - "allOf": [ - { - "$ref": "#/components/schemas/StructureRelationship" - } - ], - "description": "Object containing links to relationships with entries of the `structures` type." + "parameter": { + "type": "string", + "title": "Parameter", + "description": "a string indicating which URI query parameter caused the error." } }, - "description": "This model wraps the JSON API Relationships to include type-specific top level keys." - }, - "EntryResource": { - "title": "EntryResource", - "required": [ - "id", - "type", - "attributes" - ], "type": "object", + "title": "ErrorSource", + "description": "an object containing references to the source of the error" + }, + "FileResource": { "properties": { "id": { - "title": "Id", "type": "string", - "description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`" + "title": "Id", + "description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`", + "x-optimade-support": "must", + "x-optimade-queryable": "must" }, "type": { - "title": "Type", "type": "string", - "description": "The name of the type of an entry.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n - MUST be an existing entry type.\n - The entry of type `` and ID `` MUST be returned in response to a request for `//` under the versioned base URL.\n\n- **Example**: `\"structures\"`" + "pattern": "^files$", + "title": "Type", + "description": "The name of the type of an entry.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n - MUST be an existing entry type.\n - The entry of type `` and ID `` MUST be returned in response to a request for `//` under the versioned base URL.\n\n- **Examples**:\n - `\"structures\"`", + "default": "files", + "x-optimade-support": "must", + "x-optimade-queryable": "must" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ResourceLinks" } ], + "title": "Links", "description": "a links object containing links related to the resource." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship." }, "attributes": { - "title": "Attributes", - "allOf": [ - { - "$ref": "#/components/schemas/EntryResourceAttributes" - } - ], - "description": "A dictionary, containing key-value pairs representing the entry's properties, except for `type` and `id`.\nDatabase-provider-specific properties need to include the database-provider-specific prefix (see section on Database-Provider-Specific Namespace Prefixes)." + "$ref": "#/components/schemas/FileResourceAttributes" }, "relationships": { - "title": "Relationships", "allOf": [ { "$ref": "#/components/schemas/EntryRelationships" } ], + "title": "Relationships", "description": "A dictionary containing references to other entries according to the description in section Relationships encoded as [JSON API Relationships](https://jsonapi.org/format/1.0/#document-resource-object-relationships).\nThe OPTIONAL human-readable description of the relationship MAY be provided in the `description` field inside the `meta` dictionary of the JSON API resource identifier object." } }, - "description": "The base model for an entry resource." - }, - "EntryResourceAttributes": { - "title": "EntryResourceAttributes", + "type": "object", "required": [ - "last_modified" + "id", + "type", + "attributes" ], - "type": "object", + "title": "FileResource", + "description": "Representing a structure." + }, + "FileResourceAttributes": { "properties": { "immutable_id": { - "title": "Immutable Id", "type": "string", - "description": "The entry's immutable ID (e.g., an UUID). This is important for databases having preferred IDs that point to \"the latest version\" of a record, but still offer access to older variants. This ID maps to the version-specific record, in case it changes in the future.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n\n- **Examples**:\n - `\"8bd3e750-b477-41a0-9b11-3a799f21b44f\"`\n - `\"fjeiwoj,54;@=%<>#32\"` (Strings that are not URL-safe are allowed.)" + "title": "Immutable Id", + "description": "The entry's immutable ID (e.g., an UUID). This is important for databases having preferred IDs that point to \"the latest version\" of a record, but still offer access to older variants. This ID maps to the version-specific record, in case it changes in the future.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n\n- **Examples**:\n - `\"8bd3e750-b477-41a0-9b11-3a799f21b44f\"`\n - `\"fjeiwoj,54;@=%<>#32\"` (Strings that are not URL-safe are allowed.)", + "x-optimade-support": "optional", + "x-optimade-queryable": "must" }, "last_modified": { - "title": "Last Modified", "type": "string", + "format": "date-time", + "title": "Last Modified", "description": "Date and time representing when the entry was last modified.\n\n- **Type**: timestamp.\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response unless the query parameter `response_fields` is present and does not include this property.\n\n- **Example**:\n - As part of JSON response format: `\"2007-04-05T14:30:20Z\"` (i.e., encoded as an [RFC 3339 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6) string.)", - "format": "date-time" - } - }, - "description": "Contains key-value pairs representing the entry's properties." - }, - "Error": { - "title": "Error", - "type": "object", - "properties": { - "id": { - "title": "Id", + "x-optimade-support": "should", + "x-optimade-queryable": "must" + }, + "url": { "type": "string", - "description": "A unique identifier for this particular occurrence of the problem." + "title": "Url", + "description": "The URL to get the contents of a file.\n- **Type**: string\n- **Requirements/Conventions**:\n\n - **Support**: MUST be supported by all implementations, MUST NOT be :val:`null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n - **Response**: REQUIRED in the response.\n - The URL MUST point to the actual contents of a file (i.e. byte stream), not an intermediate (preview) representation.\n For example, if referring to a file on GitHub, a link should point to raw contents.\n\n- **Examples**:\n\n - :val:`\"https://example.org/files/cifs/1000000.cif\"`\n", + "x-optimade-support": "must", + "x-optimade-queryable": "optional" }, - "links": { - "title": "Links", - "allOf": [ - { - "$ref": "#/components/schemas/ErrorLinks" - } - ], - "description": "A links object storing about" + "url_stable_until": { + "type": "string", + "format": "date-time", + "title": "Url Stable Until", + "description": "Point in time until which the URL in `url` is guaranteed to stay stable.\n- **Type**: timestamp\n- **Requirements/Conventions**:\n\n - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n - :val:`null` means that there is no stability guarantee for the URL in `url`.\n Indefinite support could be communicated by providing a date sufficiently far in the future, for example, :val:`9999-12-31`.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, - "status": { - "title": "Status", + "name": { "type": "string", - "description": "the HTTP status code applicable to this problem, expressed as a string value." + "title": "Name", + "description": "Base name of a file.\n- **Type**: string\n- **Requirements/Conventions**:\n\n - **Support**: MUST be supported by all implementations, MUST NOT be :val:`null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n - File name extension is an integral part of a file name and, if available, MUST be included.\n\n- **Examples**:\n\n - :val:`\"1000000.cif\"`", + "x-optimade-support": "must", + "x-optimade-queryable": "optional" }, - "code": { - "title": "Code", + "size": { + "type": "integer", + "title": "Size", + "description": "Size of a file in bytes.\n- **Type**: integer\n- **Requirements/Conventions**:\n\n - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n - If provided, it MUST be guaranteed that either exact size of a file is given or its upper bound.\n This way if a client reserves a static buffer or truncates the download stream after this many bytes the whole file would be received.\n Such provision is included to allow the providers to serve on-the-fly compressed files.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" + }, + "media_type": { "type": "string", - "description": "an application-specific error code, expressed as a string value." + "title": "Media Type", + "description": "Media type identifier (also known as MIME type), for a file as per `RFC 6838 Media Type Specifications and Registration Procedures `__.\n- **Type**: string\n- **Requirements/Conventions**:\n\n - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n\n- **Examples**:\n\n - :val:`\"chemical/x-cif\"`", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, - "title": { - "title": "Title", + "version": { "type": "string", - "description": "A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization." + "title": "Version", + "description": "Version information of a file (e.g. commit, revision, timestamp).\n- **Type**: string\n- **Requirements/Conventions**:\n\n - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n - If provided, it MUST be guaranteed that file contents pertaining to the same combination of :field:`id` and :field:`version` are the same", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, - "detail": { - "title": "Detail", + "modification_timestamp": { "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem." + "format": "date-time", + "title": "Modification Timestamp", + "description": "Timestamp of the last modification of file contents.\n A modification is understood as an addition, change or deletion of one or more bytes, resulting in file contents different from the previous.\n- **Type**: timestamp\n- **Requirements/Conventions**:\n\n - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n - Timestamps of subsequent file modifications SHOULD be increasing (not earlier than previous timestamps).", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, - "source": { - "title": "Source", - "allOf": [ + "description": { + "type": "string", + "title": "Description", + "description": "Free-form description of a file.\n- **Type**: string\n- **Requirements/Conventions**:\n\n - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n\n- **Examples**:\n\n - :val:`\"POSCAR format file\"`", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" + }, + "checksums": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "title": "Checksums", + "description": "Dictionary providing checksums of file contents.\n* **Type**: dictionary with keys identifying checksum functions and values (strings) giving the actual checksums\n* **Requirements/Conventions**:\n\n - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n - Supported dictionary keys: :property:`md5`, :property:`sha1`, :property:`sha224`, :property:`sha256`, :property:`sha384`, :property:`sha512`.\n Checksums outside this list MAY be used, but their names MUST be prefixed by database-provider-specific namespace prefix (see appendix `Database-Provider-Specific Namespace Prefixes`_).\n", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" + }, + "atime": { + "type": "string", + "format": "date-time", + "title": "Atime", + "description": "Time of last access of a file as per POSIX standard.\n- **Type**: timestamp\n- **Requirements/Conventions**:\n\n - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`.\n - **Query**: Support for queries on this property is OPTIONAL.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" + }, + "ctime": { + "type": "string", + "format": "date-time", + "title": "Ctime", + "description": "Time of last status change of a file as per POSIX standard.\n- **Type**: timestamp\n- **Requirements/Conventions**:\n\n - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`.\n - **Query**: Support for queries on this property is OPTIONAL.", + "x-optimade-unit": "\u00c5", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" + }, + "mtime": { + "type": "string", + "format": "date-time", + "title": "Mtime", + "description": " Time of last modification of a file as per POSIX standard.\n- **Type**: timestamp\n- **Requirements/Conventions**:\n\n - **Support**: OPTIONAL support in implementations, i.e., MAY be :val:`null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n - It should be noted that the values of :field:`last_modified`, :field:`modification_timestamp` and :field:`mtime` do not necessary match.\n :field:`last_modified` pertains to the modification of the OPTIMADE metadata, :field:`modification_timestamp` pertains to file contents and :field:`mtime` pertains to the modification of the file (not necessary changing its contents).\n For example, appending an empty string to a file would result in the change of :field:`mtime` in some operating systems, but this would not be deemed as a modification of its contents.\n", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" + } + }, + "type": "object", + "required": [ + "last_modified", + "url", + "url_stable_until", + "name", + "size", + "media_type", + "modification_timestamp", + "description", + "checksums", + "atime", + "ctime", + "mtime" + ], + "title": "FileResourceAttributes", + "description": "This class contains the Field for the attributes used to represent a file, e.g. ." + }, + "FileResponseMany": { + "properties": { + "data": { + "anyOf": [ { - "$ref": "#/components/schemas/ErrorSource" + "items": { + "$ref": "#/components/schemas/FileResource" + }, + "type": "array" + }, + { + "items": { + "type": "object" + }, + "type": "array" } ], - "description": "An object containing references to the source of the error" + "uniqueItems": true, + "title": "Data", + "description": "List of unique OPTIMADE files entry resource objects." }, "meta": { - "title": "Meta", "allOf": [ { - "$ref": "#/components/schemas/Meta" + "$ref": "#/components/schemas/ResponseMeta" } ], - "description": "a meta object containing non-standard meta-information about the error." - } - }, - "description": "An error response" - }, - "ErrorLinks": { - "title": "ErrorLinks", - "type": "object", - "properties": { - "about": { - "title": "About", + "title": "Meta", + "description": "A meta object containing non-standard information" + }, + "errors": { + "items": { + "$ref": "#/components/schemas/Error" + }, + "type": "array", + "uniqueItems": true, + "title": "Errors", + "description": "A list of unique errors" + }, + "included": { "anyOf": [ { - "type": "string", - "minLength": 1, - "maxLength": 65536, - "format": "uri" + "items": { + "$ref": "#/components/schemas/EntryResource" + }, + "type": "array" }, { - "$ref": "#/components/schemas/Link" + "items": { + "type": "object" + }, + "type": "array" } ], - "description": "A link that leads to further details about this particular occurrence of the problem." + "uniqueItems": true, + "title": "Included" + }, + "links": { + "allOf": [ + { + "$ref": "#/components/schemas/ToplevelLinks" + } + ], + "title": "Links", + "description": "Links associated with the primary data or errors" + }, + "jsonapi": { + "allOf": [ + { + "$ref": "#/components/schemas/JsonApi" + } + ], + "title": "Jsonapi", + "description": "Information about the JSON API used" } }, - "description": "A Links object specific to Error objects" - }, - "ErrorResponse": { - "title": "ErrorResponse", + "type": "object", "required": [ - "meta", - "errors" + "data", + "meta" ], - "type": "object", + "title": "FileResponseMany", + "description": "errors are not allowed" + }, + "FileResponseOne": { "properties": { "data": { - "title": "Data", - "uniqueItems": true, "anyOf": [ { - "$ref": "#/components/schemas/Resource" + "$ref": "#/components/schemas/FileResource" }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/Resource" - } + "type": "object" } ], - "description": "Outputted Data" + "title": "Data", + "description": "A single files entry resource." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/ResponseMeta" } ], + "title": "Meta", "description": "A meta object containing non-standard information" }, "errors": { - "title": "Errors", - "uniqueItems": true, - "type": "array", "items": { - "$ref": "#/components/schemas/OptimadeError" + "$ref": "#/components/schemas/Error" }, - "description": "A list of OPTIMADE-specific JSON API error objects, where the field detail MUST be present." + "type": "array", + "uniqueItems": true, + "title": "Errors", + "description": "A list of unique errors" }, "included": { - "title": "Included", + "anyOf": [ + { + "items": { + "$ref": "#/components/schemas/EntryResource" + }, + "type": "array" + }, + { + "items": { + "type": "object" + }, + "type": "array" + } + ], "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/Resource" - }, - "description": "A list of unique included resources" + "title": "Included" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ToplevelLinks" } ], + "title": "Links", "description": "Links associated with the primary data or errors" }, "jsonapi": { - "title": "Jsonapi", "allOf": [ { "$ref": "#/components/schemas/JsonApi" } ], + "title": "Jsonapi", "description": "Information about the JSON API used" } }, - "description": "errors MUST be present and data MUST be skipped" - }, - "ErrorSource": { - "title": "ErrorSource", "type": "object", - "properties": { - "pointer": { - "title": "Pointer", - "type": "string", - "description": "a JSON Pointer [RFC6901] to the associated entity in the request document [e.g. \"/data\" for a primary data object, or \"/data/attributes/title\" for a specific attribute]." - }, - "parameter": { - "title": "Parameter", - "type": "string", - "description": "a string indicating which URI query parameter caused the error." - } - }, - "description": "an object containing references to the source of the error" + "required": [ + "data", + "meta" + ], + "title": "FileResponseOne", + "description": "errors are not allowed" }, "Implementation": { - "title": "Implementation", - "type": "object", "properties": { "name": { - "title": "Name", "type": "string", + "title": "Name", "description": "name of the implementation" }, "version": { - "title": "Version", "type": "string", + "title": "Version", "description": "version string of the current implementation" }, "homepage": { - "title": "Homepage", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Homepage", "description": "A [JSON API links object](http://jsonapi.org/format/1.0/#document-links) pointing to the homepage of the implementation." }, "source_url": { - "title": "Source Url", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Source Url", "description": "A [JSON API links object](http://jsonapi.org/format/1.0/#document-links) pointing to the implementation source, either downloadable archive or version control system." }, "maintainer": { - "title": "Maintainer", "allOf": [ { "$ref": "#/components/schemas/ImplementationMaintainer" } ], + "title": "Maintainer", "description": "A dictionary providing details about the maintainer of the implementation." }, "issue_tracker": { - "title": "Issue Tracker", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Issue Tracker", "description": "A [JSON API links object](http://jsonapi.org/format/1.0/#document-links) pointing to the implementation's issue tracker." } }, + "type": "object", + "title": "Implementation", "description": "Information on the server implementation" }, "ImplementationMaintainer": { - "title": "ImplementationMaintainer", - "required": [ - "email" - ], - "type": "object", "properties": { "email": { - "title": "Email", "type": "string", - "description": "the maintainer's email address", - "format": "email" + "format": "email", + "title": "Email", + "description": "the maintainer's email address" } }, + "type": "object", + "required": [ + "email" + ], + "title": "ImplementationMaintainer", "description": "Details about the maintainer of the implementation" }, "InfoResponse": { - "title": "InfoResponse", - "required": [ - "data", - "meta" - ], - "type": "object", "properties": { "data": { - "title": "Data", "allOf": [ { "$ref": "#/components/schemas/BaseInfoResource" } ], - "description": "The implementations /info data" + "title": "Data", + "description": "The implementations /info data." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/ResponseMeta" } ], + "title": "Meta", "description": "A meta object containing non-standard information" }, "errors": { - "title": "Errors", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Error" }, + "type": "array", + "uniqueItems": true, + "title": "Errors", "description": "A list of unique errors" }, "included": { - "title": "Included", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Resource" }, + "type": "array", + "uniqueItems": true, + "title": "Included", "description": "A list of unique included resources" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ToplevelLinks" } ], + "title": "Links", "description": "Links associated with the primary data or errors" }, "jsonapi": { - "title": "Jsonapi", "allOf": [ { "$ref": "#/components/schemas/JsonApi" } ], + "title": "Jsonapi", "description": "Information about the JSON API used" } }, + "type": "object", + "required": [ + "data", + "meta" + ], + "title": "InfoResponse", "description": "errors are not allowed" }, "JsonApi": { - "title": "JsonApi", - "type": "object", "properties": { "version": { - "title": "Version", "type": "string", + "title": "Version", "description": "Version of the json API used", "default": "1.0" }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "Non-standard meta information" } }, + "type": "object", + "title": "JsonApi", "description": "An object describing the server's implementation" }, "Link": { - "title": "Link", - "required": [ - "href" - ], - "type": "object", "properties": { "href": { - "title": "Href", + "type": "string", "maxLength": 65536, "minLength": 1, - "type": "string", - "description": "a string containing the link\u2019s URL.", - "format": "uri" + "format": "uri", + "title": "Href", + "description": "a string containing the link\u2019s URL." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about the link." } }, + "type": "object", + "required": [ + "href" + ], + "title": "Link", "description": "A link **MUST** be represented as either: a string containing the link's URL or a link object." }, "LinkType": { - "title": "LinkType", "enum": [ "child", "root", "external", "providers" ], + "title": "LinkType", "description": "Enumeration of link_type values" }, "LinksResource": { - "title": "LinksResource", - "required": [ - "id", - "type", - "attributes" - ], - "type": "object", "properties": { "id": { - "title": "Id", "type": "string", - "description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`" + "title": "Id", + "description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`", + "x-optimade-support": "must", + "x-optimade-queryable": "must" }, "type": { - "title": "Type", - "pattern": "^links$", "type": "string", - "description": "These objects are described in detail in the section Links Endpoint" + "pattern": "^links$", + "title": "Type", + "description": "These objects are described in detail in the section Links Endpoint", + "default": "links" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ResourceLinks" } ], + "title": "Links", "description": "a links object containing links related to the resource." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship." }, "attributes": { - "title": "Attributes", "allOf": [ { "$ref": "#/components/schemas/LinksResourceAttributes" } ], + "title": "Attributes", "description": "A dictionary containing key-value pairs representing the Links resource's properties." }, "relationships": { - "title": "Relationships", "allOf": [ { "$ref": "#/components/schemas/EntryRelationships" } ], + "title": "Relationships", "description": "A dictionary containing references to other entries according to the description in section Relationships encoded as [JSON API Relationships](https://jsonapi.org/format/1.0/#document-resource-object-relationships).\nThe OPTIONAL human-readable description of the relationship MAY be provided in the `description` field inside the `meta` dictionary of the JSON API resource identifier object." } }, + "type": "object", + "required": [ + "id", + "type", + "attributes" + ], + "title": "LinksResource", "description": "A Links endpoint resource object" }, "LinksResourceAttributes": { - "title": "LinksResourceAttributes", - "required": [ - "name", - "description", - "base_url", - "homepage", - "link_type" - ], - "type": "object", "properties": { "name": { - "title": "Name", "type": "string", + "title": "Name", "description": "Human-readable name for the OPTIMADE API implementation, e.g., for use in clients to show the name to the end-user." }, "description": { - "title": "Description", "type": "string", + "title": "Description", "description": "Human-readable description for the OPTIMADE API implementation, e.g., for use in clients to show a description to the end-user." }, "base_url": { - "title": "Base Url", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Base Url", "description": "JSON API links object, pointing to the base URL for this implementation" }, "homepage": { - "title": "Homepage", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Homepage", "description": "JSON API links object, pointing to a homepage URL for this implementation" }, "link_type": { - "title": "Link Type", "allOf": [ { "$ref": "#/components/schemas/LinkType" } ], + "title": "Link Type", "description": "The type of the linked relation.\nMUST be one of these values: 'child', 'root', 'external', 'providers'." }, "aggregate": { - "title": "Aggregate", "allOf": [ { "$ref": "#/components/schemas/Aggregate" } ], + "title": "Aggregate", "description": "A string indicating whether a client that is following links to aggregate results from different OPTIMADE implementations should follow this link or not.\nThis flag SHOULD NOT be indicated for links where `link_type` is not `child`.\n\nIf not specified, clients MAY assume that the value is `ok`.\nIf specified, and the value is anything different than `ok`, the client MUST assume that the server is suggesting not to follow the link during aggregation by default (also if the value is not among the known ones, in case a future specification adds new accepted values).\n\nSpecific values indicate the reason why the server is providing the suggestion.\nA client MAY follow the link anyway if it has reason to do so (e.g., if the client is looking for all test databases, it MAY follow the links marked with `aggregate`=`test`).\n\nIf specified, it MUST be one of the values listed in section Link Aggregate Options.", "default": "ok" }, "no_aggregate_reason": { - "title": "No Aggregate Reason", "type": "string", + "title": "No Aggregate Reason", "description": "An OPTIONAL human-readable string indicating the reason for suggesting not to aggregate results following the link.\nIt SHOULD NOT be present if `aggregate`=`ok`." } }, + "type": "object", + "required": [ + "name", + "description", + "base_url", + "homepage", + "link_type" + ], + "title": "LinksResourceAttributes", "description": "Links endpoint resource object attributes" }, "LinksResponse": { - "title": "LinksResponse", - "required": [ - "data", - "meta" - ], - "type": "object", "properties": { "data": { - "title": "Data", - "uniqueItems": true, "anyOf": [ { - "type": "array", "items": { "$ref": "#/components/schemas/LinksResource" - } + }, + "type": "array" }, { - "type": "array", "items": { "type": "object" - } + }, + "type": "array" } ], - "description": "List of unique OPTIMADE links resource objects" + "uniqueItems": true, + "title": "Data", + "description": "List of unique OPTIMADE links resource objects." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/ResponseMeta" } ], + "title": "Meta", "description": "A meta object containing non-standard information" }, "errors": { - "title": "Errors", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Error" }, + "type": "array", + "uniqueItems": true, + "title": "Errors", "description": "A list of unique errors" }, "included": { - "title": "Included", - "uniqueItems": true, "anyOf": [ { - "type": "array", "items": { "$ref": "#/components/schemas/EntryResource" - } + }, + "type": "array" }, { - "type": "array", "items": { "type": "object" - } + }, + "type": "array" } - ] + ], + "uniqueItems": true, + "title": "Included" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ToplevelLinks" } ], + "title": "Links", "description": "Links associated with the primary data or errors" }, "jsonapi": { - "title": "Jsonapi", "allOf": [ { "$ref": "#/components/schemas/JsonApi" } ], + "title": "Jsonapi", "description": "Information about the JSON API used" } }, + "type": "object", + "required": [ + "data", + "meta" + ], + "title": "LinksResponse", "description": "errors are not allowed" }, "Meta": { - "title": "Meta", - "type": "object", "properties": {}, + "type": "object", + "title": "Meta", "description": "Non-standard meta-information that can not be represented as an attribute or relationship." }, - "OptimadeError": { - "title": "OptimadeError", - "required": [ - "detail" + "OptimadeAllowedUnitStandard": { + "enum": [ + "gnu units", + "ucum", + "qudt" ], - "type": "object", + "title": "OptimadeAllowedUnitStandard", + "description": "An enumeration." + }, + "OptimadeError": { "properties": { "id": { - "title": "Id", "type": "string", + "title": "Id", "description": "A unique identifier for this particular occurrence of the problem." }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ErrorLinks" } ], + "title": "Links", "description": "A links object storing about" }, "status": { - "title": "Status", "type": "string", + "title": "Status", "description": "the HTTP status code applicable to this problem, expressed as a string value." }, "code": { - "title": "Code", "type": "string", + "title": "Code", "description": "an application-specific error code, expressed as a string value." }, - "title": { - "title": "Title", + "title": { + "type": "string", + "title": "Title", + "description": "A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization." + }, + "detail": { + "type": "string", + "title": "Detail", + "description": "A human-readable explanation specific to this occurrence of the problem." + }, + "source": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorSource" + } + ], + "title": "Source", + "description": "An object containing references to the source of the error" + }, + "meta": { + "allOf": [ + { + "$ref": "#/components/schemas/Meta" + } + ], + "title": "Meta", + "description": "a meta object containing non-standard meta-information about the error." + } + }, + "type": "object", + "required": [ + "detail" + ], + "title": "OptimadeError", + "description": "detail MUST be present" + }, + "OptimadePropertyDefinition": { + "properties": { + "property-uri": { + "type": "string", + "title": "Property-Uri", + "description": "A static URI identifier that is a URN or URL representing the specific version of the property.\nIt SHOULD NOT be changed as long as the property definition remains the same, and SHOULD be changed when the property definition changes.\n(If it is a URL, clients SHOULD NOT assign any interpretation to the response when resolving that URL.)" + }, + "version": { + "type": "string", + "title": "Version", + "description": "This string indicates the version of the property definition.\nThe string SHOULD be in the format described by the [semantic versioning v2](https://semver.org/spec/v2.0.0.html) standard." + }, + "unit-definitions": { + "items": { + "$ref": "#/components/schemas/OptimadeUnitDefinition" + }, + "type": "array", + "title": "Unit-Definitions", + "description": "A list of definitions of the symbols used in the Property Definition (including its nested levels) for physical units given as values of the `x-optimade-unit` field.\nThis field MUST be included if the defined property, at any level, includes an `x-optimade-unit` with a value that is not `dimensionless` or `inapplicable`." + }, + "resource-uris": { + "items": { + "$ref": "#/components/schemas/PropertyRemoteResource" + }, + "type": "array", + "title": "Resource-Uris", + "description": "A list of dictionaries that references remote resources that describe the property." + } + }, + "type": "object", + "required": [ + "property-uri", + "version", + "unit-definitions", + "resource-uris" + ], + "title": "OptimadePropertyDefinition" + }, + "OptimadeUnitDefinition": { + "properties": { + "symbol": { + "type": "string", + "title": "Symbol" + }, + "title": { + "type": "string", + "title": "Title" + }, + "description": { + "type": "string", + "title": "Description" + }, + "standard": { + "$ref": "#/components/schemas/OptimadeUnitStandard" + }, + "resource-uris": { + "items": { + "$ref": "#/components/schemas/UnitResourceURIs" + }, + "type": "array", + "title": "Resource-Uris" + } + }, + "type": "object", + "required": [ + "symbol", + "title", + "description", + "standard", + "resource-uris" + ], + "title": "OptimadeUnitDefinition" + }, + "OptimadeUnitStandard": { + "properties": { + "name": { + "$ref": "#/components/schemas/OptimadeAllowedUnitStandard" + }, + "version": { "type": "string", - "description": "A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization." + "title": "Version" }, - "detail": { - "title": "Detail", + "symbol": { "type": "string", - "description": "A human-readable explanation specific to this occurrence of the problem." - }, - "source": { - "title": "Source", - "allOf": [ - { - "$ref": "#/components/schemas/ErrorSource" - } - ], - "description": "An object containing references to the source of the error" - }, - "meta": { - "title": "Meta", - "allOf": [ - { - "$ref": "#/components/schemas/Meta" - } - ], - "description": "a meta object containing non-standard meta-information about the error." + "title": "Symbol" } }, - "description": "detail MUST be present" + "type": "object", + "required": [ + "name", + "version", + "symbol" + ], + "title": "OptimadeUnitStandard" }, "Periodicity": { - "title": "Periodicity", + "type": "integer", "enum": [ 0, 1 ], - "type": "integer", + "title": "Periodicity", "description": "Integer enumeration of dimension_types values" }, "Person": { - "title": "Person", - "required": [ - "name" - ], - "type": "object", "properties": { "name": { - "title": "Name", "type": "string", - "description": "Full name of the person, REQUIRED." + "title": "Name", + "description": "Full name of the person, REQUIRED.", + "x-optimade-support": "must", + "x-optimade-queryable": "optional" }, "firstname": { - "title": "Firstname", "type": "string", - "description": "First name of the person." + "title": "Firstname", + "description": "First name of the person.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "lastname": { - "title": "Lastname", "type": "string", - "description": "Last name of the person." + "title": "Lastname", + "description": "Last name of the person.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" } }, + "type": "object", + "required": [ + "name" + ], + "title": "Person", "description": "A person, i.e., an author, editor or other." }, - "Provider": { - "title": "Provider", + "PropertyImplementationInfo": { + "properties": { + "sortable": { + "type": "boolean", + "title": "Sortable", + "description": "If `TRUE`, specifies that results can be sorted on this property.\n If `FALSE`, specifies that results cannot be sorted on this property.\n Omitting the field is equivalent to `FALSE`." + }, + "query-support": { + "allOf": [ + { + "$ref": "#/components/schemas/QuerySupport" + } + ], + "description": "Defines a required level of support in formulating queries on this field.\n\n The string MUST be one of the following:\n\n - `all mandatory`: the defined property MUST be queryable using the OPTIMADE filter language with support for all mandatory filter features.\n - `equality only`: the defined property MUST be queryable using the OPTIMADE filter language equality and inequality operators. Other filter language features do not need to be available.\n - `partial`: the defined property MUST be queryable with support for a subset of the filter language operators as specified by the field `query-support-operators`.\n - `none`: the defined property does not need to be queryable with any features of the filter language." + }, + "query-support-operators": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Query-Support-Operators", + "description": "Defines the filter language features supported on this property.\n\nEach string in the list MUST be one of `<`, `<=`, `>`, `>=`, `=`, `!=`, `CONTAINS`, `STARTS WITH`, `ENDS WITH`:, `HAS`, `HAS ALL`, `HAS ANY`, `HAS ONLY`, `IS KNOWN`, `IS UNKNOWN` with the following meanings:\n\n- `<`, `<=`, `>`, `>=`, `=`, `!=`: indicating support for filtering this property using the respective operator.\n If the property is of Boolean type, support for `=` also designates support for boolean comparisons with the property being true that omit \":filter-fragment:`= TRUE`\", e.g., specifying that filtering for \"`is_yellow = TRUE`\" is supported also implies support for \"`is_yellow`\" (which means the same thing).\n Support for \"`NOT is_yellow`\" also follows.\n\n- `CONTAINS`, `STARTS WITH`, `ENDS WITH`: indicating support for substring filtering of this property using the respective operator. MUST NOT appear if the property is not of type String.\n\n- `HAS`, `HAS ALL`, `HAS ANY`: indicating support of the MANDATORY features for list property comparison using the respective operator. MUST NOT appear if the property is not of type List.\n\n- `HAS ONLY`: indicating support for list property comparison with all or a subset of the OPTIONAL constructs using this operator. MUST NOT appear if the property is not of type List.\n\n- `IS KNOWN`, `IS UNKNOWN`: indicating support for filtering this property on unknown values using the respective operator." + } + }, + "type": "object", "required": [ - "name", - "description", - "prefix" + "sortable", + "query-support", + "query-support-operators" + ], + "title": "PropertyImplementationInfo" + }, + "PropertyRemoteResource": { + "properties": { + "relation": { + "type": "string", + "title": "Relation", + "description": "A human-readable description of the relationship between the property and the remote resource, e.g., a 'natural language description'." + }, + "uri": { + "type": "string", + "title": "Uri", + "description": "A URI of the external resource (which MAY be a resolvable URL)." + } + }, + "type": "object", + "required": [ + "relation", + "uri" ], + "title": "PropertyRemoteResource" + }, + "PropertyRequirementsInfo": { + "properties": { + "sortable": { + "type": "boolean", + "title": "Sortable", + "description": "If `TRUE`, specifies that results can be sorted on this property.\n If `FALSE`, specifies that results cannot be sorted on this property.\n Omitting the field is equivalent to `FALSE`." + }, + "query-support": { + "allOf": [ + { + "$ref": "#/components/schemas/QuerySupport" + } + ], + "description": "Defines a required level of support in formulating queries on this field.\n\n The string MUST be one of the following:\n\n - `all mandatory`: the defined property MUST be queryable using the OPTIMADE filter language with support for all mandatory filter features.\n - `equality only`: the defined property MUST be queryable using the OPTIMADE filter language equality and inequality operators. Other filter language features do not need to be available.\n - `partial`: the defined property MUST be queryable with support for a subset of the filter language operators as specified by the field `query-support-operators`.\n - `none`: the defined property does not need to be queryable with any features of the filter language." + }, + "query-support-operators": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Query-Support-Operators", + "description": "Defines the filter language features supported on this property.\n\nEach string in the list MUST be one of `<`, `<=`, `>`, `>=`, `=`, `!=`, `CONTAINS`, `STARTS WITH`, `ENDS WITH`:, `HAS`, `HAS ALL`, `HAS ANY`, `HAS ONLY`, `IS KNOWN`, `IS UNKNOWN` with the following meanings:\n\n- `<`, `<=`, `>`, `>=`, `=`, `!=`: indicating support for filtering this property using the respective operator.\n If the property is of Boolean type, support for `=` also designates support for boolean comparisons with the property being true that omit \":filter-fragment:`= TRUE`\", e.g., specifying that filtering for \"`is_yellow = TRUE`\" is supported also implies support for \"`is_yellow`\" (which means the same thing).\n Support for \"`NOT is_yellow`\" also follows.\n\n- `CONTAINS`, `STARTS WITH`, `ENDS WITH`: indicating support for substring filtering of this property using the respective operator. MUST NOT appear if the property is not of type String.\n\n- `HAS`, `HAS ALL`, `HAS ANY`: indicating support of the MANDATORY features for list property comparison using the respective operator. MUST NOT appear if the property is not of type List.\n\n- `HAS ONLY`: indicating support for list property comparison with all or a subset of the OPTIONAL constructs using this operator. MUST NOT appear if the property is not of type List.\n\n- `IS KNOWN`, `IS UNKNOWN`: indicating support for filtering this property on unknown values using the respective operator." + }, + "support": { + "allOf": [ + { + "$ref": "#/components/schemas/SupportLevel" + } + ], + "description": "Describes the minimal required level of support for the Property by an implementation.\n\n This field SHOULD only appear in a `x-optimade-requirements` that is at the outermost level of a Property Definition, as the meaning of its inclusion on other levels is not defined.\n The string MUST be one of the following:\n\n - `must`: the defined property MUST be recognized by the implementation (e.g., in filter strings) and MUST NOT be `null`.\n - `should`: the defined property MUST be recognized by the implementation (e.g., in filter strings) and SHOULD NOT be `null`.\n - `may`: it is OPTIONAL for the implementation to recognize the defined property and it MAY be equal to `null`." + } + }, "type": "object", + "required": [ + "sortable", + "query-support", + "query-support-operators", + "support" + ], + "title": "PropertyRequirementsInfo" + }, + "Provider": { "properties": { "name": { - "title": "Name", "type": "string", + "title": "Name", "description": "a short name for the database provider" }, "description": { - "title": "Description", "type": "string", + "title": "Description", "description": "a longer description of the database provider" }, "prefix": { - "title": "Prefix", - "pattern": "^[a-z]([a-z]|[0-9]|_)*$", "type": "string", + "pattern": "^[a-z]([a-z]|[0-9]|_)*$", + "title": "Prefix", "description": "database-provider-specific prefix as found in section Database-Provider-Specific Namespace Prefixes." }, "homepage": { - "title": "Homepage", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Homepage", "description": "a [JSON API links object](http://jsonapi.org/format/1.0#document-links) pointing to homepage of the database provider, either directly as a string, or as a link object." } }, + "type": "object", + "required": [ + "name", + "description", + "prefix" + ], + "title": "Provider", "description": "Information on the database provider of the implementation." }, + "QuerySupport": { + "enum": [ + "all mandatory", + "equality only", + "partial", + "none" + ], + "title": "QuerySupport", + "description": "An enumeration." + }, "ReferenceRelationship": { - "title": "ReferenceRelationship", - "type": "object", "properties": { "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/RelationshipLinks" } ], + "title": "Links", "description": "a links object containing at least one of the following: self, related" }, "data": { - "title": "Data", - "uniqueItems": true, "anyOf": [ { "$ref": "#/components/schemas/BaseRelationshipResource" }, { - "type": "array", "items": { "$ref": "#/components/schemas/BaseRelationshipResource" - } + }, + "type": "array" } ], + "uniqueItems": true, + "title": "Data", "description": "Resource linkage" }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object that contains non-standard meta-information about the relationship." } }, - "description": "Similar to normal JSON API relationship, but with addition of OPTIONAL meta field for a resource" + "type": "object", + "title": "ReferenceRelationship", + "description": "Similar to normal JSON API relationship, but with addition of OPTIONAL meta field for a resource." }, "ReferenceResource": { - "title": "ReferenceResource", - "required": [ - "id", - "type", - "attributes" - ], - "type": "object", "properties": { "id": { - "title": "Id", "type": "string", - "description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`" + "title": "Id", + "description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`", + "x-optimade-support": "must", + "x-optimade-queryable": "must" }, "type": { - "title": "Type", - "pattern": "^references$", "type": "string", - "description": "The name of the type of an entry.\n- **Type**: string.\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n - MUST be an existing entry type.\n - The entry of type and ID MUST be returned in response to a request for `//` under the versioned base URL.\n- **Example**: `\"structures\"`" + "pattern": "^references$", + "title": "Type", + "description": "The name of the type of an entry.\n- **Type**: string.\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n - MUST be an existing entry type.\n - The entry of type and ID MUST be returned in response to a request for `//` under the versioned base URL.\n- **Example**: `\"structures\"`", + "default": "references", + "x-optimade-support": "must", + "x-optimade-queryable": "must" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ResourceLinks" } ], + "title": "Links", "description": "a links object containing links related to the resource." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship." }, "attributes": { "$ref": "#/components/schemas/ReferenceResourceAttributes" }, "relationships": { - "title": "Relationships", "allOf": [ { "$ref": "#/components/schemas/EntryRelationships" } ], + "title": "Relationships", "description": "A dictionary containing references to other entries according to the description in section Relationships encoded as [JSON API Relationships](https://jsonapi.org/format/1.0/#document-resource-object-relationships).\nThe OPTIONAL human-readable description of the relationship MAY be provided in the `description` field inside the `meta` dictionary of the JSON API resource identifier object." } }, + "type": "object", + "required": [ + "id", + "type", + "attributes" + ], + "title": "ReferenceResource", "description": "The `references` entries describe bibliographic references.\n\nThe following properties are used to provide the bibliographic details:\n\n- **address**, **annote**, **booktitle**, **chapter**, **crossref**, **edition**, **howpublished**, **institution**, **journal**, **key**, **month**, **note**, **number**, **organization**, **pages**, **publisher**, **school**, **series**, **title**, **volume**, **year**: meanings of these properties match the [BibTeX specification](http://bibtexml.sourceforge.net/btxdoc.pdf), values are strings;\n- **bib_type**: type of the reference, corresponding to **type** property in the BibTeX specification, value is string;\n- **authors** and **editors**: lists of *person objects* which are dictionaries with the following keys:\n - **name**: Full name of the person, REQUIRED.\n - **firstname**, **lastname**: Parts of the person's name, OPTIONAL.\n- **doi** and **url**: values are strings.\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., any of the properties MAY be `null`.\n - **Query**: Support for queries on any of these properties is OPTIONAL.\n If supported, filters MAY support only a subset of comparison operators.\n - Every references entry MUST contain at least one of the properties." }, "ReferenceResourceAttributes": { - "title": "ReferenceResourceAttributes", - "required": [ - "last_modified" - ], - "type": "object", "properties": { "immutable_id": { - "title": "Immutable Id", "type": "string", - "description": "The entry's immutable ID (e.g., an UUID). This is important for databases having preferred IDs that point to \"the latest version\" of a record, but still offer access to older variants. This ID maps to the version-specific record, in case it changes in the future.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n\n- **Examples**:\n - `\"8bd3e750-b477-41a0-9b11-3a799f21b44f\"`\n - `\"fjeiwoj,54;@=%<>#32\"` (Strings that are not URL-safe are allowed.)" + "title": "Immutable Id", + "description": "The entry's immutable ID (e.g., an UUID). This is important for databases having preferred IDs that point to \"the latest version\" of a record, but still offer access to older variants. This ID maps to the version-specific record, in case it changes in the future.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n\n- **Examples**:\n - `\"8bd3e750-b477-41a0-9b11-3a799f21b44f\"`\n - `\"fjeiwoj,54;@=%<>#32\"` (Strings that are not URL-safe are allowed.)", + "x-optimade-support": "optional", + "x-optimade-queryable": "must" }, "last_modified": { - "title": "Last Modified", "type": "string", + "format": "date-time", + "title": "Last Modified", "description": "Date and time representing when the entry was last modified.\n\n- **Type**: timestamp.\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response unless the query parameter `response_fields` is present and does not include this property.\n\n- **Example**:\n - As part of JSON response format: `\"2007-04-05T14:30:20Z\"` (i.e., encoded as an [RFC 3339 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6) string.)", - "format": "date-time" + "x-optimade-support": "should", + "x-optimade-queryable": "must" }, "authors": { - "title": "Authors", - "type": "array", "items": { "$ref": "#/components/schemas/Person" }, - "description": "List of person objects containing the authors of the reference." + "type": "array", + "title": "Authors", + "description": "List of person objects containing the authors of the reference.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "editors": { - "title": "Editors", - "type": "array", "items": { "$ref": "#/components/schemas/Person" }, - "description": "List of person objects containing the editors of the reference." + "type": "array", + "title": "Editors", + "description": "List of person objects containing the editors of the reference.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "doi": { - "title": "Doi", "type": "string", - "description": "The digital object identifier of the reference." + "title": "Doi", + "description": "The digital object identifier of the reference.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "url": { - "title": "Url", + "type": "string", "maxLength": 65536, "minLength": 1, - "type": "string", + "format": "uri", + "title": "Url", "description": "The URL of the reference.", - "format": "uri" + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "address": { - "title": "Address", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Address", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "annote": { - "title": "Annote", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Annote", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "booktitle": { - "title": "Booktitle", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Booktitle", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "chapter": { - "title": "Chapter", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Chapter", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "crossref": { - "title": "Crossref", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Crossref", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "edition": { - "title": "Edition", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Edition", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "howpublished": { - "title": "Howpublished", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Howpublished", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "institution": { - "title": "Institution", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Institution", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "journal": { - "title": "Journal", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Journal", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "key": { - "title": "Key", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Key", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "month": { - "title": "Month", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Month", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "note": { - "title": "Note", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Note", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "number": { - "title": "Number", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Number", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "organization": { - "title": "Organization", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Organization", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "pages": { - "title": "Pages", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Pages", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "publisher": { - "title": "Publisher", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Publisher", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "school": { - "title": "School", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "School", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "series": { - "title": "Series", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Series", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "title": { - "title": "Title", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Title", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "bib_type": { - "title": "Bib Type", "type": "string", - "description": "Type of the reference, corresponding to the **type** property in the BiBTeX specification." + "title": "Bib Type", + "description": "Type of the reference, corresponding to the **type** property in the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "volume": { - "title": "Volume", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Volume", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "year": { - "title": "Year", "type": "string", - "description": "Meaning of property matches the BiBTeX specification." + "title": "Year", + "description": "Meaning of property matches the BiBTeX specification.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" } }, - "description": "Model that stores the attributes of a reference.\n\nMany properties match the meaning described in the\n[BibTeX specification](http://bibtexml.sourceforge.net/btxdoc.pdf)." - }, - "ReferenceResponseMany": { - "title": "ReferenceResponseMany", + "type": "object", "required": [ - "data", - "meta" + "last_modified" ], - "type": "object", + "title": "ReferenceResourceAttributes", + "description": "Model that stores the attributes of a reference.\n\nMany properties match the meaning described in the\n[BibTeX specification](http://bibtexml.sourceforge.net/btxdoc.pdf)." + }, + "ReferenceResponseMany": { "properties": { "data": { - "title": "Data", - "uniqueItems": true, "anyOf": [ { - "type": "array", "items": { "$ref": "#/components/schemas/ReferenceResource" - } + }, + "type": "array" }, { - "type": "array", "items": { "type": "object" - } + }, + "type": "array" } ], - "description": "List of unique OPTIMADE references entry resource objects" + "uniqueItems": true, + "title": "Data", + "description": "List of unique OPTIMADE references entry resource objects." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/ResponseMeta" } ], + "title": "Meta", "description": "A meta object containing non-standard information" }, "errors": { - "title": "Errors", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Error" }, + "type": "array", + "uniqueItems": true, + "title": "Errors", "description": "A list of unique errors" }, "included": { - "title": "Included", - "uniqueItems": true, "anyOf": [ { - "type": "array", "items": { "$ref": "#/components/schemas/EntryResource" - } + }, + "type": "array" }, { - "type": "array", "items": { "type": "object" - } + }, + "type": "array" } - ] + ], + "uniqueItems": true, + "title": "Included" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ToplevelLinks" } ], + "title": "Links", "description": "Links associated with the primary data or errors" }, "jsonapi": { - "title": "Jsonapi", "allOf": [ { "$ref": "#/components/schemas/JsonApi" } ], + "title": "Jsonapi", "description": "Information about the JSON API used" } }, - "description": "errors are not allowed" - }, - "ReferenceResponseOne": { - "title": "ReferenceResponseOne", + "type": "object", "required": [ "data", "meta" ], - "type": "object", + "title": "ReferenceResponseMany", + "description": "errors are not allowed" + }, + "ReferenceResponseOne": { "properties": { "data": { - "title": "Data", "anyOf": [ { "$ref": "#/components/schemas/ReferenceResource" @@ -2926,736 +4048,846 @@ "type": "object" } ], - "description": "A single references entry resource" + "title": "Data", + "description": "A single references entry resource." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/ResponseMeta" } ], + "title": "Meta", "description": "A meta object containing non-standard information" }, "errors": { - "title": "Errors", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Error" }, + "type": "array", + "uniqueItems": true, + "title": "Errors", "description": "A list of unique errors" }, "included": { - "title": "Included", - "uniqueItems": true, "anyOf": [ { - "type": "array", "items": { "$ref": "#/components/schemas/EntryResource" - } + }, + "type": "array" }, { - "type": "array", "items": { "type": "object" - } + }, + "type": "array" } - ] + ], + "uniqueItems": true, + "title": "Included" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ToplevelLinks" } ], + "title": "Links", "description": "Links associated with the primary data or errors" }, "jsonapi": { - "title": "Jsonapi", "allOf": [ { "$ref": "#/components/schemas/JsonApi" } ], + "title": "Jsonapi", "description": "Information about the JSON API used" } }, + "type": "object", + "required": [ + "data", + "meta" + ], + "title": "ReferenceResponseOne", "description": "errors are not allowed" }, "RelationshipLinks": { - "title": "RelationshipLinks", - "type": "object", "properties": { "self": { - "title": "Self", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Self", "description": "A link for the relationship itself (a 'relationship link').\nThis link allows the client to directly manipulate the relationship.\nWhen fetched successfully, this link returns the [linkage](https://jsonapi.org/format/1.0/#document-resource-object-linkage) for the related resources as its primary data.\n(See [Fetching Relationships](https://jsonapi.org/format/1.0/#fetching-relationships).)" }, "related": { - "title": "Related", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Related", "description": "A [related resource link](https://jsonapi.org/format/1.0/#document-resource-object-related-resource-links)." } }, + "type": "object", + "title": "RelationshipLinks", "description": "A resource object **MAY** contain references to other resource objects (\"relationships\").\nRelationships may be to-one or to-many.\nRelationships can be specified by including a member in a resource's links object." }, "Relationships": { - "title": "Relationships", - "type": "object", "properties": {}, + "type": "object", + "title": "Relationships", "description": "Members of the relationships object (\"relationships\") represent references from the resource object in which it's defined to other resource objects.\nKeys MUST NOT be:\n type\n id" }, "Resource": { - "title": "Resource", - "required": [ - "id", - "type" - ], - "type": "object", "properties": { "id": { - "title": "Id", "type": "string", + "title": "Id", "description": "Resource ID" }, "type": { - "title": "Type", "type": "string", + "title": "Type", "description": "Resource type" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ResourceLinks" } ], + "title": "Links", "description": "a links object containing links related to the resource." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship." }, "attributes": { - "title": "Attributes", "allOf": [ { "$ref": "#/components/schemas/Attributes" } ], + "title": "Attributes", "description": "an attributes object representing some of the resource\u2019s data." }, "relationships": { - "title": "Relationships", "allOf": [ { "$ref": "#/components/schemas/Relationships" } ], + "title": "Relationships", "description": "[Relationships object](https://jsonapi.org/format/1.0/#document-resource-object-relationships)\ndescribing relationships between the resource and other JSON API resources." } }, + "type": "object", + "required": [ + "id", + "type" + ], + "title": "Resource", "description": "Resource objects appear in a JSON API document to represent resources." }, "ResourceLinks": { - "title": "ResourceLinks", - "type": "object", "properties": { "self": { - "title": "Self", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Self", "description": "A link that identifies the resource represented by the resource object." } }, + "type": "object", + "title": "ResourceLinks", "description": "A Resource Links object" }, "ResponseMeta": { - "title": "ResponseMeta", - "required": [ - "query", - "api_version", - "more_data_available" - ], - "type": "object", "properties": { "query": { - "title": "Query", "allOf": [ { "$ref": "#/components/schemas/ResponseMetaQuery" } ], + "title": "Query", "description": "Information on the Query that was requested" }, "api_version": { - "title": "Api Version", - "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", "type": "string", - "description": "Presently used full version of the OPTIMADE API.\nThe version number string MUST NOT be prefixed by, e.g., \"v\".\nExamples: `1.0.0`, `1.0.0-rc.2`." + "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", + "title": "Api Version", + "description": "Presently used full version of the OPTIMADE API.\nThe version number string MUST NOT be prefixed by, e.g., \"v\".\nExamples: `1.0.0`, `1.0.0-rc.2`.", + "example": [ + "0.10.1", + "1.0.0-rc.2", + "1.2.3-rc.5+develop" + ] }, "more_data_available": { - "title": "More Data Available", "type": "boolean", + "title": "More Data Available", "description": "`false` if the response contains all data for the request (e.g., a request issued to a single entry endpoint, or a `filter` query at the last page of a paginated response) and `true` if the response is incomplete in the sense that multiple objects match the request, and not all of them have been included in the response (e.g., a query with multiple pages that is not at the last page)." }, "schema": { - "title": "Schema", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Schema", "description": "A [JSON API links object](http://jsonapi.org/format/1.0/#document-links) that points to a schema for the response.\nIf it is a string, or a dictionary containing no `meta` field, the provided URL MUST point at an [OpenAPI](https://swagger.io/specification/) schema.\nIt is possible that future versions of this specification allows for alternative schema types.\nHence, if the `meta` field of the JSON API links object is provided and contains a field `schema_type` that is not equal to the string `OpenAPI` the client MUST not handle failures to parse the schema or to validate the response against the schema as errors." }, "time_stamp": { - "title": "Time Stamp", "type": "string", - "description": "A timestamp containing the date and time at which the query was executed.", - "format": "date-time" + "format": "date-time", + "title": "Time Stamp", + "description": "A timestamp containing the date and time at which the query was executed." }, "data_returned": { - "title": "Data Returned", - "minimum": 0.0, "type": "integer", + "minimum": 0.0, + "title": "Data Returned", "description": "An integer containing the total number of data resource objects returned for the current `filter` query, independent of pagination." }, "provider": { - "title": "Provider", "allOf": [ { "$ref": "#/components/schemas/Provider" } ], + "title": "Provider", "description": "information on the database provider of the implementation." }, "data_available": { - "title": "Data Available", "type": "integer", + "title": "Data Available", "description": "An integer containing the total number of data resource objects available in the database for the endpoint." }, "last_id": { - "title": "Last Id", "type": "string", + "title": "Last Id", "description": "a string containing the last ID returned" }, "response_message": { - "title": "Response Message", "type": "string", + "title": "Response Message", "description": "response string from the server" }, + "request_delay": { + "type": "number", + "minimum": 0.0, + "title": "Request Delay", + "description": "A non-negative float giving time in seconds that the client is suggested to wait before issuing a subsequent request." + }, "implementation": { - "title": "Implementation", "allOf": [ { "$ref": "#/components/schemas/Implementation" } ], + "title": "Implementation", "description": "a dictionary describing the server implementation" }, "warnings": { - "title": "Warnings", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Warnings" }, + "type": "array", + "uniqueItems": true, + "title": "Warnings", "description": "A list of warning resource objects representing non-critical errors or warnings.\nA warning resource object is defined similarly to a [JSON API error object](http://jsonapi.org/format/1.0/#error-objects), but MUST also include the field `type`, which MUST have the value `\"warning\"`.\nThe field `detail` MUST be present and SHOULD contain a non-critical message, e.g., reporting unrecognized search attributes or deprecated features.\nThe field `status`, representing a HTTP response status code, MUST NOT be present for a warning resource object.\nThis is an exclusive field for error resource objects." } }, + "type": "object", + "required": [ + "query", + "api_version", + "more_data_available" + ], + "title": "ResponseMeta", "description": "A [JSON API meta member](https://jsonapi.org/format/1.0#document-meta)\nthat contains JSON API meta objects of non-standard\nmeta-information.\n\nOPTIONAL additional information global to the query that is not\nspecified in this document, MUST start with a\ndatabase-provider-specific prefix." }, "ResponseMetaQuery": { - "title": "ResponseMetaQuery", - "required": [ - "representation" - ], - "type": "object", "properties": { "representation": { - "title": "Representation", "type": "string", + "title": "Representation", "description": "A string with the part of the URL following the versioned or unversioned base URL that serves the API.\nQuery parameters that have not been used in processing the request MAY be omitted.\nIn particular, if no query parameters have been involved in processing the request, the query part of the URL MAY be excluded.\nExample: `/structures?filter=nelements=2`" } }, + "type": "object", + "required": [ + "representation" + ], + "title": "ResponseMetaQuery", "description": "Information on the query that was requested." }, "Species": { - "title": "Species", - "required": [ - "name", - "chemical_symbols", - "concentration" - ], - "type": "object", "properties": { "name": { - "title": "Name", "type": "string", - "description": "Gives the name of the species; the **name** value MUST be unique in the `species` list." + "title": "Name", + "description": "Gives the name of the species; the **name** value MUST be unique in the `species` list.", + "x-optimade-support": "must", + "x-optimade-queryable": "optional" }, "chemical_symbols": { - "title": "Chemical Symbols", - "type": "array", "items": { "type": "string" }, - "description": "MUST be a list of strings of all chemical elements composing this species. Each item of the list MUST be one of the following:\n\n- a valid chemical-element name, or\n- the special value `\"X\"` to represent a non-chemical element, or\n- the special value `\"vacancy\"` to represent that this site has a non-zero probability of having a vacancy (the respective probability is indicated in the `concentration` list, see below).\n\nIf any one entry in the `species` list has a `chemical_symbols` list that is longer than 1 element, the correct flag MUST be set in the list `structure_features`." + "type": "array", + "title": "Chemical Symbols", + "description": "MUST be a list of strings of all chemical elements composing this species. Each item of the list MUST be one of the following:\n\n- a valid chemical-element symbol, or\n- the special value `\"X\"` to represent a non-chemical element, or\n- the special value `\"vacancy\"` to represent that this site has a non-zero probability of having a vacancy (the respective probability is indicated in the `concentration` list, see below).\n\nIf any one entry in the `species` list has a `chemical_symbols` list that is longer than 1 element, the correct flag MUST be set in the list `structure_features`.", + "x-optimade-support": "must", + "x-optimade-queryable": "optional" }, "concentration": { - "title": "Concentration", - "type": "array", "items": { "type": "number" }, - "description": "MUST be a list of floats, with same length as `chemical_symbols`. The numbers represent the relative concentration of the corresponding chemical symbol in this species. The numbers SHOULD sum to one. Cases in which the numbers do not sum to one typically fall only in the following two categories:\n\n- Numerical errors when representing float numbers in fixed precision, e.g. for two chemical symbols with concentrations `1/3` and `2/3`, the concentration might look something like `[0.33333333333, 0.66666666666]`. If the client is aware that the sum is not one because of numerical precision, it can renormalize the values so that the sum is exactly one.\n- Experimental errors in the data present in the database. In this case, it is the responsibility of the client to decide how to process the data.\n\nNote that concentrations are uncorrelated between different site (even of the same species)." + "type": "array", + "title": "Concentration", + "description": "MUST be a list of floats, with same length as `chemical_symbols`. The numbers represent the relative concentration of the corresponding chemical symbol in this species. The numbers SHOULD sum to one. Cases in which the numbers do not sum to one typically fall only in the following two categories:\n\n- Numerical errors when representing float numbers in fixed precision, e.g. for two chemical symbols with concentrations `1/3` and `2/3`, the concentration might look something like `[0.33333333333, 0.66666666666]`. If the client is aware that the sum is not one because of numerical precision, it can renormalize the values so that the sum is exactly one.\n- Experimental errors in the data present in the database. In this case, it is the responsibility of the client to decide how to process the data.\n\nNote that concentrations are uncorrelated between different site (even of the same species).", + "x-optimade-support": "must", + "x-optimade-queryable": "optional" }, "mass": { - "title": "Mass", - "type": "array", "items": { "type": "number" }, - "description": "If present MUST be a list of floats expressed in a.m.u.\nElements denoting vacancies MUST have masses equal to 0." + "type": "array", + "title": "Mass", + "description": "If present MUST be a list of floats expressed in a.m.u.\nElements denoting vacancies MUST have masses equal to 0.", + "x-optimade-unit": "a.m.u.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "original_name": { - "title": "Original Name", "type": "string", - "description": "Can be any valid Unicode string, and SHOULD contain (if specified) the name of the species that is used internally in the source database.\n\nNote: With regards to \"source database\", we refer to the immediate source being queried via the OPTIMADE API implementation." + "title": "Original Name", + "description": "Can be any valid Unicode string, and SHOULD contain (if specified) the name of the species that is used internally in the source database.\n\nNote: With regards to \"source database\", we refer to the immediate source being queried via the OPTIMADE API implementation.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "attached": { - "title": "Attached", - "type": "array", "items": { "type": "string" }, - "description": "If provided MUST be a list of length 1 or more of strings of chemical symbols for the elements attached to this site, or \"X\" for a non-chemical element." + "type": "array", + "title": "Attached", + "description": "If provided MUST be a list of length 1 or more of strings of chemical symbols for the elements attached to this site, or \"X\" for a non-chemical element.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "nattached": { - "title": "Nattached", - "type": "array", "items": { "type": "integer" }, - "description": "If provided MUST be a list of length 1 or more of integers indicating the number of attached atoms of the kind specified in the value of the :field:`attached` key." + "type": "array", + "title": "Nattached", + "description": "If provided MUST be a list of length 1 or more of integers indicating the number of attached atoms of the kind specified in the value of the :field:`attached` key.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" } }, + "type": "object", + "required": [ + "name", + "chemical_symbols", + "concentration" + ], + "title": "Species", "description": "A list describing the species of the sites of this structure.\n\nSpecies can represent pure chemical elements, virtual-crystal atoms representing a\nstatistical occupation of a given site by multiple chemical elements, and/or a\nlocation to which there are attached atoms, i.e., atoms whose precise location are\nunknown beyond that they are attached to that position (frequently used to indicate\nhydrogen atoms attached to another element, e.g., a carbon with three attached\nhydrogens might represent a methyl group, -CH3).\n\n- **Examples**:\n - `[ {\"name\": \"Ti\", \"chemical_symbols\": [\"Ti\"], \"concentration\": [1.0]} ]`: any site with this species is occupied by a Ti atom.\n - `[ {\"name\": \"Ti\", \"chemical_symbols\": [\"Ti\", \"vacancy\"], \"concentration\": [0.9, 0.1]} ]`: any site with this species is occupied by a Ti atom with 90 % probability, and has a vacancy with 10 % probability.\n - `[ {\"name\": \"BaCa\", \"chemical_symbols\": [\"vacancy\", \"Ba\", \"Ca\"], \"concentration\": [0.05, 0.45, 0.5], \"mass\": [0.0, 137.327, 40.078]} ]`: any site with this species is occupied by a Ba atom with 45 % probability, a Ca atom with 50 % probability, and by a vacancy with 5 % probability. The mass of this site is (on average) 88.5 a.m.u.\n - `[ {\"name\": \"C12\", \"chemical_symbols\": [\"C\"], \"concentration\": [1.0], \"mass\": [12.0]} ]`: any site with this species is occupied by a carbon isotope with mass 12.\n - `[ {\"name\": \"C13\", \"chemical_symbols\": [\"C\"], \"concentration\": [1.0], \"mass\": [13.0]} ]`: any site with this species is occupied by a carbon isotope with mass 13.\n - `[ {\"name\": \"CH3\", \"chemical_symbols\": [\"C\"], \"concentration\": [1.0], \"attached\": [\"H\"], \"nattached\": [3]} ]`: any site with this species is occupied by a methyl group, -CH3, which is represented without specifying precise positions of the hydrogen atoms." }, "StructureFeatures": { - "title": "StructureFeatures", "enum": [ "disorder", "implicit_atoms", "site_attachments", "assemblies" ], + "title": "StructureFeatures", "description": "Enumeration of structure_features values" }, "StructureRelationship": { - "title": "StructureRelationship", - "type": "object", "properties": { "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/RelationshipLinks" } ], + "title": "Links", "description": "a links object containing at least one of the following: self, related" }, "data": { - "title": "Data", - "uniqueItems": true, "anyOf": [ { "$ref": "#/components/schemas/BaseRelationshipResource" }, { - "type": "array", "items": { "$ref": "#/components/schemas/BaseRelationshipResource" - } + }, + "type": "array" } ], + "uniqueItems": true, + "title": "Data", "description": "Resource linkage" }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object that contains non-standard meta-information about the relationship." } }, - "description": "Similar to normal JSON API relationship, but with addition of OPTIONAL meta field for a resource" + "type": "object", + "title": "StructureRelationship", + "description": "Similar to normal JSON API relationship, but with addition of OPTIONAL meta field for a resource." }, "StructureResource": { - "title": "StructureResource", - "required": [ - "id", - "type", - "attributes" - ], - "type": "object", "properties": { "id": { - "title": "Id", "type": "string", - "description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`" + "title": "Id", + "description": "An entry's ID as defined in section Definition of Terms.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n\n- **Examples**:\n - `\"db/1234567\"`\n - `\"cod/2000000\"`\n - `\"cod/2000000@1234567\"`\n - `\"nomad/L1234567890\"`\n - `\"42\"`", + "x-optimade-support": "must", + "x-optimade-queryable": "must" }, "type": { - "title": "Type", - "pattern": "^structures$", "type": "string", - "description": "The name of the type of an entry.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n - MUST be an existing entry type.\n - The entry of type `` and ID `` MUST be returned in response to a request for `//` under the versioned base URL.\n\n- **Examples**:\n - `\"structures\"`" + "pattern": "^structures$", + "title": "Type", + "description": "The name of the type of an entry.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response.\n - MUST be an existing entry type.\n - The entry of type `` and ID `` MUST be returned in response to a request for `//` under the versioned base URL.\n\n- **Examples**:\n - `\"structures\"`", + "default": "structures", + "x-optimade-support": "must", + "x-optimade-queryable": "must" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ResourceLinks" } ], + "title": "Links", "description": "a links object containing links related to the resource." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship." }, "attributes": { "$ref": "#/components/schemas/StructureResourceAttributes" }, "relationships": { - "title": "Relationships", "allOf": [ { "$ref": "#/components/schemas/EntryRelationships" } ], + "title": "Relationships", "description": "A dictionary containing references to other entries according to the description in section Relationships encoded as [JSON API Relationships](https://jsonapi.org/format/1.0/#document-resource-object-relationships).\nThe OPTIONAL human-readable description of the relationship MAY be provided in the `description` field inside the `meta` dictionary of the JSON API resource identifier object." } }, + "type": "object", + "required": [ + "id", + "type", + "attributes" + ], + "title": "StructureResource", "description": "Representing a structure." }, "StructureResourceAttributes": { - "title": "StructureResourceAttributes", - "required": [ - "last_modified", - "elements", - "nelements", - "elements_ratios", - "chemical_formula_descriptive", - "chemical_formula_reduced", - "chemical_formula_anonymous", - "dimension_types", - "nperiodic_dimensions", - "lattice_vectors", - "cartesian_site_positions", - "nsites", - "species", - "species_at_sites", - "structure_features" - ], - "type": "object", "properties": { "immutable_id": { - "title": "Immutable Id", "type": "string", - "description": "The entry's immutable ID (e.g., an UUID). This is important for databases having preferred IDs that point to \"the latest version\" of a record, but still offer access to older variants. This ID maps to the version-specific record, in case it changes in the future.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n\n- **Examples**:\n - `\"8bd3e750-b477-41a0-9b11-3a799f21b44f\"`\n - `\"fjeiwoj,54;@=%<>#32\"` (Strings that are not URL-safe are allowed.)" + "title": "Immutable Id", + "description": "The entry's immutable ID (e.g., an UUID). This is important for databases having preferred IDs that point to \"the latest version\" of a record, but still offer access to older variants. This ID maps to the version-specific record, in case it changes in the future.\n\n- **Type**: string.\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n\n- **Examples**:\n - `\"8bd3e750-b477-41a0-9b11-3a799f21b44f\"`\n - `\"fjeiwoj,54;@=%<>#32\"` (Strings that are not URL-safe are allowed.)", + "x-optimade-support": "optional", + "x-optimade-queryable": "must" }, "last_modified": { - "title": "Last Modified", "type": "string", - "description": "Date and time representing when the entry was last modified.\n\n- **Type**: timestamp.\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response unless the query parameter `response_fields` is present and does not include this property.\n\n- **Example**:\n - As part of JSON response format: `\"2007-04-05T14:30:20Z\"` (i.e., encoded as an [RFC 3339 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6) string.)", "format": "date-time", - "nullable": true + "title": "Last Modified", + "description": "Date and time representing when the entry was last modified.\n\n- **Type**: timestamp.\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - **Response**: REQUIRED in the response unless the query parameter `response_fields` is present and does not include this property.\n\n- **Example**:\n - As part of JSON response format: `\"2007-04-05T14:30:20Z\"` (i.e., encoded as an [RFC 3339 Internet Date/Time Format](https://tools.ietf.org/html/rfc3339#section-5.6) string.)", + "x-optimade-support": "should", + "nullable": true, + "x-optimade-queryable": "must" }, "elements": { - "title": "Elements", - "type": "array", "items": { "type": "string" }, - "description": "Symbols of the different elements present in the structure.\n\n- **Type**: list of strings.\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - The strings are the chemical symbols, i.e., either a single uppercase letter or an uppercase letter followed by a number of lowercase letters.\n - The order MUST be alphabetical.\n - MUST refer to the same elements in the same order, and therefore be of the same length, as `elements_ratios`, if the latter is provided.\n - Note: This property SHOULD NOT contain the string \"X\" to indicate non-chemical elements or \"vacancy\" to indicate vacancies (in contrast to the field `chemical_symbols` for the `species` property).\n\n- **Examples**:\n - `[\"Si\"]`\n - `[\"Al\",\"O\",\"Si\"]`\n\n- **Query examples**:\n - A filter that matches all records of structures that contain Si, Al **and** O, and possibly other elements: `elements HAS ALL \"Si\", \"Al\", \"O\"`.\n - To match structures with exactly these three elements, use `elements HAS ALL \"Si\", \"Al\", \"O\" AND elements LENGTH 3`.\n - Note: length queries on this property can be equivalently formulated by filtering on the `nelements`_ property directly.", - "nullable": true + "type": "array", + "title": "Elements", + "description": "The chemical symbols of the different elements present in the structure.\n\n- **Type**: list of strings.\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - The strings are the chemical symbols, i.e., either a single uppercase letter or an uppercase letter followed by a number of lowercase letters.\n - The order MUST be alphabetical.\n - MUST refer to the same elements in the same order, and therefore be of the same length, as `elements_ratios`, if the latter is provided.\n - Note: This property SHOULD NOT contain the string \"X\" to indicate non-chemical elements or \"vacancy\" to indicate vacancies (in contrast to the field `chemical_symbols` for the `species` property).\n\n- **Examples**:\n - `[\"Si\"]`\n - `[\"Al\",\"O\",\"Si\"]`\n\n- **Query examples**:\n - A filter that matches all records of structures that contain Si, Al **and** O, and possibly other elements: `elements HAS ALL \"Si\", \"Al\", \"O\"`.\n - To match structures with exactly these three elements, use `elements HAS ALL \"Si\", \"Al\", \"O\" AND elements LENGTH 3`.\n - Note: length queries on this property can be equivalently formulated by filtering on the `nelements`_ property directly.", + "x-optimade-support": "should", + "nullable": true, + "x-optimade-queryable": "must" }, "nelements": { - "title": "Nelements", "type": "integer", + "title": "Nelements", "description": "Number of different elements in the structure as an integer.\n\n- **Type**: integer\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - MUST be equal to the lengths of the list properties `elements` and `elements_ratios`, if they are provided.\n\n- **Examples**:\n - `3`\n\n- **Querying**:\n - Note: queries on this property can equivalently be formulated using `elements LENGTH`.\n - A filter that matches structures that have exactly 4 elements: `nelements=4`.\n - A filter that matches structures that have between 2 and 7 elements: `nelements>=2 AND nelements<=7`.", - "nullable": true + "x-optimade-support": "should", + "nullable": true, + "x-optimade-queryable": "must" }, "elements_ratios": { - "title": "Elements Ratios", - "type": "array", "items": { "type": "number" }, + "type": "array", + "title": "Elements Ratios", "description": "Relative proportions of different elements in the structure.\n\n- **Type**: list of floats\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - Composed by the proportions of elements in the structure as a list of floating point numbers.\n - The sum of the numbers MUST be 1.0 (within floating point accuracy)\n - MUST refer to the same elements in the same order, and therefore be of the same length, as `elements`, if the latter is provided.\n\n- **Examples**:\n - `[1.0]`\n - `[0.3333333333333333, 0.2222222222222222, 0.4444444444444444]`\n\n- **Query examples**:\n - Note: Useful filters can be formulated using the set operator syntax for correlated values.\n However, since the values are floating point values, the use of equality comparisons is generally inadvisable.\n - OPTIONAL: a filter that matches structures where approximately 1/3 of the atoms in the structure are the element Al is: `elements:elements_ratios HAS ALL \"Al\":>0.3333, \"Al\":<0.3334`.", - "nullable": true + "x-optimade-support": "should", + "nullable": true, + "x-optimade-queryable": "must" }, "chemical_formula_descriptive": { - "title": "Chemical Formula Descriptive", "type": "string", + "title": "Chemical Formula Descriptive", "description": "The chemical formula for a structure as a string in a form chosen by the API implementation.\n\n- **Type**: string\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - The chemical formula is given as a string consisting of properly capitalized element symbols followed by integers or decimal numbers, balanced parentheses, square, and curly brackets `(`,`)`, `[`,`]`, `{`, `}`, commas, the `+`, `-`, `:` and `=` symbols. The parentheses are allowed to be followed by a number. Spaces are allowed anywhere except within chemical symbols. The order of elements and any groupings indicated by parentheses or brackets are chosen freely by the API implementation.\n - The string SHOULD be arithmetically consistent with the element ratios in the `chemical_formula_reduced` property.\n - It is RECOMMENDED, but not mandatory, that symbols, parentheses and brackets, if used, are used with the meanings prescribed by [IUPAC's Nomenclature of Organic Chemistry](https://www.qmul.ac.uk/sbcs/iupac/bibliog/blue.html).\n\n- **Examples**:\n - `\"(H2O)2 Na\"`\n - `\"NaCl\"`\n - `\"CaCO3\"`\n - `\"CCaO3\"`\n - `\"(CH3)3N+ - [CH2]2-OH = Me3N+ - CH2 - CH2OH\"`\n\n- **Query examples**:\n - Note: the free-form nature of this property is likely to make queries on it across different databases inconsistent.\n - A filter that matches an exactly given formula: `chemical_formula_descriptive=\"(H2O)2 Na\"`.\n - A filter that does a partial match: `chemical_formula_descriptive CONTAINS \"H2O\"`.", - "nullable": true + "x-optimade-support": "should", + "nullable": true, + "x-optimade-queryable": "must" }, "chemical_formula_reduced": { - "title": "Chemical Formula Reduced", - "pattern": "^([A-Z][a-z]?\\d*)*$", "type": "string", + "pattern": "(^$)|^([A-Z][a-z]?([2-9]|[1-9]\\d+)?)+$", + "title": "Chemical Formula Reduced", "description": "The reduced chemical formula for a structure as a string with element symbols and integer chemical proportion numbers.\nThe proportion number MUST be omitted if it is 1.\n\n- **Type**: string\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property.\n However, support for filters using partial string matching with this property is OPTIONAL (i.e., BEGINS WITH, ENDS WITH, and CONTAINS).\n Intricate queries on formula components are instead suggested to be formulated using set-type filter operators on the multi valued `elements` and `elements_ratios` properties.\n - Element symbols MUST have proper capitalization (e.g., `\"Si\"`, not `\"SI\"` for \"silicon\").\n - Elements MUST be placed in alphabetical order, followed by their integer chemical proportion number.\n - For structures with no partial occupation, the chemical proportion numbers are the smallest integers for which the chemical proportion is exactly correct.\n - For structures with partial occupation, the chemical proportion numbers are integers that within reasonable approximation indicate the correct chemical proportions. The precise details of how to perform the rounding is chosen by the API implementation.\n - No spaces or separators are allowed.\n\n- **Examples**:\n - `\"H2NaO\"`\n - `\"ClNa\"`\n - `\"CCaO3\"`\n\n- **Query examples**:\n - A filter that matches an exactly given formula is `chemical_formula_reduced=\"H2NaO\"`.", - "nullable": true + "x-optimade-support": "should", + "nullable": true, + "x-optimade-queryable": "must" }, "chemical_formula_hill": { - "title": "Chemical Formula Hill", - "pattern": "^([A-Z][a-z]?\\d*)*$", "type": "string", - "description": "The chemical formula for a structure in [Hill form](https://dx.doi.org/10.1021/ja02046a005) with element symbols followed by integer chemical proportion numbers. The proportion number MUST be omitted if it is 1.\n\n- **Type**: string\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n If supported, only a subset of the filter features MAY be supported.\n - The overall scale factor of the chemical proportions is chosen such that the resulting values are integers that indicate the most chemically relevant unit of which the system is composed.\n For example, if the structure is a repeating unit cell with four hydrogens and four oxygens that represents two hydroperoxide molecules, `chemical_formula_hill` is `\"H2O2\"` (i.e., not `\"HO\"`, nor `\"H4O4\"`).\n - If the chemical insight needed to ascribe a Hill formula to the system is not present, the property MUST be handled as unset.\n - Element symbols MUST have proper capitalization (e.g., `\"Si\"`, not `\"SI\"` for \"silicon\").\n - Elements MUST be placed in [Hill order](https://dx.doi.org/10.1021/ja02046a005), followed by their integer chemical proportion number.\n Hill order means: if carbon is present, it is placed first, and if also present, hydrogen is placed second.\n After that, all other elements are ordered alphabetically.\n If carbon is not present, all elements are ordered alphabetically.\n - If the system has sites with partial occupation and the total occupations of each element do not all sum up to integers, then the Hill formula SHOULD be handled as unset.\n - No spaces or separators are allowed.\n\n- **Examples**:\n - `\"H2O2\"`\n\n- **Query examples**:\n - A filter that matches an exactly given formula is `chemical_formula_hill=\"H2O2\"`." + "pattern": "(^$)|^([A-Z][a-z]?([2-9]|[1-9]\\d+)?)+$", + "title": "Chemical Formula Hill", + "description": "The chemical formula for a structure in [Hill form](https://dx.doi.org/10.1021/ja02046a005) with element symbols followed by integer chemical proportion numbers. The proportion number MUST be omitted if it is 1.\n\n- **Type**: string\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n If supported, only a subset of the filter features MAY be supported.\n - The overall scale factor of the chemical proportions is chosen such that the resulting values are integers that indicate the most chemically relevant unit of which the system is composed.\n For example, if the structure is a repeating unit cell with four hydrogens and four oxygens that represents two hydroperoxide molecules, `chemical_formula_hill` is `\"H2O2\"` (i.e., not `\"HO\"`, nor `\"H4O4\"`).\n - If the chemical insight needed to ascribe a Hill formula to the system is not present, the property MUST be handled as unset.\n - Element symbols MUST have proper capitalization (e.g., `\"Si\"`, not `\"SI\"` for \"silicon\").\n - Elements MUST be placed in [Hill order](https://dx.doi.org/10.1021/ja02046a005), followed by their integer chemical proportion number.\n Hill order means: if carbon is present, it is placed first, and if also present, hydrogen is placed second.\n After that, all other elements are ordered alphabetically.\n If carbon is not present, all elements are ordered alphabetically.\n - If the system has sites with partial occupation and the total occupations of each element do not all sum up to integers, then the Hill formula SHOULD be handled as unset.\n - No spaces or separators are allowed.\n\n- **Examples**:\n - `\"H2O2\"`\n\n- **Query examples**:\n - A filter that matches an exactly given formula is `chemical_formula_hill=\"H2O2\"`.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "chemical_formula_anonymous": { - "title": "Chemical Formula Anonymous", - "pattern": "^([A-Z][a-z]?\\d*)*$", "type": "string", + "pattern": "(^$)|^([A-Z][a-z]?([2-9]|[1-9]\\d+)?)+$", + "title": "Chemical Formula Anonymous", "description": "The anonymous formula is the `chemical_formula_reduced`, but where the elements are instead first ordered by their chemical proportion number, and then, in order left to right, replaced by anonymous symbols A, B, C, ..., Z, Aa, Ba, ..., Za, Ab, Bb, ... and so on.\n\n- **Type**: string\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property.\n However, support for filters using partial string matching with this property is OPTIONAL (i.e., BEGINS WITH, ENDS WITH, and CONTAINS).\n\n- **Examples**:\n - `\"A2B\"`\n - `\"A42B42C16D12E10F9G5\"`\n\n- **Querying**:\n - A filter that matches an exactly given formula is `chemical_formula_anonymous=\"A2B\"`.", - "nullable": true + "x-optimade-support": "should", + "nullable": true, + "x-optimade-queryable": "must" }, "dimension_types": { - "title": "Dimension Types", - "maxItems": 3, - "minItems": 3, - "type": "array", "items": { "$ref": "#/components/schemas/Periodicity" }, + "type": "array", + "maxItems": 3, + "minItems": 3, + "title": "Dimension Types", "description": "List of three integers.\nFor each of the three directions indicated by the three lattice vectors (see property `lattice_vectors`), this list indicates if the direction is periodic (value `1`) or non-periodic (value `0`).\nNote: the elements in this list each refer to the direction of the corresponding entry in `lattice_vectors` and *not* the Cartesian x, y, z directions.\n\n- **Type**: list of integers.\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n - MUST be a list of length 3.\n - Each integer element MUST assume only the value 0 or 1.\n\n- **Examples**:\n - For a molecule: `[0, 0, 0]`\n - For a wire along the direction specified by the third lattice vector: `[0, 0, 1]`\n - For a 2D surface/slab, periodic on the plane defined by the first and third lattice vectors: `[1, 0, 1]`\n - For a bulk 3D system: `[1, 1, 1]`", - "nullable": true + "x-optimade-support": "should", + "nullable": true, + "x-optimade-queryable": "optional" }, "nperiodic_dimensions": { - "title": "Nperiodic Dimensions", "type": "integer", + "title": "Nperiodic Dimensions", "description": "An integer specifying the number of periodic dimensions in the structure, equivalent to the number of non-zero entries in `dimension_types`.\n\n- **Type**: integer\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n - The integer value MUST be between 0 and 3 inclusive and MUST be equal to the sum of the items in the `dimension_types` property.\n - This property only reflects the treatment of the lattice vectors provided for the structure, and not any physical interpretation of the dimensionality of its contents.\n\n- **Examples**:\n - `2` should be indicated in cases where `dimension_types` is any of `[1, 1, 0]`, `[1, 0, 1]`, `[0, 1, 1]`.\n\n- **Query examples**:\n - Match only structures with exactly 3 periodic dimensions: `nperiodic_dimensions=3`\n - Match all structures with 2 or fewer periodic dimensions: `nperiodic_dimensions<=2`", - "nullable": true + "x-optimade-support": "should", + "nullable": true, + "x-optimade-queryable": "must" }, "lattice_vectors": { - "title": "Lattice Vectors", - "maxItems": 3, - "minItems": 3, - "type": "array", "items": { - "type": "array", "items": { "type": "number" }, - "minItems": 3, - "maxItems": 3 + "type": "array", + "maxItems": 3, + "minItems": 3 }, + "type": "array", + "maxItems": 3, + "minItems": 3, + "title": "Lattice Vectors", "description": "The three lattice vectors in Cartesian coordinates, in \u00e5ngstr\u00f6m (\u00c5).\n\n- **Type**: list of list of floats or unknown values.\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n If supported, filters MAY support only a subset of comparison operators.\n - MUST be a list of three vectors *a*, *b*, and *c*, where each of the vectors MUST BE a list of the vector's coordinates along the x, y, and z Cartesian coordinates.\n (Therefore, the first index runs over the three lattice vectors and the second index runs over the x, y, z Cartesian coordinates).\n - For databases that do not define an absolute Cartesian system (e.g., only defining the length and angles between vectors), the first lattice vector SHOULD be set along *x* and the second on the *xy*-plane.\n - MUST always contain three vectors of three coordinates each, independently of the elements of property `dimension_types`.\n The vectors SHOULD by convention be chosen so the determinant of the `lattice_vectors` matrix is different from zero.\n The vectors in the non-periodic directions have no significance beyond fulfilling these requirements.\n - The coordinates of the lattice vectors of non-periodic dimensions (i.e., those dimensions for which `dimension_types` is `0`) MAY be given as a list of all `null` values.\n If a lattice vector contains the value `null`, all coordinates of that lattice vector MUST be `null`.\n\n- **Examples**:\n - `[[4.0,0.0,0.0],[0.0,4.0,0.0],[0.0,1.0,4.0]]` represents a cell, where the first vector is `(4, 0, 0)`, i.e., a vector aligned along the `x` axis of length 4 \u00c5; the second vector is `(0, 4, 0)`; and the third vector is `(0, 1, 4)`.", - "nullable": true + "x-optimade-support": "should", + "nullable": true, + "x-optimade-unit": "\u00c5", + "x-optimade-queryable": "optional" }, - "cartesian_site_positions": { - "title": "Cartesian Site Positions", + "space_group_symmetry_operations_xyz": { + "items": { + "type": "string", + "pattern": "^([-+]?[xyz]([-+][xyz])?([-+](1/2|[12]/3|[1-3]/4|[1-5]/6))?|[-+]?(1/2|[12]/3|[1-3]/4|[1-5]/6)([-+][xyz]([-+][xyz])?)?),([-+]?[xyz]([-+][xyz])?([-+](1/2|[12]/3|[1-3]/4|[1-5]/6))?|[-+]?(1/2|[12]/3|[1-3]/4|[1-5]/6)([-+][xyz]([-+][xyz])?)?),([-+]?[xyz]([-+][xyz])?([-+](1/2|[12]/3|[1-3]/4|[1-5]/6))?|[-+]?(1/2|[12]/3|[1-3]/4|[1-5]/6)([-+][xyz]([-+][xyz])?)?)$" + }, "type": "array", + "title": "Space Group Symmetry Operations Xyz", + "description": "A list of symmetry operations given as general position x, y and z coordinates in algebraic form.\n\nEach symmetry operation is described by a string that gives that symmetry operation in Jones' faithful representation (Bradley & Cracknell, 1972: pp. 35-37), adapted for computer string notation.\nThe letters x, y and z that are typesetted with overbars in printed text represent coordinate values multiplied by -1 and are encoded as -x, -y and -z, respectively.\nThe syntax of the strings representing symmetry operations MUST conform to regular expressions given in appendix The Symmetry Operation String Regular Expressions.\nThe interpretation of the strings MUST follow the conventions of the IUCr CIF core dictionary (IUCr, 2023).\nIn particular, this property MUST explicitly provide all symmetry operations needed to generate all the atoms in the unit cell from the atoms in the asymmetric unit, for the setting used.\nThis symmetry operation set MUST always include the `\"x,y,z\"` identity operation.\nThe symmetry operations are to be applied to fractional atom coordinates.\nIn case only Cartesian coordinates are available, these Cartesian coordinates must be converted to fractional coordinates before the application of the provided symmetry operations.\nIf the symmetry operation list is present, it MUST be compatible with other space group specifications (e.g. the ITC space group number, the Hall symbol, the Hermann-Mauguin symbol) if these are present.\n\n- **Type**: list of strings\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n\n - The property is RECOMMENDED if coordinates are returned in a form to which these operations can or must be applied (e.g. fractional atom coordinates of an asymmetric unit).\n - The property is REQUIRED if symmetry operations are necessary to reconstruct the full model of the material and no other symmetry information (e.g., the Hall symbol) is provided that would allow the user to derive symmetry operations unambiguously.\n - MUST be null if `nperiodic_dimensions` is equal to 0.\n\n- **Examples**:\n\n - Space group operations for the space group with ITC number 3 (H-M symbol `P 2`, extended H-M symbol `P 1 2 1`, Hall symbol `P 2y`): `[\"x,y,z\", \"-x,y,-z\"]`\n - Space group operations for the space group with ITC number 5 (H-M symbol `C 2`, extended H-M symbol `C 1 2 1`, Hall symbol `C 2y`): `[\"x,y,z\", \"-x,y,-z\", \"x+1/2,y+1/2,z\", \"-x+1/2,y+1/2,-z\"]`\n\n- **Notes**:\n The list of space group symmetry operations applies to the whole periodic array of atoms and together with the lattice translations given in the `lattice_vectors` property provides the necessary information to reconstruct all atom site positions of the periodic material.\n Thus, the symmetry operations described in this property are only applicable to material models with at least one periodic dimension.\n This property is not meant to represent arbitrary symmetries of molecules, non-periodic (finite) collections of atoms or non-crystallographic symmetry.\n\n- **Bibliographic References**:\n\n Bradley, C. J. and Cracknell, A. P. (1972) The Mathematical Theory of Symmetry in Solids. Oxford, Clarendon Press (paperback edition 2010) 745 p. ISBN 978-0-19-958258-7.\n\n IUCr (2023) Core dictionary (coreCIF) version 2.4.5; data name _space_group_symop_operation_xyz. Available from: https://www.iucr.org/__data/iucr/cifdic_html/1/cif_core.dic/Ispace_group_symop_operation_xyz.html [Accessed 2023-06-18T16:46+03:00].", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" + }, + "space_group_symbol_hall": { + "type": "string", + "title": "Space Group Symbol Hall", + "description": "A Hall space group symbol representing the symmetry of the structure as defined in (Hall, 1981, 1981a).\n\n- **Type**: string\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n - The change-of-basis operations are used as defined in the International Tables of Crystallography (ITC) Vol. B, Sect. 1.4, Appendix A1.4.2 (IUCr, 2001).\n - Each component of the Hall symbol MUST be separated by a single space symbol.\n - If there exists a standard Hall symbol which represents the symmetry it SHOULD be used.\n - MUST be null if `nperiodic_dimensions` is not equal to 3.\n\n- **Examples**:\n\n - Space group symbols with explicit origin (the Hall symbols):\n\n - `P 2c -2ac`\n - `-I 4bd 2ab 3`\n\n - Space group symbols with change-of-basis operations:\n\n - `P 2yb (-1/2*x+z,1/2*x,y)`\n - `-I 4 2 (1/2*x+1/2*y,-1/2*x+1/2*y,z)`\n\n- **Bibliographic References**:\n\n Hall, S. R. (1981) Space-group notation with an explicit origin. Acta Crystallographica Section A, 37, 517-525, International Union of Crystallography (IUCr), DOI: https://doi.org/10.1107/s0567739481001228\n\n Hall, S. R. (1981a) Space-group notation with an explicit origin; erratum. Acta Crystallographica Section A, 37, 921-921, International Union of Crystallography (IUCr), DOI: https://doi.org/10.1107/s0567739481001976\n\n IUCr (2001). International Tables for Crystallography vol. B. Reciprocal Space. Ed. U. Shmueli. 2-nd edition. Dordrecht/Boston/London, Kluwer Academic Publishers.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" + }, + "space_group_symbol_hermann_mauguin": { + "type": "string", + "title": "Space Group Symbol Hermann Mauguin", + "description": "A human- and machine-readable string containing the short Hermann-Mauguin (H-M) symbol which specifies the space group of the structure in the response.\n- **Type**: string\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n - The H-M symbol SHOULD aim to convey the closest representation of the symmetry information that can be specified using the short format used in the International Tables for Crystallography vol. A (IUCr, 2005), Table 4.3.2.1 as described in the accompanying text.\n - The symbol MAY be a non-standard short H-M symbol.\n - The H-M symbol does not unambiguously communicate the axis, cell, and origin choice, and the given symbol SHOULD NOT be amended to convey this information.\n - To encode as character strings, the following adaptations MUST be made when representing H-M symbols given in their typesetted form:\n\n - the overbar above the numbers MUST be changed to the minus sign in front of the digit (e.g. '-2');\n - subscripts that denote screw axes are written as digits immediately after the axis designator without a space (e.g. 'P 32')\n - the space group generators MUST be separated by a single space (e.g. 'P 21 21 2');\n - there MUST be no spaces in the space group generator designation (i.e. use 'P 21/m', not the 'P 21 / m');\n\n- **Examples**:\n - `C 2`\n - `P 21 21 21`\n\n- **Bibliographic References**:\n\n IUCr (2005). International Tables for Crystallography vol. A. Space-Group Symmetry. Ed. Theo Hahn. 5-th edition. Dordrecht, Springer.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" + }, + "space_group_symbol_hermann_mauguin_extended": { + "type": "string", + "title": "Space Group Symbol Hermann Mauguin Extended", + "description": "A human- and machine-readable string containing the extended Hermann-Mauguin (H-M) symbol which specifies the space group of the structure in the response.\n\n- **Type**: string\n- **Requirements/Conventions**:\n\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n - The H-M symbols SHOULD be given as specified in the International Tables for Crystallography vol. A (IUCr, 2005), Table 4.3.2.1.\n - The change-of-basis operation SHOULD be provided for the non-standard axis and cell choices.\n - The extended H-M symbol does not unambiguously communicate the origin choice, and the given symbol SHOULD NOT be amended to convey this information.\n - The description of the change-of-basis SHOULD follow conventions of the ITC Vol. B, Sect. 1.4, Appendix A1.4.2 (IUCr, 2001).\n - The same character string encoding conventions MUST be used as for the specification of the `space_group_symbol_hermann_mauguin` property.\n\n- **Examples**:\n\n - `C 1 2 1`\n\n- **Bibliographic References**:\n\n IUCr (2001). International Tables for Crystallography vol. B. Reciprocal Space. Ed. U. Shmueli. 2-nd edition. Dordrecht/Boston/London, Kluwer Academic Publishers.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" + }, + "space_group_it_number": { + "type": "integer", + "maximum": 230.0, + "minimum": 1.0, + "title": "Space Group It Number", + "description": "Space group number for the structure assigned by the International Tables for Crystallography Vol. A.\n- **Type**: integer\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n - The integer value MUST be between 1 and 230.\n - MUST be null if `nperiodic_dimensions` is not equal to 3.", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" + }, + "cartesian_site_positions": { "items": { - "type": "array", "items": { "type": "number" }, - "minItems": 3, - "maxItems": 3 + "type": "array", + "maxItems": 3, + "minItems": 3 }, + "type": "array", + "title": "Cartesian Site Positions", "description": "Cartesian positions of each site in the structure.\nA site is usually used to describe positions of atoms; what atoms can be encountered at a given site is conveyed by the `species_at_sites` property, and the species themselves are described in the `species` property.\n\n- **Type**: list of list of floats\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n If supported, filters MAY support only a subset of comparison operators.\n - It MUST be a list of length equal to the number of sites in the structure, where every element is a list of the three Cartesian coordinates of a site expressed as float values in the unit angstrom (\u00c5).\n - An entry MAY have multiple sites at the same Cartesian position (for a relevant use of this, see e.g., the property `assemblies`).\n\n- **Examples**:\n - `[[0,0,0],[0,0,2]]` indicates a structure with two sites, one sitting at the origin and one along the (positive) *z*-axis, 2 \u00c5 away from the origin.", - "nullable": true + "x-optimade-support": "should", + "nullable": true, + "x-optimade-unit": "\u00c5", + "x-optimade-queryable": "optional" }, "nsites": { - "title": "Nsites", "type": "integer", + "title": "Nsites", "description": "An integer specifying the length of the `cartesian_site_positions` property.\n\n- **Type**: integer\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: MUST be a queryable property with support for all mandatory filter features.\n\n- **Examples**:\n - `42`\n\n- **Query examples**:\n - Match only structures with exactly 4 sites: `nsites=4`\n - Match structures that have between 2 and 7 sites: `nsites>=2 AND nsites<=7`", - "nullable": true + "x-optimade-support": "should", + "nullable": true, + "x-optimade-queryable": "must" }, "species": { - "title": "Species", - "type": "array", "items": { "$ref": "#/components/schemas/Species" }, + "type": "array", + "title": "Species", "description": "A list describing the species of the sites of this structure.\nSpecies can represent pure chemical elements, virtual-crystal atoms representing a statistical occupation of a given site by multiple chemical elements, and/or a location to which there are attached atoms, i.e., atoms whose precise location are unknown beyond that they are attached to that position (frequently used to indicate hydrogen atoms attached to another element, e.g., a carbon with three attached hydrogens might represent a methyl group, -CH3).\n\n- **Type**: list of dictionary with keys:\n - `name`: string (REQUIRED)\n - `chemical_symbols`: list of strings (REQUIRED)\n - `concentration`: list of float (REQUIRED)\n - `attached`: list of strings (REQUIRED)\n - `nattached`: list of integers (OPTIONAL)\n - `mass`: list of floats (OPTIONAL)\n - `original_name`: string (OPTIONAL).\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n If supported, filters MAY support only a subset of comparison operators.\n - Each list member MUST be a dictionary with the following keys:\n - **name**: REQUIRED; gives the name of the species; the **name** value MUST be unique in the `species` list;\n - **chemical_symbols**: REQUIRED; MUST be a list of strings of all chemical elements composing this species.\n Each item of the list MUST be one of the following:\n - a valid chemical-element symbol, or\n - the special value `\"X\"` to represent a non-chemical element, or\n - the special value `\"vacancy\"` to represent that this site has a non-zero probability of having a vacancy (the respective probability is indicated in the `concentration` list, see below).\n\n If any one entry in the `species` list has a `chemical_symbols` list that is longer than 1 element, the correct flag MUST be set in the list `structure_features`.\n\n - **concentration**: REQUIRED; MUST be a list of floats, with same length as `chemical_symbols`.\n The numbers represent the relative concentration of the corresponding chemical symbol in this species.\n The numbers SHOULD sum to one. Cases in which the numbers do not sum to one typically fall only in the following two categories:\n\n - Numerical errors when representing float numbers in fixed precision, e.g. for two chemical symbols with concentrations `1/3` and `2/3`, the concentration might look something like `[0.33333333333, 0.66666666666]`. If the client is aware that the sum is not one because of numerical precision, it can renormalize the values so that the sum is exactly one.\n - Experimental errors in the data present in the database. In this case, it is the responsibility of the client to decide how to process the data.\n\n Note that concentrations are uncorrelated between different sites (even of the same species).\n\n - **attached**: OPTIONAL; if provided MUST be a list of length 1 or more of strings of chemical symbols for the elements attached to this site, or \"X\" for a non-chemical element.\n\n - **nattached**: OPTIONAL; if provided MUST be a list of length 1 or more of integers indicating the number of attached atoms of the kind specified in the value of the `attached` key.\n\n The implementation MUST include either both or none of the `attached` and `nattached` keys, and if they are provided, they MUST be of the same length.\n Furthermore, if they are provided, the `structure_features` property MUST include the string `site_attachments`.\n\n - **mass**: OPTIONAL. If present MUST be a list of floats, with the same length as `chemical_symbols`, providing element masses expressed in a.m.u.\n Elements denoting vacancies MUST have masses equal to 0.\n\n - **original_name**: OPTIONAL. Can be any valid Unicode string, and SHOULD contain (if specified) the name of the species that is used internally in the source database.\n\n Note: With regards to \"source database\", we refer to the immediate source being queried via the OPTIMADE API implementation.\n\n The main use of this field is for source databases that use species names, containing characters that are not allowed (see description of the list property `species_at_sites`).\n\n - For systems that have only species formed by a single chemical symbol, and that have at most one species per chemical symbol, SHOULD use the chemical symbol as species name (e.g., `\"Ti\"` for titanium, `\"O\"` for oxygen, etc.)\n However, note that this is OPTIONAL, and client implementations MUST NOT assume that the key corresponds to a chemical symbol, nor assume that if the species name is a valid chemical symbol, that it represents a species with that chemical symbol.\n This means that a species `{\"name\": \"C\", \"chemical_symbols\": [\"Ti\"], \"concentration\": [1.0]}` is valid and represents a titanium species (and *not* a carbon species).\n - It is NOT RECOMMENDED that a structure includes species that do not have at least one corresponding site.\n\n- **Examples**:\n - `[ {\"name\": \"Ti\", \"chemical_symbols\": [\"Ti\"], \"concentration\": [1.0]} ]`: any site with this species is occupied by a Ti atom.\n - `[ {\"name\": \"Ti\", \"chemical_symbols\": [\"Ti\", \"vacancy\"], \"concentration\": [0.9, 0.1]} ]`: any site with this species is occupied by a Ti atom with 90 % probability, and has a vacancy with 10 % probability.\n - `[ {\"name\": \"BaCa\", \"chemical_symbols\": [\"vacancy\", \"Ba\", \"Ca\"], \"concentration\": [0.05, 0.45, 0.5], \"mass\": [0.0, 137.327, 40.078]} ]`: any site with this species is occupied by a Ba atom with 45 % probability, a Ca atom with 50 % probability, and by a vacancy with 5 % probability. The mass of this site is (on average) 88.5 a.m.u.\n - `[ {\"name\": \"C12\", \"chemical_symbols\": [\"C\"], \"concentration\": [1.0], \"mass\": [12.0]} ]`: any site with this species is occupied by a carbon isotope with mass 12.\n - `[ {\"name\": \"C13\", \"chemical_symbols\": [\"C\"], \"concentration\": [1.0], \"mass\": [13.0]} ]`: any site with this species is occupied by a carbon isotope with mass 13.\n - `[ {\"name\": \"CH3\", \"chemical_symbols\": [\"C\"], \"concentration\": [1.0], \"attached\": [\"H\"], \"nattached\": [3]} ]`: any site with this species is occupied by a methyl group, -CH3, which is represented without specifying precise positions of the hydrogen atoms.", - "nullable": true + "x-optimade-support": "should", + "nullable": true, + "x-optimade-queryable": "optional" }, "species_at_sites": { - "title": "Species At Sites", - "type": "array", "items": { "type": "string" }, + "type": "array", + "title": "Species At Sites", "description": "Name of the species at each site (where values for sites are specified with the same order of the property `cartesian_site_positions`).\nThe properties of the species are found in the property `species`.\n\n- **Type**: list of strings.\n\n- **Requirements/Conventions**:\n - **Support**: SHOULD be supported by all implementations, i.e., SHOULD NOT be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n If supported, filters MAY support only a subset of comparison operators.\n - MUST have length equal to the number of sites in the structure (first dimension of the list property `cartesian_site_positions`).\n - Each species name mentioned in the `species_at_sites` list MUST be described in the list property `species` (i.e. for each value in the `species_at_sites` list there MUST exist exactly one dictionary in the `species` list with the `name` attribute equal to the corresponding `species_at_sites` value).\n - Each site MUST be associated only to a single species.\n **Note**: However, species can represent mixtures of atoms, and multiple species MAY be defined for the same chemical element.\n This latter case is useful when different atoms of the same type need to be grouped or distinguished, for instance in simulation codes to assign different initial spin states.\n\n- **Examples**:\n - `[\"Ti\",\"O2\"]` indicates that the first site is hosting a species labeled `\"Ti\"` and the second a species labeled `\"O2\"`.\n - `[\"Ac\", \"Ac\", \"Ag\", \"Ir\"]` indicating the first two sites contains the `\"Ac\"` species, while the third and fourth sites contain the `\"Ag\"` and `\"Ir\"` species, respectively.", - "nullable": true + "x-optimade-support": "should", + "nullable": true, + "x-optimade-queryable": "optional" }, "assemblies": { - "title": "Assemblies", - "type": "array", "items": { "$ref": "#/components/schemas/Assembly" }, - "description": "A description of groups of sites that are statistically correlated.\n\n- **Type**: list of dictionary with keys:\n - `sites_in_groups`: list of list of integers (REQUIRED)\n - `group_probabilities`: list of floats (REQUIRED)\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n If supported, filters MAY support only a subset of comparison operators.\n - The property SHOULD be `null` for entries that have no partial occupancies.\n - If present, the correct flag MUST be set in the list `structure_features`.\n - Client implementations MUST check its presence (as its presence changes the interpretation of the structure).\n - If present, it MUST be a list of dictionaries, each of which represents an assembly and MUST have the following two keys:\n - **sites_in_groups**: Index of the sites (0-based) that belong to each group for each assembly.\n\n Example: `[[1], [2]]`: two groups, one with the second site, one with the third.\n Example: `[[1,2], [3]]`: one group with the second and third site, one with the fourth.\n\n - **group_probabilities**: Statistical probability of each group. It MUST have the same length as `sites_in_groups`.\n It SHOULD sum to one.\n See below for examples of how to specify the probability of the occurrence of a vacancy.\n The possible reasons for the values not to sum to one are the same as already specified above for the `concentration` of each `species`.\n\n - If a site is not present in any group, it means that it is present with 100 % probability (as if no assembly was specified).\n - A site MUST NOT appear in more than one group.\n\n- **Examples** (for each entry of the assemblies list):\n - `{\"sites_in_groups\": [[0], [1]], \"group_probabilities: [0.3, 0.7]}`: the first site and the second site never occur at the same time in the unit cell.\n Statistically, 30 % of the times the first site is present, while 70 % of the times the second site is present.\n - `{\"sites_in_groups\": [[1,2], [3]], \"group_probabilities: [0.3, 0.7]}`: the second and third site are either present together or not present; they form the first group of atoms for this assembly.\n The second group is formed by the fourth site.\n Sites of the first group (the second and the third) are never present at the same time as the fourth site.\n 30 % of times sites 1 and 2 are present (and site 3 is absent); 70 % of times site 3 is present (and sites 1 and 2 are absent).\n\n- **Notes**:\n - Assemblies are essential to represent, for instance, the situation where an atom can statistically occupy two different positions (sites).\n\n - By defining groups, it is possible to represent, e.g., the case where a functional molecule (and not just one atom) is either present or absent (or the case where it it is present in two conformations)\n\n - Considerations on virtual alloys and on vacancies: In the special case of a virtual alloy, these specifications allow two different, equivalent ways of specifying them.\n For instance, for a site at the origin with 30 % probability of being occupied by Si, 50 % probability of being occupied by Ge, and 20 % of being a vacancy, the following two representations are possible:\n\n - Using a single species:\n ```json\n {\n \"cartesian_site_positions\": [[0,0,0]],\n \"species_at_sites\": [\"SiGe-vac\"],\n \"species\": [\n {\n \"name\": \"SiGe-vac\",\n \"chemical_symbols\": [\"Si\", \"Ge\", \"vacancy\"],\n \"concentration\": [0.3, 0.5, 0.2]\n }\n ]\n // ...\n }\n ```\n\n - Using multiple species and the assemblies:\n ```json\n {\n \"cartesian_site_positions\": [ [0,0,0], [0,0,0], [0,0,0] ],\n \"species_at_sites\": [\"Si\", \"Ge\", \"vac\"],\n \"species\": [\n { \"name\": \"Si\", \"chemical_symbols\": [\"Si\"], \"concentration\": [1.0] },\n { \"name\": \"Ge\", \"chemical_symbols\": [\"Ge\"], \"concentration\": [1.0] },\n { \"name\": \"vac\", \"chemical_symbols\": [\"vacancy\"], \"concentration\": [1.0] }\n ],\n \"assemblies\": [\n {\n \"sites_in_groups\": [ [0], [1], [2] ],\n \"group_probabilities\": [0.3, 0.5, 0.2]\n }\n ]\n // ...\n }\n ```\n\n - It is up to the database provider to decide which representation to use, typically depending on the internal format in which the structure is stored.\n However, given a structure identified by a unique ID, the API implementation MUST always provide the same representation for it.\n\n - The probabilities of occurrence of different assemblies are uncorrelated.\n So, for instance in the following case with two assemblies:\n ```json\n {\n \"assemblies\": [\n {\n \"sites_in_groups\": [ [0], [1] ],\n \"group_probabilities\": [0.2, 0.8],\n },\n {\n \"sites_in_groups\": [ [2], [3] ],\n \"group_probabilities\": [0.3, 0.7]\n }\n ]\n }\n ```\n\n Site 0 is present with a probability of 20 % and site 1 with a probability of 80 %. These two sites are correlated (either site 0 or 1 is present). Similarly, site 2 is present with a probability of 30 % and site 3 with a probability of 70 %.\n These two sites are correlated (either site 2 or 3 is present).\n However, the presence or absence of sites 0 and 1 is not correlated with the presence or absence of sites 2 and 3 (in the specific example, the pair of sites (0, 2) can occur with 0.2*0.3 = 6 % probability; the pair (0, 3) with 0.2*0.7 = 14 % probability; the pair (1, 2) with 0.8*0.3 = 24 % probability; and the pair (1, 3) with 0.8*0.7 = 56 % probability)." + "type": "array", + "title": "Assemblies", + "description": "A description of groups of sites that are statistically correlated.\n\n- **Type**: list of dictionary with keys:\n - `sites_in_groups`: list of list of integers (REQUIRED)\n - `group_probabilities`: list of floats (REQUIRED)\n\n- **Requirements/Conventions**:\n - **Support**: OPTIONAL support in implementations, i.e., MAY be `null`.\n - **Query**: Support for queries on this property is OPTIONAL.\n If supported, filters MAY support only a subset of comparison operators.\n - The property SHOULD be `null` for entries that have no partial occupancies.\n - If present, the correct flag MUST be set in the list `structure_features`.\n - Client implementations MUST check its presence (as its presence changes the interpretation of the structure).\n - If present, it MUST be a list of dictionaries, each of which represents an assembly and MUST have the following two keys:\n - **sites_in_groups**: Index of the sites (0-based) that belong to each group for each assembly.\n\n Example: `[[1], [2]]`: two groups, one with the second site, one with the third.\n Example: `[[1,2], [3]]`: one group with the second and third site, one with the fourth.\n\n - **group_probabilities**: Statistical probability of each group. It MUST have the same length as `sites_in_groups`.\n It SHOULD sum to one.\n See below for examples of how to specify the probability of the occurrence of a vacancy.\n The possible reasons for the values not to sum to one are the same as already specified above for the `concentration` of each `species`.\n\n - If a site is not present in any group, it means that it is present with 100 % probability (as if no assembly was specified).\n - A site MUST NOT appear in more than one group.\n\n- **Examples** (for each entry of the assemblies list):\n - `{\"sites_in_groups\": [[0], [1]], \"group_probabilities: [0.3, 0.7]}`: the first site and the second site never occur at the same time in the unit cell.\n Statistically, 30 % of the times the first site is present, while 70 % of the times the second site is present.\n - `{\"sites_in_groups\": [[1,2], [3]], \"group_probabilities: [0.3, 0.7]}`: the second and third site are either present together or not present; they form the first group of atoms for this assembly.\n The second group is formed by the fourth site.\n Sites of the first group (the second and the third) are never present at the same time as the fourth site.\n 30 % of times sites 1 and 2 are present (and site 3 is absent); 70 % of times site 3 is present (and sites 1 and 2 are absent).\n\n- **Notes**:\n - Assemblies are essential to represent, for instance, the situation where an atom can statistically occupy two different positions (sites).\n\n - By defining groups, it is possible to represent, e.g., the case where a functional molecule (and not just one atom) is either present or absent (or the case where it it is present in two conformations)\n\n - Considerations on virtual alloys and on vacancies: In the special case of a virtual alloy, these specifications allow two different, equivalent ways of specifying them.\n For instance, for a site at the origin with 30 % probability of being occupied by Si, 50 % probability of being occupied by Ge, and 20 % of being a vacancy, the following two representations are possible:\n\n - Using a single species:\n ```json\n {\n \"cartesian_site_positions\": [[0,0,0]],\n \"species_at_sites\": [\"SiGe-vac\"],\n \"species\": [\n {\n \"name\": \"SiGe-vac\",\n \"chemical_symbols\": [\"Si\", \"Ge\", \"vacancy\"],\n \"concentration\": [0.3, 0.5, 0.2]\n }\n ]\n // ...\n }\n ```\n\n - Using multiple species and the assemblies:\n ```json\n {\n \"cartesian_site_positions\": [ [0,0,0], [0,0,0], [0,0,0] ],\n \"species_at_sites\": [\"Si\", \"Ge\", \"vac\"],\n \"species\": [\n { \"name\": \"Si\", \"chemical_symbols\": [\"Si\"], \"concentration\": [1.0] },\n { \"name\": \"Ge\", \"chemical_symbols\": [\"Ge\"], \"concentration\": [1.0] },\n { \"name\": \"vac\", \"chemical_symbols\": [\"vacancy\"], \"concentration\": [1.0] }\n ],\n \"assemblies\": [\n {\n \"sites_in_groups\": [ [0], [1], [2] ],\n \"group_probabilities\": [0.3, 0.5, 0.2]\n }\n ]\n // ...\n }\n ```\n\n - It is up to the database provider to decide which representation to use, typically depending on the internal format in which the structure is stored.\n However, given a structure identified by a unique ID, the API implementation MUST always provide the same representation for it.\n\n - The probabilities of occurrence of different assemblies are uncorrelated.\n So, for instance in the following case with two assemblies:\n ```json\n {\n \"assemblies\": [\n {\n \"sites_in_groups\": [ [0], [1] ],\n \"group_probabilities\": [0.2, 0.8],\n },\n {\n \"sites_in_groups\": [ [2], [3] ],\n \"group_probabilities\": [0.3, 0.7]\n }\n ]\n }\n ```\n\n Site 0 is present with a probability of 20 % and site 1 with a probability of 80 %. These two sites are correlated (either site 0 or 1 is present). Similarly, site 2 is present with a probability of 30 % and site 3 with a probability of 70 %.\n These two sites are correlated (either site 2 or 3 is present).\n However, the presence or absence of sites 0 and 1 is not correlated with the presence or absence of sites 2 and 3 (in the specific example, the pair of sites (0, 2) can occur with 0.2*0.3 = 6 % probability; the pair (0, 3) with 0.2*0.7 = 14 % probability; the pair (1, 2) with 0.8*0.3 = 24 % probability; and the pair (1, 3) with 0.8*0.7 = 56 % probability).", + "x-optimade-support": "optional", + "x-optimade-queryable": "optional" }, "structure_features": { - "title": "Structure Features", - "type": "array", "items": { "$ref": "#/components/schemas/StructureFeatures" }, - "description": "A list of strings that flag which special features are used by the structure.\n\n- **Type**: list of strings\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property.\n Filters on the list MUST support all mandatory HAS-type queries.\n Filter operators for comparisons on the string components MUST support equality, support for other comparison operators are OPTIONAL.\n - MUST be an empty list if no special features are used.\n - MUST be sorted alphabetically.\n - If a special feature listed below is used, the list MUST contain the corresponding string.\n - If a special feature listed below is not used, the list MUST NOT contain the corresponding string.\n - **List of strings used to indicate special structure features**:\n - `disorder`: this flag MUST be present if any one entry in the `species` list has a `chemical_symbols` list that is longer than 1 element.\n - `implicit_atoms`: this flag MUST be present if the structure contains atoms that are not assigned to sites via the property `species_at_sites` (e.g., because their positions are unknown).\n When this flag is present, the properties related to the chemical formula will likely not match the type and count of atoms represented by the `species_at_sites`, `species` and `assemblies` properties.\n - `site_attachments`: this flag MUST be present if any one entry in the `species` list includes `attached` and `nattached`.\n - `assemblies`: this flag MUST be present if the property `assemblies` is present.\n\n- **Examples**: A structure having implicit atoms and using assemblies: `[\"assemblies\", \"implicit_atoms\"]`" + "type": "array", + "title": "Structure Features", + "description": "A list of strings that flag which special features are used by the structure.\n\n- **Type**: list of strings\n\n- **Requirements/Conventions**:\n - **Support**: MUST be supported by all implementations, MUST NOT be `null`.\n - **Query**: MUST be a queryable property.\n Filters on the list MUST support all mandatory HAS-type queries.\n Filter operators for comparisons on the string components MUST support equality, support for other comparison operators are OPTIONAL.\n - MUST be an empty list if no special features are used.\n - MUST be sorted alphabetically.\n - If a special feature listed below is used, the list MUST contain the corresponding string.\n - If a special feature listed below is not used, the list MUST NOT contain the corresponding string.\n - **List of strings used to indicate special structure features**:\n - `disorder`: this flag MUST be present if any one entry in the `species` list has a `chemical_symbols` list that is longer than 1 element.\n - `implicit_atoms`: this flag MUST be present if the structure contains atoms that are not assigned to sites via the property `species_at_sites` (e.g., because their positions are unknown).\n When this flag is present, the properties related to the chemical formula will likely not match the type and count of atoms represented by the `species_at_sites`, `species` and `assemblies` properties.\n - `site_attachments`: this flag MUST be present if any one entry in the `species` list includes `attached` and `nattached`.\n - `assemblies`: this flag MUST be present if the property `assemblies` is present.\n\n- **Examples**: A structure having implicit atoms and using assemblies: `[\"assemblies\", \"implicit_atoms\"]`", + "x-optimade-support": "must", + "x-optimade-queryable": "must" } }, + "type": "object", + "required": [ + "last_modified", + "elements", + "nelements", + "elements_ratios", + "chemical_formula_descriptive", + "chemical_formula_reduced", + "chemical_formula_anonymous", + "dimension_types", + "nperiodic_dimensions", + "lattice_vectors", + "cartesian_site_positions", + "nsites", + "species", + "species_at_sites", + "structure_features" + ], + "title": "StructureResourceAttributes", "description": "This class contains the Field for the attributes used to represent a structure, e.g. unit cell, atoms, positions." }, "StructureResponseMany": { - "title": "StructureResponseMany", - "required": [ - "data", - "meta" - ], - "type": "object", "properties": { "data": { - "title": "Data", - "uniqueItems": true, "anyOf": [ { - "type": "array", "items": { "$ref": "#/components/schemas/StructureResource" - } + }, + "type": "array" }, { - "type": "array", "items": { "type": "object" - } + }, + "type": "array" } ], - "description": "List of unique OPTIMADE structures entry resource objects" + "uniqueItems": true, + "title": "Data", + "description": "List of unique OPTIMADE structures entry resource objects." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/ResponseMeta" } ], + "title": "Meta", "description": "A meta object containing non-standard information" }, "errors": { - "title": "Errors", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Error" }, + "type": "array", + "uniqueItems": true, + "title": "Errors", "description": "A list of unique errors" }, "included": { - "title": "Included", - "uniqueItems": true, "anyOf": [ { - "type": "array", "items": { "$ref": "#/components/schemas/EntryResource" - } + }, + "type": "array" }, { - "type": "array", "items": { "type": "object" - } + }, + "type": "array" } - ] + ], + "uniqueItems": true, + "title": "Included" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ToplevelLinks" } ], + "title": "Links", "description": "Links associated with the primary data or errors" }, "jsonapi": { - "title": "Jsonapi", "allOf": [ { "$ref": "#/components/schemas/JsonApi" } ], + "title": "Jsonapi", "description": "Information about the JSON API used" } }, - "description": "errors are not allowed" - }, - "StructureResponseOne": { - "title": "StructureResponseOne", + "type": "object", "required": [ "data", "meta" ], - "type": "object", + "title": "StructureResponseMany", + "description": "errors are not allowed" + }, + "StructureResponseOne": { "properties": { "data": { - "title": "Data", "anyOf": [ { "$ref": "#/components/schemas/StructureResource" @@ -3664,224 +4896,259 @@ "type": "object" } ], - "description": "A single structures entry resource" + "title": "Data", + "description": "A single structures entry resource." }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/ResponseMeta" } ], + "title": "Meta", "description": "A meta object containing non-standard information" }, "errors": { - "title": "Errors", - "uniqueItems": true, - "type": "array", "items": { "$ref": "#/components/schemas/Error" }, + "type": "array", + "uniqueItems": true, + "title": "Errors", "description": "A list of unique errors" }, "included": { - "title": "Included", - "uniqueItems": true, "anyOf": [ { - "type": "array", "items": { "$ref": "#/components/schemas/EntryResource" - } + }, + "type": "array" }, { - "type": "array", "items": { "type": "object" - } + }, + "type": "array" } - ] + ], + "uniqueItems": true, + "title": "Included" }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ToplevelLinks" } ], + "title": "Links", "description": "Links associated with the primary data or errors" }, "jsonapi": { - "title": "Jsonapi", "allOf": [ { "$ref": "#/components/schemas/JsonApi" } ], + "title": "Jsonapi", "description": "Information about the JSON API used" } }, + "type": "object", + "required": [ + "data", + "meta" + ], + "title": "StructureResponseOne", "description": "errors are not allowed" }, + "SupportLevel": { + "enum": [ + "must", + "should", + "optional" + ], + "title": "SupportLevel", + "description": "OPTIMADE property/field support levels" + }, "ToplevelLinks": { - "title": "ToplevelLinks", - "type": "object", "properties": { "self": { - "title": "Self", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Self", "description": "A link to itself" }, "related": { - "title": "Related", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Related", "description": "A related resource link" }, "first": { - "title": "First", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "First", "description": "The first page of data" }, "last": { - "title": "Last", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Last", "description": "The last page of data" }, "prev": { - "title": "Prev", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Prev", "description": "The previous page of data" }, "next": { - "title": "Next", "anyOf": [ { "type": "string", - "minLength": 1, "maxLength": 65536, + "minLength": 1, "format": "uri" }, { "$ref": "#/components/schemas/Link" } ], + "title": "Next", "description": "The next page of data" } }, + "type": "object", + "title": "ToplevelLinks", "description": "A set of Links objects, possibly including pagination" }, - "Warnings": { - "title": "Warnings", + "UnitResourceURIs": { + "properties": { + "relation": { + "type": "string", + "title": "Relation" + }, + "uri": { + "type": "string", + "title": "Uri" + } + }, + "type": "object", "required": [ - "detail", - "type" + "relation", + "uri" ], - "type": "object", + "title": "UnitResourceURIs" + }, + "Warnings": { "properties": { "id": { - "title": "Id", "type": "string", + "title": "Id", "description": "A unique identifier for this particular occurrence of the problem." }, "links": { - "title": "Links", "allOf": [ { "$ref": "#/components/schemas/ErrorLinks" } ], + "title": "Links", "description": "A links object storing about" }, "code": { - "title": "Code", "type": "string", + "title": "Code", "description": "an application-specific error code, expressed as a string value." }, "title": { - "title": "Title", "type": "string", + "title": "Title", "description": "A short, human-readable summary of the problem. It **SHOULD NOT** change from occurrence to occurrence of the problem, except for purposes of localization." }, "detail": { - "title": "Detail", "type": "string", + "title": "Detail", "description": "A human-readable explanation specific to this occurrence of the problem." }, "source": { - "title": "Source", "allOf": [ { "$ref": "#/components/schemas/ErrorSource" } ], + "title": "Source", "description": "An object containing references to the source of the error" }, "meta": { - "title": "Meta", "allOf": [ { "$ref": "#/components/schemas/Meta" } ], + "title": "Meta", "description": "a meta object containing non-standard meta-information about the error." }, "type": { - "title": "Type", - "pattern": "^warning$", "type": "string", - "description": "Warnings must be of type \"warning\"" + "pattern": "^warning$", + "title": "Type", + "description": "Warnings must be of type \"warning\"", + "default": "warning" } }, + "type": "object", + "required": [ + "detail", + "type" + ], + "title": "Warnings", "description": "OPTIMADE-specific warning class based on OPTIMADE-specific JSON API Error.\n\nFrom the specification:\n\nA warning resource object is defined similarly to a JSON API error object, but MUST also include the field type, which MUST have the value \"warning\".\nThe field detail MUST be present and SHOULD contain a non-critical message, e.g., reporting unrecognized search attributes or deprecated features.\n\nNote: Must be named \"Warnings\", since \"Warning\" is a built-in Python class." } }