diff --git a/openapi/ver/current/context/skg-if-api.json b/openapi/ver/current/context/skg-if-api.json new file mode 100644 index 0000000..e59988e --- /dev/null +++ b/openapi/ver/current/context/skg-if-api.json @@ -0,0 +1,32 @@ +{ + "@context": { + "@version": 1.1, + "@protected": true, + "as": "http://www.w3.org/ns/activitystreams#", + "search_result_page": { + "@id": "as:CollectionPage" + }, + "search_result": { + "@id": "as:Collection" + }, + "part_of": { + "@id": "as:partOf" + }, + "total_items": { + "@id": "as:totalItems" + }, + "next_page": { + "@id": "as:next" + }, + "first_page": { + "@id": "as:first" + }, + "last_page": { + "@id": "as:last" + }, + "prev_page": { + "@id": "as:prev" + }, + "meta": "@nest" + } +} \ No newline at end of file diff --git a/openapi/ver/current/sample_data/grants/grant_1.json b/openapi/ver/current/sample_data/grants/grant_1.json index f0ee2bf..73daf2a 100644 --- a/openapi/ver/current/sample_data/grants/grant_1.json +++ b/openapi/ver/current/sample_data/grants/grant_1.json @@ -1,13 +1,14 @@ { "@context": [ "https://w3id.org/skg-if/context/1.1.0/skg-if.json", + "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", { - "@base": "https://w3id.org/skg-if/sandbox/myprov/" + "@base": "https://w3id.org/skg-if/sandbox/my-skg-acronym/" } ], "@graph": [ { - "local_identifier": "6f368a3a-b1cf-498f-b2de-27135d1e0011", + "local_identifier": "http://example.com/skg-if/api/grants/6f368a3a-b1cf-498f-b2de-27135d1e0011", "identifiers": [ { "scheme": "doi", @@ -24,7 +25,7 @@ }, "acronym": "GraspOS", "funding_agency": { - "local_identifier": "xxx", + "local_identifier": "http://example.com/skg-if/api/organisations/org-xxx", "entity_type": "organisation", "identifiers": [ { @@ -47,7 +48,7 @@ "website": "https://graspos.eu", "beneficiaries": [ { - "local_identifier": "xxx", + "local_identifier": "http://example.com/skg-if/api/organisations/xxx", "entity_type": "organisation", "identifiers": [ { @@ -64,7 +65,7 @@ "contributions": [ { "by": { - "local_identifier": "xxx", + "local_identifier": "http://example.com/skg-if/api/persons/xxx", "entity_type": "person", "identifiers": [ { @@ -78,7 +79,7 @@ }, "declared_affiliations": [ { - "local_identifier": "xxx", + "local_identifier": "http://example.com/skg-if/api/organisations/xxx", "entity_type": "organisation", "identifiers": [ { diff --git a/openapi/ver/current/sample_data/organisations/org_brown_university.json b/openapi/ver/current/sample_data/organisations/org_brown_university.json index 3b6084d..d1bc04e 100644 --- a/openapi/ver/current/sample_data/organisations/org_brown_university.json +++ b/openapi/ver/current/sample_data/organisations/org_brown_university.json @@ -1,13 +1,14 @@ { "@context": [ "https://w3id.org/skg-if/context/1.1.0/skg-if.json", + "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", { - "@base": "https://w3id.org/skg-if/sandbox/myprov/" + "@base": "https://w3id.org/skg-if/sandbox/my-skg-acronym/" } ], "@graph": [ { - "local_identifier": "6f368a3a-b1cf-498f-b2de-222222222", + "local_identifier": "http://example.com/skg-if/api/organisations/6f368a3a-b1cf-498f-b2de-222222222", "entity_type": "organisation", "identifiers": [ { diff --git a/openapi/ver/current/sample_data/products/journal_article_full.json b/openapi/ver/current/sample_data/products/journal_article_full.json index 8221abf..c70f63f 100644 --- a/openapi/ver/current/sample_data/products/journal_article_full.json +++ b/openapi/ver/current/sample_data/products/journal_article_full.json @@ -1,13 +1,14 @@ { "@context": [ "https://w3id.org/skg-if/context/1.1.0/skg-if.json", + "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", { - "@base": "https://w3id.org/skg-if/sandbox/myprov/" + "@base": "https://w3id.org/skg-if/sandbox/my-skg-acronym/" } ], "@graph": [ { - "local_identifier": "614a6575-5d6c-416c-a8e1-ddd456d132", + "local_identifier": "http://example.com/skg-if/api/products/614a6575-5d6c-416c-a8e1-ddd456d132", "entity_type": "product", "product_type": "literature", "titles": { @@ -47,13 +48,13 @@ "scheme": "orcid" } ], - "local_identifier": "614a6575-5d6c-416c-a8e1-f49a5d589bf8", + "local_identifier": "http://example.com/skg-if/api/persons/614a6575-5d6c-416c-a8e1-f49a5d589bf8", "entity_type": "person" }, "declared_affiliations": [ { "name": "Center for Plant Biotechnology and Genomics, Universidad Politécnica de Madrid, Madrid, 28223, Spain", - "local_identifier": "32bc66c6-38be-4d5f-85db-d44c9f86921f", + "local_identifier": "http://example.com/skg-if/api/organisations/32bc66c6-38be-4d5f-85db-d44c9f86921f", "entity_type": "organisation", "country": "ES" } @@ -71,7 +72,7 @@ }, "biblio": { "hosting_data_source": { - "local_identifier": "6f368a3a-b1cf-498f-b2de-27135d1e0075", + "local_identifier": "http://example.com/skg-if/api/datasources/6f368a3a-b1cf-498f-b2de-27135d1e0075", "entity_type": "datasource", "name": "An Archive" }, @@ -84,7 +85,7 @@ "scheme": "issn" } ], - "local_identifier": "51f46bc1-00f8-42dd-8221-ac4deb52fb25", + "local_identifier": "http://example.com/skg-if/api/venues/51f46bc1-00f8-42dd-8221-ac4deb52fb25", "entity_type": "venue" } }, @@ -104,7 +105,7 @@ ], "funding": [ { - "local_identifier": "614a6575-5d6c-416c-a8e1-f49a5d58999", + "local_identifier": "http://example.com/skg-if/api/grants/614a6575-5d6c-416c-a8e1-f49a5d58999", "entity_type": "grant", "titles": { "en": "The EU grant ZZ", diff --git a/openapi/ver/current/sample_data/products/test.json b/openapi/ver/current/sample_data/products/test.json deleted file mode 100644 index 3102ae8..0000000 --- a/openapi/ver/current/sample_data/products/test.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "@context": [ - "https://w3id.org/skg-if/context/1.1.0/skg-if.json", - { - "@base": "https://example.com/skg-if/api/" - } - ], - "@graph": [ - { - "local_identifier": "nl_47_id_47_dataset_47_toegang_47_2.05.32.01", - "identifiers": [ - { - "scheme": "doi", - "value": "https://archief.nl/id/dataset/toegang/2.05.32.01" - } - ], - "entity_type": "product", - "product_type": "literature", - "titles": { - "nl": [ - "Inventaris van het archief van het Ministerie van Buitenlandse Zaken: Bureau Bescherming, 1916-1939" - ] - }, - "abstracts": { - "nl": [ - "Inventaris van het archief van het Ministerie van Buitenlandse Zaken: Bureau Bescherming, 1916-1939" - ] - } - } - ] -} \ No newline at end of file diff --git a/openapi/ver/current/skg-if-openapi.yaml b/openapi/ver/current/skg-if-openapi.yaml index 8d1078f..dbf3ef7 100644 --- a/openapi/ver/current/skg-if-openapi.yaml +++ b/openapi/ver/current/skg-if-openapi.yaml @@ -13,20 +13,14 @@ info: description: | OpenAPI end points specifications for [SKG-IF](https://skg-if.github.io/interoperability-framework/) + Last version of the SKG-IF OpenAPI is available at : https://skg-if.github.io/api/ + # Note for implementers : - Please refer to [SKG-IF OpenAPI Implementer documentation](https://docs.google.com/document/d/1t7b7h28UTtM56Sda4NGJIp0hnQfGbcVVGn12fny9wfI/edit?usp=sharing) - [RDA SKG-IF WG](https://skg-if.github.io/) does not provide any official implementation of the current specification. - - Recommended OpenAPI viewer : [StopLight/Elements](https://elements-demo.stoplight.io/) (Use a public URL exposing the current file) - - This OpenAPI is compatible with [StopLight PRISM](https://docs.stoplight.io/docs/prism/). - - You can run a mock server, for testing purpose, before implementation. - - You can test your server implementation compatibility. - - All the errors returned MUST conform to format [RFC7807](https://datatracker.ietf.org/doc/html/rfc7807) - - # JSON Output compatibility - - The JSON output of single entity operations _/entity-type/{local_identifier}_ are compatible with SKG-IF JSON-LD context (see @context version in response specifications). - - The JSON output of search entity operations _/entity-type?filter=xxx_ are JSON only. - - __2025/03 : This is alpha unversionned release make sure you refresh/download the YAML regularly to get the last fixes__ + - Recommended OpenAPI viewer : + - StopLight/Elements Viewer [Current/last SKG-IF OpenAPI version](https://elements-demo.stoplight.io/?spec=https://w3id.org/skg-if/api/skg-if-openapi.yaml). + - Swagger : [Current/last SKG-IF OpenAPI version](https://editor-next.swagger.io/) externalDocs: description: SKG-IF @@ -52,9 +46,9 @@ tags: # upper case name description: Pagination description (can use markdown syntax) x-traitTag: true servers: - - url: 'http://example.com/api' + - url: 'http://example.com/skg-if/api' paths: - '/products/{local_identifier}': + '/products/{short_local_identifier}': get: tags: - Product @@ -63,37 +57,46 @@ paths: Get single `product`. See definition in SKG-IF [Research product](https://skg-if.github.io/interoperability-framework/docs/research-product.html) ( entity_type:product ). operationId: getProductById parameters: - - $ref : '#/components/parameters/localIdPathParam' + - $ref : '#/components/parameters/shortLocalIdPathParam' responses: '200': description: | Success. - Important : the output is JSON-LD and contains a `@context` and `@graph` keys. content: # not 'application/json-ld' to be compatible with StopLight PRISM tool application/json: schema: - allOf: - - $ref: "#/components/schemas/JsonLdCtx" - - type: object - required: ['@graph'] - properties: - "@graph": - type: array - minItems: 1 - maxItems: 1 - items: - $ref: "#/components/schemas/Product" + required: ['@context','@graph'] + properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] + "@graph": + type: array + minItems: 1 + maxItems: 1 + items: + $ref: "#/components/schemas/Product" examples: JournalArticleEx01: summary: "Journal article - FAIR Guiding Principles" value : "@context": [ "https://w3id.org/skg-if/context/1.1.0/skg-if.json", - {"@base" : "https://w3id.org/skg-if/sandbox/myprov/"} + "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", + {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"} ] "@graph" : - - local_identifier: prd-c66c6-38be-4d5f-85db-d44c9f869333 + - local_identifier: http://example.com/skg-if/api/products/prd-c66c6-38be-4d5f-85db-d44c9f869333 entity_type: product product_type: literature titles : @@ -118,11 +121,11 @@ paths: identifiers: - value: "0000-0001-6960-357X" scheme: "orcid" - local_identifier: "otf___1730027051396___person-1" + local_identifier: http://example.com/skg-if/api/persons/otf___1730027051396___person-1 entity_type: "person" declared_affiliations: - name: "Center for Plant Biotechnology and Genomics, Universidad Politécnica de Madrid, Madrid, 28223, Spain" - local_identifier: "otf___1730027051396___person-1-aff-1" + local_identifier: http://example.com/skg-if/api/otf___1730027051396___person-1-aff-1 entity_type: "organisation" country: "ES" manifestations: @@ -133,7 +136,7 @@ paths: class: http://www.example.com/types/onto/localtypemethodology biblio: hosting_data_source: - local_identifier: arch-6f368a3a-b1cf-498f-b2de-27135d1e0075 + local_identifier: http://example.com/skg-if/api/arch-6f368a3a-b1cf-498f-b2de-27135d1e0075 entity_type: datasource name: "An Archive" in: @@ -142,7 +145,7 @@ paths: identifiers: - "value": "2052-4463" "scheme": "issn" - local_identifier: "journal-46bc1-00f8-42dd-8221-ac4deb52fb25" + local_identifier: http://example.com/skg-if/api/venues/journal-46bc1-00f8-42dd-8221-ac4deb52fb25 entity_type: "venue" dates: # http://api.crossref.org/works/10.1038/sdata.2016.18 publication: @@ -161,10 +164,11 @@ paths: value : "@context": [ "https://w3id.org/skg-if/context/1.1.0/skg-if.json", - {"@base" : "https://w3id.org/skg-if/sandbox/myprov/"} + "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", + {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"} ] "@graph" : - - local_identifier: prd-c66c6-38be-4d5f-85db-d44c9f869555 + - local_identifier: http://example.com/skg-if/api/products/prd-c66c6-38be-4d5f-85db-d44c9f869555 entity_type: product product_type: research data titles : @@ -176,6 +180,9 @@ paths: scheme: "doi" - value: "W4393781519" scheme: "openalex" + '404': + description: | + Error if entity does not exists '/products': get: tags: @@ -192,13 +199,13 @@ paths: | product_type | `product_type:literature` | | identifiers.id | `identifiers.id:10.1038/sdata.2016.18` | | identifiers.scheme | `identifiers.scheme:doi` | - | contributions.by. local_identifier | `contributions.by. local_identifier:prod_1` | + | contributions.by. local_identifier | `contributions.by. local_identifier:https://example.com/skg-if/api/products/prod_c66c6-38be-4d5f-85db-d44c9f869881` | | contributions.by. identifiers.id | `contributions.by. identifiers.id:0000-0002-1825-0097` | | contributions.by. identifiers.scheme | `contributions.by. identifiers.scheme:orcid` | | contributions.by. family_name | `contributions.by. family_name:smith` | | contributions.by. given_name | `contributions.by. given_name:john` | | contributions.by. name | `contributions.by. name:john smith` | - | contributions.declared_affiliations. local_identifier | `contributions.declared_affiliations. local_identifier:org_1` | + | contributions.declared_affiliations. local_identifier | `contributions.declared_affiliations. local_identifier:https://example.com/skg-if/api/organisations/org_c66c6-38be-4d5f-85db-d44c9f869881` | | contributions.declared_affiliations. identifiers.id | `contributions.declared_affiliations. identifiers.id:05gq02987` | | contributions.declared_affiliations. identifiers.scheme | `contributions.declared_affiliations. identifiers.scheme:ror` | | contributions.declared_affiliations. name | `contributions.declared_affiliations. name:brown university` | @@ -261,46 +268,77 @@ paths: '200': description: | Success. - Important : The output is JSON with `meta` and `results` keys. It is not JSON-LD, it does not contain any `@context` or `@graph` keys. There is an issue [#9](https://github.com/skg-if/context/issues/9) to fix this. content: application/json: schema: properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] meta: type: object $ref: '#/components/schemas/Meta' - results: + "@graph": type: array items: $ref: '#/components/schemas/Product' - required: [ "meta", "results" ] + required: [ "@context", "meta", "@graph" ] examples: JournalArticleListEx01: summary: A list of journal articles value : + "@context": + - "https://w3id.org/skg-if/context/1.1.0/skg-if.json" + - "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json" + - "@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/" meta: - count: 2 - page: 1 - page_size: 10 - results: - - local_identifier: prd-c66c6-38be-4d5f-85db-d44c9f869333 + local_identifier: https://example.com/skg-if/api/products?filter=product_type:literature&page=1 + entity_type: search_result_page + next_page: + local_identifier: https://example.com/skg-if/api/products?filter=product_type:literature&page=2 + entity_type: search_result_page + part_of: + local_identifier: https://example.com/skg-if/api/products?filter=product_type:literature + entity_type: search_result + total_items: 54231 + "@graph": + - local_identifier: http://example.com/skg-if/api/products/prd-c66c6-38be-4d5f-85db-d44c9f869333 entity_type: product product_type: literature - - local_identifier: prd-c66c6-38be-4d5f-85db-d44c9f869999 + - local_identifier: http://example.com/skg-if/api/products/prd-c66c6-38be-4d5f-85db-d44c9f869999 entity_type: product product_type: research data DatasetListEx02: summary: A list of datasets value : + "@context": + - "https://w3id.org/skg-if/context/1.1.0/skg-if.json" + - "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json" + - "@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/" meta: - count: 2 - page: 1 - page_size: 10 - results: - - local_identifier: prd-c66c6-38be-4d5f-85db-d44c9f869888 + local_identifier: http://example.com/skg-if/api/products?filter=product_type:research%20data&page=1 + entity_type: search_result_page + next_page: + local_identifier: http://example.com/skg-if/api/products?filter=product_type:research%20data&page=2 + entity_type: search_result_page + part_of: + local_identifier: http://example.com/skg-if/api/products?filter=product_type:research%20data + entity_type: search_result + total_items: 13202 + "@graph": + - local_identifier: http://example.com/skg-if/api/products/prd-c66c6-38be-4d5f-85db-d44c9f869888 entity_type: product product_type: research data - - local_identifier: prd-c66c6-38be-4d5f-85db-d44c9f869881 + - local_identifier: http://example.com/skg-if/api/products/prd-c66c6-38be-4d5f-85db-d44c9f869881 entity_type: product product_type: research data '422': @@ -318,7 +356,7 @@ paths: status: '422' detail: 'The filter b is not supported by this implementation, valid filters are x, y, z' occurence: 'http://my-api/products?filter=b:foo,x:bar' - '/persons/{local_identifier}': + '/persons/{short_local_identifier}': get: tags: - Person @@ -327,34 +365,44 @@ paths: Get `person` by id. See definition in SKG-IF [Agent](https://skg-if.github.io/interoperability-framework/docs/agent.html) ( entity_type:person ) .\ operationId: getPersonById parameters: - - $ref : '#/components/parameters/localIdPathParam' + - $ref : '#/components/parameters/shortLocalIdPathParam' responses: '200': description: Success content: application/json: schema: - allOf: - - $ref: "#/components/schemas/JsonLdCtx" - - type: object - required: ['@graph'] - properties: - "@graph": - type: array - minItems: 1 - maxItems: 1 - items: - $ref: "#/components/schemas/Person" + required: ['@context','@graph'] + properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] + "@graph": + type: array + minItems: 1 + maxItems: 1 + items: + $ref: "#/components/schemas/Person" examples: PersonEx01: summary: Josiah Carberry person value : "@context": [ "https://w3id.org/skg-if/context/1.1.0/skg-if.json", + "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "http://example.com/"} ] "@graph" : - - local_identifier: pers-c66c6-38be-4d5f-85db-d44c9f869333 + - local_identifier: http://example.com/skg-if/api/persons/pers-c66c6-38be-4d5f-85db-d44c9f869333 entity_type: "person" identifiers: - scheme: orcid @@ -367,12 +415,16 @@ paths: value : "@context": [ "https://w3id.org/skg-if/context/1.1.0/skg-if.json", + "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "http://example.com/"} ] "@graph" : - - local_identifier: otf_126848135_prod-1-pers-1 + - local_identifier: http://example.com/skg-if/api/persons/otf_126848135_prod-1-pers-1 entity_type: "person" name: "John Doe" + '404': + description: | + Error if entity does not exists '/persons': get: tags: @@ -391,7 +443,7 @@ paths: | given_name | `given_name:Josiah` | | family_name | `family_name:Carberry` | | name | `name:Josiah Carberro` | - | affiliations.affiliation.local_identifier | `affiliations.affiliation.local_identifier:pers_1` | + | affiliations.affiliation.local_identifier | `affiliations.affiliation.local_identifier:http://example.com/skg-if/api/organisations/org-c66c6-38be-4d5f-85db-d44c9f869333` | | affiliations.affiliation.name | `affiliations.affiliation.name:Brown University` | | affiliations.affiliation.short_name | `affiliations.affiliation.short_name:BU` | | affiliations.role | `affiliations.role:affiliate` | @@ -433,24 +485,46 @@ paths: application/json: schema: properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] meta: type: object $ref: '#/components/schemas/Meta' - results: + "@graph": type: array items: $ref: '#/components/schemas/Person' - required: [ "meta", "results" ] + required: [ "@context", "meta", "@graph" ] examples: PersonEx01: summary: a list of persons value : + "@context": + - "https://w3id.org/skg-if/context/1.1.0/skg-if.json" + - "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json" + - "@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/" meta: - count: 2 - page: 1 - page_size: 10 - results: - - local_identifier: pers-c66c6-38be-4d5f-85db-d44c9f869333 + local_identifier: https://example.com/skg-if/api/persons?filter=family_name:Carberry&page=1 + entity_type: search_result_page + next_page: + local_identifier: https://example.com/skg-if/api/persons?filter=family_name:Carberry&page=2 + entity_type: search_result_page + part_of: + local_identifier: https://example.com/skg-if/api/persons?filter=family_name:Carberry + entity_type: search_result + total_items: 4 + "@graph": + - local_identifier: http://example.com/skg-if/api/persons/pers-c66c6-38be-4d5f-85db-d44c9f869333 entity_type: "person" identifiers: - scheme: orcid @@ -458,11 +532,11 @@ paths: given_name: "Josiah" family_name: "Carberry" name: "Josiah Carberry" - - local_identifier: pers-c66c6-38be-4d5f-85db-d44c9f869888 + - local_identifier: http://example.com/skg-if/api/persons/pers-c66c6-38be-4d5f-85db-d44c9f869888 entity_type: "person" - given_name: "Botul" - family_name: "Jean-Baptiste" - name: "Jean-Baptiste Botul" + given_name: "Gerard" + family_name: "Carberry" + name: "Gerard Carberry" #PersonEx02: # commented KO on StopLight UI, OK on Redoc UI, Not used in PRISM # summary: "a list of persons - external URL" # externalValue: "https://raw.githubusercontent.com/skg-if/examples/refs/heads/main/OpenCitations/oc_1.json" @@ -470,8 +544,8 @@ paths: address: operationId: getPersonById parameters: - local_identifier: $response.body#/results/local_identifier - '/organisations/{local_identifier}': + local_identifier: $response.body#/@graph/local_identifier + '/organisations/{short_local_identifier}': get: tags: - Organisation @@ -480,7 +554,7 @@ paths: Get `organisation` by id. See definition in SKG-IF [Agent](https://skg-if.github.io/interoperability-framework/docs/agent.html) ( entity_type:organisation) .\ operationId: getOrganisationById parameters: - - $ref : '#/components/parameters/localIdPathParam' + - $ref : '#/components/parameters/shortLocalIdPathParam' responses: '200': description: Success @@ -488,26 +562,36 @@ paths: # not 'application/json-ld' to be compatible with StopLight PRISM tool application/json: schema: - allOf: - - $ref: "#/components/schemas/JsonLdCtx" - - type: object - required: ['@graph'] - properties: - "@graph": - type: array - minItems: 1 - maxItems: 1 - items: - $ref: "#/components/schemas/Organisation" + required: ['@context','@graph'] + properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] + "@graph": + type: array + minItems: 1 + maxItems: 1 + items: + $ref: "#/components/schemas/Organisation" examples: OrgBrownUniversity: summary: "Brown University" value : "@context": - "https://w3id.org/skg-if/context/1.1.0/skg-if.json" - - "@base" : "https://w3id.org/skg-if/sandbox/myprov/" + - "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json" + - "@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/" "@graph": - - local_identifier: 'otf_session12324_org_1124' + - local_identifier: http://example.com/skg-if/api/organisations/otf_session12324_org_1124 entity_type: 'organisation' identifiers: - scheme: ror @@ -522,9 +606,10 @@ paths: value : "@context": - "https://w3id.org/skg-if/context/1.1.0/skg-if.json" - - "@base" : "https://w3id.org/skg-if/sandbox/myprov/" + - "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json" + - "@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/" "@graph": - - local_identifier: 'otf_session12325_org_1125' + - local_identifier: http://example.com/skg-if/api/organisations/otf_session12325_org_1125 entity_type: 'organisation' identifiers: - scheme: ror @@ -541,9 +626,10 @@ paths: value : "@context": - "https://w3id.org/skg-if/context/1.1.0/skg-if.json" - - "@base" : "https://w3id.org/skg-if/sandbox/myprov/" + - "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json" + - "@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/" "@graph": - - local_identifier: 'otf_session12325_org_1126' + - local_identifier: http://example.com/skg-if/api/organisations/otf_session12325_org_1126 entity_type: 'organisation' name: Lab of science, unknown University, Antarctica OrgEuropeanCommission: @@ -551,9 +637,10 @@ paths: value : "@context": - "https://w3id.org/skg-if/context/1.1.0/skg-if.json" - - "@base" : "https://w3id.org/skg-if/sandbox/myprov/" + - "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json" + - "@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/" "@graph": - - local_identifier: 'otf_session12324_org_1127' + - local_identifier: http://example.com/skg-if/api/organisations/otf_session12324_org_1127 entity_type: 'organisation' identifiers: - scheme: ror @@ -562,6 +649,9 @@ paths: short_name: EU types: - funder + '404': + description: | + Error if entity does not exists '/organisations': get: tags: @@ -618,15 +708,27 @@ paths: application/json: schema: properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] meta: type: object $ref: '#/components/schemas/Meta' - results: + "@graph": type: array items: $ref: '#/components/schemas/Organisation' - required: [ "meta", "results" ] - '/grants/{local_identifier}': + required: [ "@context", "meta", "@graph" ] + '/grants/{short_local_identifier}': get: tags: - Grant @@ -635,7 +737,7 @@ paths: Get single `grant`. See definition in SKG-IF [Grant](https://skg-if.github.io/interoperability-framework/docs/grant.html) ( entity_type:grant ). operationId: getGrantById parameters: - - $ref : '#/components/parameters/localIdPathParam' + - $ref : '#/components/parameters/shortLocalIdPathParam' responses: '200': description: Success @@ -643,27 +745,37 @@ paths: # not 'application/json-ld' to be compatible with StopLight PRISM tool application/json: schema: - allOf: - - $ref: "#/components/schemas/JsonLdCtx" - - type: object - required: ['@graph'] - properties: - "@graph": - type: array - minItems: 1 - maxItems: 1 - items: - $ref: "#/components/schemas/Grant" + required: ['@context','@graph'] + properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] + "@graph": + type: array + minItems: 1 + maxItems: 1 + items: + $ref: "#/components/schemas/Grant" examples: GrantEx01: summary: GraspOS grant value : "@context": [ "https://w3id.org/skg-if/context/1.1.0/skg-if.json", - {"@base" : "http://example.com/"} + "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", + {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"} ] "@graph" : - - local_identifier: grant-c66c6-38be-4d5f-85db-d44c9f869333 + - local_identifier: http://example.com/skg-if/api/grants/grant-c66c6-38be-4d5f-85db-d44c9f869333 entity_type: "grant" identifiers: - scheme: "doi" @@ -676,7 +788,7 @@ paths: } acronym: "GraspOS" funding_agency: - local_identifier: "otf___1730027051396___org-1" + local_identifier: http://example.com/skg-if/api/grants/otf___1730027051396___org-1 entity_type: "organisation" identifiers: - scheme: "ror" @@ -693,7 +805,7 @@ paths: end: "2025-12-31T23:59:59Z" website: "https://graspos.eu" beneficiaries: - - local_identifier: "otf___1730027051396___org-2" + - local_identifier: http://example.com/skg-if/api/organisations/otf___1730027051396___org-2 entity_type: "organisation" identifiers: - scheme: "ror" @@ -704,7 +816,7 @@ paths: website: "https://www.brown.edu/" contributions: - by: - local_identifier: "otf___1730027051396___pers-1" + local_identifier: http://example.com/skg-if/api/persons/otf___1730027051396___pers-1 entity_type: "person" identifiers: - scheme: "orcid" @@ -724,6 +836,9 @@ paths: website: "https://www.brown.edu/" roles: - "co-applicant" + '404': + description: | + Error if entity does not exists '/grants': get: tags: @@ -749,13 +864,13 @@ paths: | beneficiaries.short_name | `beneficiaries.short_name:BU` | | beneficiaries.website | `beneficiaries.website:https://www.brown.edu` | | beneficiaries.country | `beneficiaries.country:US` | - | contributions.by.local_identifier | `contributions.by.local_identifier:xxx` | + | contributions.by.local_identifier | `contributions.by.local_identifier:http://example.com/skg-if/api/persons/yyy` | | contributions.by.identifiers.scheme | `contributions.by.identifiers.scheme:orcid` | | contributions.by.identifiers.value | `contributions.by.identifiers.value:0000-0002-1825-0097` | | contributions.by.given_name | `contributions.by.given_name:Josiah` | | contributions.by.family_name | `contributions.by.family_name:Carberry` | | contributions.by.name | `contributions.by.name:Josiah Carberro` | - | contributions.declared_affiliations.local_identifier | `contributions.declared_affiliations.local_identifier:yyy` | + | contributions.declared_affiliations.local_identifier | `contributions.declared_affiliations.local_identifier:http://example.com/skg-if/api/organisations/ooo` | | contributions.declared_affiliations.identifiers.scheme | `contributions.declared_affiliations.identifiers.scheme:ror` | | contributions.declared_affiliations.identifiers.value | `contributions.declared_affiliations.identifiers.value:https://ror.org/05gq02987` | | contributions.declared_affiliations.name | `contributions.declared_affiliations.name:Brown University` | @@ -816,15 +931,27 @@ paths: application/json: schema: properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] meta: type: object $ref: '#/components/schemas/Meta' - results: + "@graph": type: array items: $ref: '#/components/schemas/Grant' - required: [ "meta", "results" ] - '/venues/{local_identifier}': + required: [ "@context", "meta", "@graph" ] + '/venues/{short_local_identifier}': get: tags: - Venue @@ -833,7 +960,7 @@ paths: Get single `venue`. See definition in SKG-IF [Venue](https://skg-if.github.io/interoperability-framework/docs/venue.html) ( entity_type:venue ). operationId: getVenueById parameters: - - $ref : '#/components/parameters/localIdPathParam' + - $ref : '#/components/parameters/shortLocalIdPathParam' responses: '200': description: Success @@ -841,27 +968,37 @@ paths: # not 'application/json-ld' to be compatible with StopLight PRISM tool application/json: schema: - allOf: - - $ref: "#/components/schemas/JsonLdCtx" - - type: object - required: ['@graph'] - properties: - "@graph": - type: array - minItems: 1 - maxItems: 1 - items: - $ref: "#/components/schemas/Venue" + required: ['@context','@graph'] + properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] + "@graph": + type: array + minItems: 1 + maxItems: 1 + items: + $ref: "#/components/schemas/Venue" examples: VenueEx01: summary: Journal of Psychoceramics venue value : "@context": [ "https://w3id.org/skg-if/context/1.1.0/skg-if.json", - {"@base" : "http://example.com/"} + "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", + {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"} ] "@graph" : - - local_identifier: venue-c66c6-38be-4d5f-85db-d44c9f869333 + - local_identifier: http://example.com/skg-if/api/venues/venue-c66c6-38be-4d5f-85db-d44c9f869333 entity_type: "venue" identifiers: - scheme: issn @@ -869,6 +1006,9 @@ paths: name: Journal of Psychoceramics acronym: JPC type: journal + '404': + description: | + Error if entity does not exists '/venues': get: tags: @@ -917,15 +1057,27 @@ paths: application/json: schema: properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] meta: type: object $ref: '#/components/schemas/Meta' - results: + "@graph": type: array items: $ref: '#/components/schemas/Venue' - required: [ "meta", "results" ] - '/topics/{local_identifier}': + required: [ "@context", "meta", "@graph" ] + '/topics/{short_local_identifier}': get: tags: - Topic @@ -934,7 +1086,7 @@ paths: Get single `topic`. See definition in SKG-IF [Topic](https://skg-if.github.io/interoperability-framework/docs/topic.html) ( entity_type:topic ). operationId: getTopicById parameters: - - $ref : '#/components/parameters/localIdPathParam' + - $ref : '#/components/parameters/shortLocalIdPathParam' responses: '200': description: Success @@ -942,27 +1094,37 @@ paths: # not 'application/json-ld' to be compatible with StopLight PRISM tool application/json: schema: - allOf: - - $ref: "#/components/schemas/JsonLdCtx" - - type: object - required: ['@graph'] - properties: - "@graph": - type: array - minItems: 1 - maxItems: 1 - items: - $ref: "#/components/schemas/Topic" + required: ['@context','@graph'] + properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] + "@graph": + type: array + minItems: 1 + maxItems: 1 + items: + $ref: "#/components/schemas/Topic" examples: TopicEx01: summary: Computer Science topic value : "@context": [ "https://w3id.org/skg-if/context/1.1.0/skg-if.json", - {"@base" : "http://example.com/"} + "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", + {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"} ] "@graph" : - - local_identifier: topic-c66c6-38be-4d5f-85db-d44c9f869333 + - local_identifier: http://example.com/skg-if/api/topics/topic-c66c6-38be-4d5f-85db-d44c9f869333 entity_type: "topic" identifiers: - scheme: wikidata @@ -970,6 +1132,9 @@ paths: labels: en: "Computer Science" it: "Informatica" + '404': + description: | + Error if entity does not exists '/topics': get: tags: @@ -1029,15 +1194,27 @@ paths: application/json: schema: properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] meta: type: object $ref: '#/components/schemas/Meta' - results: + "@graph": type: array items: $ref: '#/components/schemas/Topic' - required: [ "meta", "results" ] - '/datasources/{local_identifier}': + required: [ "@context", "meta", "@graph" ] + '/datasources/{short_local_identifier}': get: tags: - Data Source @@ -1046,7 +1223,7 @@ paths: Get single `datasource`. See definition in SKG-IF [Data Source](https://skg-if.github.io/interoperability-framework/docs/data-source.html) ( entity_type:datasource ). operationId: getDataSourceById parameters: - - $ref : '#/components/parameters/localIdPathParam' + - $ref : '#/components/parameters/shortLocalIdPathParam' responses: '200': description: Success @@ -1054,27 +1231,37 @@ paths: # not 'application/json-ld' to be compatible with StopLight PRISM tool application/json: schema: - allOf: - - $ref: "#/components/schemas/JsonLdCtx" - - type: object - required: ['@graph'] - properties: - "@graph": - type: array - minItems: 1 - maxItems: 1 - items: - $ref: "#/components/schemas/DataSource" + required: ['@context','@graph'] + properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] + "@graph": + type: array + minItems: 1 + maxItems: 1 + items: + $ref: "#/components/schemas/DataSource" examples: DatasourceEx01: summary: Oxford University Research Archive datasource value : "@context": [ "https://w3id.org/skg-if/context/1.1.0/skg-if.json", - {"@base" : "http://example.com/"} + "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", + {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"} ] "@graph" : - - local_identifier: datasrc-c66c6-38be-4d5f-85db-d44c9f869333 + - local_identifier: http://example.com/skg-if/api/datasources/datasrc-c66c6-38be-4d5f-85db-d44c9f869333 entity_type: "datasource" identifiers: - scheme: doi @@ -1084,6 +1271,9 @@ paths: research_product_types: - "research data" - "literature" + '404': + description: | + Error if entity does not exists '/datasources': get: tags: @@ -1132,14 +1322,26 @@ paths: application/json: schema: properties: + "@context": + type: array + description: JSON-LD context # not displayed in Stoplight elements + minItems: 3 # http://../skg-if.json, http://../skg-if-api.json and @base + uniqueItems: true + items: + anyOf: + - $ref: '#/components/schemas/JsonLdCtxDataModel' + - $ref: '#/components/schemas/JsonLdCtxSearch' + - $ref: '#/components/schemas/JsonLdCtxBaseOrMore' + examples: + - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", "https://w3id.org/skg-if/context/1.0.0/skg-if-api.json", {"@base" : "https://w3id.org/skg-if/sandbox/my-skg-acronym/"}] meta: type: object $ref: '#/components/schemas/Meta' - results: + "@graph": type: array items: $ref: '#/components/schemas/DataSource' - required: [ "meta", "results" ] + required: [ "@context", "meta", "@graph" ] components: securitySchemes: main_auth: @@ -1158,10 +1360,13 @@ components: type: http scheme: basic parameters: - localIdPathParam: - name: local_identifier + shortLocalIdPathParam: + name: short_local_identifier in: path - description: The [local identifier](https://skg-if.github.io/interoperability-framework/#local-identifiers-of-entities) that needs to be fetched + description: | + entity id. URL suffix used in OpenAPI get by id operations. \ + `https://[your-server-root-skg-if-url]/[products|persons|organisations|datasources|venues|topics]/{short_local_identifier}` \ + example `http://example.com/skg-if/api/products/c66c6-38be-4d5f-85db-d44c9` required: true schema: type: string @@ -1177,14 +1382,15 @@ components: name: page in: query description: | - Search page number. + Search page reference (page number or search iteration token).\ + Note: As a client application you should build your iterating logic using the `meta.next_page.local_identifier` and `meta.prev_page.local_identifier` URLs schema: - type: integer + type: string pageSizeQueryParam: name: page_size in: query description: | - Search page size. + Search page size. limit search result size. schema: type: integer schemas: @@ -1284,7 +1490,7 @@ components: $ref: '#/components/schemas/ProductRelated' examples: - - local_identifier: xxx + - local_identifier: http://example.com/skg-if/api/products/xxx entity_type: product product_type: literature titles : @@ -1308,11 +1514,11 @@ components: identifiers: - value: "0000-0001-6960-357X" scheme: "orcid" - local_identifier: "614a6575-5d6c-416c-a8e1-f49a5d589bf8" + local_identifier: http://example.com/skg-if/api/persons/614a6575-5d6c-416c-a8e1-f49a5d589bf8 entity_type: "person" declared_affiliations: - name: "Center for Plant Biotechnology and Genomics, Universidad Politécnica de Madrid, Madrid, 28223, Spain" - local_identifier: "32bc66c6-38be-4d5f-85db-d44c9f86921f" + local_identifier: http://example.com/skg-if/api/persons/32bc66c6-38be-4d5f-85db-d44c9f86921f entity_type: "organisation" country: "ES" manifestations: @@ -1323,7 +1529,7 @@ components: class: http://www.example.com/types/onto/localtypemethodology biblio: hosting_data_source: - local_identifier: 6f368a3a-b1cf-498f-b2de-27135d1e0075 + local_identifier: http://example.com/skg-if/api/datasources/6f368a3a-b1cf-498f-b2de-27135d1e0075 entity_type: datasource name: "An Archive" in: @@ -1332,7 +1538,7 @@ components: identifiers: - "value": "2052-4463" "scheme": "issn" - local_identifier: "51f46bc1-00f8-42dd-8221-ac4deb52fb25" + local_identifier: http://example.com/skg-if/api/datasources/51f46bc1-00f8-42dd-8221-ac4deb52fb25 entity_type: "venue" dates: # http://api.crossref.org/works/10.1038/sdata.2016.18 publication: @@ -1343,7 +1549,7 @@ components: deposit: - "2023-01-04" funding: - - local_identifier: "614a6575-5d6c-416c-a8e1-f49a5d58999" + - local_identifier: http://example.com/skg-if/api/grants/614a6575-5d6c-416c-a8e1-f49a5d58999 entity_type: "grant" titles: - en: "EU grant ZZ" @@ -1770,7 +1976,7 @@ components: country: US types": - education - - local_identifier: 'otf_session12325_org_1125' + - local_identifier: http://example.com/skg-if/api/organisations/otf_session12325_org_1125 entity_type: 'organisation' identifiers: - scheme: ror @@ -1782,10 +1988,10 @@ components: country: US types: - archive - - local_identifier: 'otf_session12325_org_1126' + - local_identifier: http://example.com/skg-if/api/organisations/otf_session12325_org_1126 entity_type: 'organisation' name: Lab of science, unknown University, Antarctica - - local_identifier: 'otf_session12324_org_1127' + - local_identifier: http://example.com/skg-if/api/organisations/otf_session12324_org_1127 entity_type: 'organisation' identifiers: - scheme: ror @@ -1830,7 +2036,7 @@ components: type: string description: end date. Format [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) compliant string ( "2024-10-01", "2024-10", "2024" ).' examples: - - local_identifier: 'otf_session12324_person_1124' + - local_identifier: http://example.com/skg-if/api/persons/otf_session12324_person_1124 entity_type: 'person' identifiers: - scheme: orcid @@ -1844,7 +2050,7 @@ components: start: "2010-08-24" end: "2020-08-24" affiliation: - local_identifier: 'otf_session12324_org_1124' + local_identifier: http://example.com/skg-if/api/organisatios/otf_session12324_org_1124 entity_type: 'organisation' identifiers: - scheme: ror @@ -1905,7 +2111,7 @@ components: examples : - Josiah Carberro examples: - - local_identifier: 'otf_session12324_person_1124' + - local_identifier: http://example.com/skg-if/api/persons/otf_session12324_person_1124 entity_type: 'person' identifiers: - scheme: orcid @@ -2284,8 +2490,9 @@ components: local_identifier: type: string description: | - Unique local identifier of the entity. \ - It should be resolvable with the URL `//` ex: `/products/c66c6-38be-4d5f-85db-d44c9` \ + Unique local identifier as URL. \ + `https://[your-server-root-skg-if-url]/[products|persons|organisations|datasources|venues|topics]/{short_local_identifier}` \ + example `http://example.com/skg-if/api/products/c66c6-38be-4d5f-85db-d44c9` \ \ If the entity does not have any stable identifier an on-the-fly identifier is returned : `otf______`. - `otf` stands for on-the-fly to explicitly clarify the local identifiers it has been created for the purpose of creating this SKG-IF document; @@ -2295,7 +2502,10 @@ components: x-faker: fake : ['{{random.uuid}}'] examples: - - c66c6-38be-4d5f-85db-d44c9 + - http://example.com/skg-if/api/products/c66c6-38be-4d5f-85db-d44c9 + - http://example.com/skg-if/api/products/otf___1730027051396___prod-1 + - http://example.com/skg-if/api/persons/c7777-38be-4d5f-85db-d7777 + - http://example.com/skg-if/api/persons/otf___1730027051396___person-1 identifiers: type: array items: @@ -2311,22 +2521,70 @@ components: type: string Meta: type: object + required: [ "local_identifier", "entity_type" ] properties: - count: - description: total results count - type: integer - x-faker: - datatype.number: [{min: 100, max: 200}] - page: - description: current result page - type: integer - x-faker: - datatype.number: [{min: 1, max: 3}] - page_size: - description: page size - type: integer - x-faker: - datatype.number: [{min: 10, max: 10}] + local_identifier: + type: string + description: search result page id + examples: + - https://example.com/skg-if/api/products?filter=xxx&page=y + - https://example.com/skg-if/api/persons?filter=xxx&page=y + entity_type: + type: string + description: search result page type + enum: + - search_result_page + prev_page: + description: Previous page reference + type: object + $ref: '#/components/schemas/SearchResultPage' + next_page: + description: Next page reference + type: object + $ref: '#/components/schemas/SearchResultPage' + part_of: + description: Reference for the search result as a whole (all pages) + type: object + required: [ "local_identifier", "entity_type" ] + properties: + local_identifier: + type: string + description: search result id as URL + examples: + - https://example.com/skg-if/api/products?filter=xxx + - https://example.com/skg-if/api/persons?filter=xxx + entity_type: + type: string + description: search type. Value must be `search_result` + enum: + - search_result + total_items: + description: total number of item entities for the search + type: integer + x-faker: + datatype.number: [{min: 10, max: 100}] + first_page: + description: First page reference of the search + type: object + $ref: '#/components/schemas/SearchResultPage' + last_page: + description: Last page reference of the search + type: object + $ref: '#/components/schemas/SearchResultPage' + SearchResultPage: + type: object + properties: + local_identifier: + type: string + description: search result page id as URL + examples: + - https://example.com/skg-if/api/products?filter=xxx&page=y + - https://example.com/skg-if/api/persons?filter=xxx&page=y + entity_type: + type: string + description: search result page type. Value must be `search_result_page` + enum: + - search_result_page Error: type: object properties: @@ -2356,47 +2614,37 @@ components: description: A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. - JsonLdCtx: - type: object - description: "This JSON-LD context for SKG-IF entities" + JsonLdCtxDataModel: + type: string + description: "URL to SKG-IF data model context supported by the current OpenAPI `https://w3id.org/skg-if/context/1.1.0/skg-if.json`" + enum: + - https://w3id.org/skg-if/context/1.1.0/skg-if.json + x-faker: + fake: ['https://w3id.org/skg-if/context/1.1.0/skg-if.json'] + JsonLdCtxSearch: + type: string + description: "URL to SKG-IF API context (meta section) supported by the current OpenAPI `https://w3id.org/skg-if/context/1.0.0/skg-if-api.json`" + enum: + - https://w3id.org/skg-if/context/1.0.0/skg-if-api.json + x-faker: + fake: ['https://w3id.org/skg-if/context/1.0.0/skg-if-api.json'] + JsonLdCtxBaseOrMore: + description : 'Additional context mappings ex: `{ "@base":"https://w3id.org/skg-if/sandbox/my-skg-acronym" }`' properties: - "@context": - description: JSON-LD context for SKG-IF entities - type: array - minItems: 1 - maxItems: 2 - items: - anyOf: - - type: string - description: "URL to SKG-IF context supported by the current OpenApi" - enum: - - https://w3id.org/skg-if/context/1.1.0/skg-if.json - #default: "https://w3id.org/skg-if/context/1.1.0/skg-if.json" - x-faker: - fake: ['https://w3id.org/skg-if/context/1.1.0/skg-if.json'] - #examples: - # - "https://w3id.org/skg-if/context/1.1.0/skg-if.json" - - type: object - properties: - "@base": - type: string - description : "Default base URL specific to the implementer. https://w3id.org/skg-if/sandbox/provider_accronym/" - x-faker: - fake: ['https://w3id.org/skg-if/sandbox/my_prov/'] - examples: - - "https://w3id.org/skg-if/sandbox/my_prov/" - #required: ["@base"] - additionalProperties: - type: string - description: "context URL of extension entities" - x-faker: - fake : ['http://www.example.com/skg-if/{{random.alpha(3)}}'] - #required: [ skgifjson] - #anyOf: [ - # required: [ skgifjson, skgifimpl], - # required: [ skgifjson] - #] - additionalProperties: false + "@base": + type: string + description : | + Default base URL specific to the implementer.\ + common format : `https://w3id.org/skg-if/sandbox/{my-skg-acronym}` \ + example : `https://w3id.org/skg-if/sandbox/openaire/` + x-faker: + fake: ['https://w3id.org/skg-if/sandbox/{{random.alpha(5)}}/'] examples: - - ["https://w3id.org/skg-if/context/1.1.0/skg-if.json", {"@base" : "https://w3id.org/skg-if/sandbox/my_prov/"}] - required: [ "@context" ] + - "https://w3id.org/skg-if/sandbox/openaire/" + - "https://w3id.org/skg-if/sandbox/cessda/" + - "https://w3id.org/skg-if/sandbox/foobar/" + additionalProperties: + type: string + description: "context URL of extension entities" + x-faker: + fake : ['http://www.example.com/skg-if/{{random.alpha(3)}}']