Skip to content

Commit

Permalink
Update models for 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Jul 2, 2020
1 parent a1ed3ee commit 9b293c9
Show file tree
Hide file tree
Showing 7 changed files with 204 additions and 73 deletions.
93 changes: 71 additions & 22 deletions openapi/index_openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"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.9.7) v0.9.7.",
"version": "1.0.0-rc.2"
"version": "1.0.0"
},
"paths": {
"/info": {
Expand Down Expand Up @@ -282,7 +282,7 @@
"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. The version number string MUST NOT be prefixed by, e.g., 'v'."
"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`."
}
},
"description": "A JSON object containing information about an available API version"
Expand Down Expand Up @@ -524,6 +524,7 @@
"ErrorResponse": {
"title": "ErrorResponse",
"required": [
"meta",
"errors"
],
"type": "object",
Expand Down Expand Up @@ -640,13 +641,43 @@
"type": "string",
"description": "version string of the current implementation"
},
"homepage": {
"title": "Homepage",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 65536,
"format": "uri"
},
{
"allOf": [
{
"$ref": "#/components/schemas/Link"
}
]
}
],
"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",
"maxLength": 65536,
"minLength": 1,
"type": "string",
"description": "URL of the implementation source, either downloadable archive or version control system",
"format": "uri"
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 65536,
"format": "uri"
},
{
"allOf": [
{
"$ref": "#/components/schemas/Link"
}
]
}
],
"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",
Expand Down Expand Up @@ -690,7 +721,7 @@
"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 version of the OPTIMADE API"
"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`."
},
"available_api_versions": {
"title": "Available Api Versions",
Expand Down Expand Up @@ -789,7 +820,8 @@
"IndexInfoResponse": {
"title": "IndexInfoResponse",
"required": [
"data"
"data",
"meta"
],
"type": "object",
"properties": {
Expand Down Expand Up @@ -1066,7 +1098,8 @@
"LinksResponse": {
"title": "LinksResponse",
"required": [
"data"
"data",
"meta"
],
"type": "object",
"properties": {
Expand Down Expand Up @@ -1236,7 +1269,7 @@
"prefix": {
"title": "Prefix",
"type": "string",
"description": "database-provider-specific prefix as found in Appendix 1."
"description": "database-provider-specific prefix as found in section Database-Provider-Specific Namespace Prefixes."
},
"homepage": {
"title": "Homepage",
Expand Down Expand Up @@ -1463,10 +1496,7 @@
"required": [
"query",
"api_version",
"time_stamp",
"data_returned",
"more_data_available",
"provider"
"more_data_available"
],
"type": "object",
"properties": {
Expand All @@ -1483,7 +1513,31 @@
"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": "A string containing the version of the API implementation."
"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`."
},
"more_data_available": {
"title": "More Data Available",
"type": "boolean",
"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,
"format": "uri"
},
{
"allOf": [
{
"$ref": "#/components/schemas/Link"
}
]
}
],
"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",
Expand All @@ -1497,11 +1551,6 @@
"type": "integer",
"description": "An integer containing the total number of data resource objects returned for the current `filter` query, independent of pagination."
},
"more_data_available": {
"title": "More Data Available",
"type": "boolean",
"description": "`false` if all data resource objects for this `filter` query have been returned in the response or if it is the last page of a paginated response, and `true` otherwise."
},
"provider": {
"title": "Provider",
"allOf": [
Expand Down Expand Up @@ -1557,7 +1606,7 @@
"representation": {
"title": "Representation",
"type": "string",
"description": "a string with the part of the URL that follows the base URL. Example: '/structures?'"
"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 pary of the URL MAY be excluded.\nExample: `/structures?filter=nelements=2`"
}
},
"description": "Information on the query that was requested. "
Expand Down

0 comments on commit 9b293c9

Please sign in to comment.