Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust OpenAPI Files for Discovery Service Profiles #229

Open
wants to merge 4 commits into
base: IDTA-01002-3-1_preparation
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 42 additions & 63 deletions DiscoveryServiceSpecification/V3.0_SSP-001.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,83 +11,62 @@ info:
license:
name: CC BY 4.0
url: https://creativecommons.org/licenses/by/4.0/
version: V3.1.0_SSP-001
x-profile-identifier: https://admin-shell.io/aas/API/3/1/DiscoveryServiceSpecification/SSP-001
version: V3.0.1_SSP-001
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version: V3.0.1_SSP-001
version: V3.1.0_SSP-001

Copy link
Collaborator

@BirgitBoss BirgitBoss Apr 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is now V3.1, no? But all changes are for V3.0.1 but you want to merge it to branch of V3.1?

x-profile-identifier: https://admin-shell.io/aas/API/3/0/DiscoveryServiceSpecification/SSP-001
BirgitBoss marked this conversation as resolved.
Show resolved Hide resolved
servers:
- url: 'https://admin-shell.io/api/v3.1'
- url: 'https://example.com/'

- url: '{protocol}://{host_name}:{port}/api/{version_prefix}'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't we decide to support very flexible URL, just {protocol}://{base-url}. + Text: We recommend to use major version of API version only. After version it is still possible that there is a tenant-ID or a different order...

Copy link
Collaborator

@BirgitBoss BirgitBoss Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 3.0.1 but 3.0.1 is already released: I am getting confused…

variables:
protocol:
description: 'Allows access through http and https (recommended)'
enum:
- 'http'
- 'https'
default: 'https'
host_name:
default: admin-shell.io
description: 'Hostname of server hosting the api'
port:
enum:
- '80'
- '443'
default: '443'
description: '80 is default for http, 443 for https'
version_prefix:
enum:
- 'v3.0'
default: v3.0
paths:
/lookup/shells:
get:
deprecated: true
tags:
- Asset Administration Shell Basic Discovery API
summary: Returns a list of Asset Administration Shell ids linked to specific Asset identifiers
operationId: GetAllAssetAdministrationShellIdsByAssetLink
x-semanticIds:
- https://admin-shell.io/aas/API/GetAllAssetAdministrationShellIdsByAssetLink/3/0
parameters:
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/parameters/AssetIds'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this changed? I expected it to stay as it was?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 3,0

- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/parameters/Limit'
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/parameters/Cursor'
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/parameters/AssetIds'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not parameter any longer but part of the request body

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This 3.0.1

- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/parameters/Limit'
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/parameters/Cursor'
responses:
'200':
description: Requested Asset Administration Shell ids
content:
application/json:
schema:
allOf:
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/schemas/PagedResult'
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/schemas/PagedResult'
- type: object
properties:
result:
type: array
items:
type: string
default:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/default'
/lookup/shellsByAssetLink:
post:
tags:
- Asset Administration Shell Basic Discovery API
summary: Returns a list of Asset Administration Shell ids linked to specific Asset identifiers
operationId: SearchAllAssetAdministrationShellIdsByAssetLink
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this operation removed? it is the new one, no?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 3.0

x-semanticIds:
- https://admin-shell.io/aas/API/SearchAllAssetAdministrationShellIdsByAssetLink/3/1
parameters:
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/parameters/Limit'
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/parameters/Cursor'
requestBody:
description: A list of specific Asset identifiers
content:
application/json:
schema:
type: array
items:
'$ref': 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/schemas/AssetLink'
responses:
'200':
description: Requested Asset Administration Shell ids
content:
application/json:
schema:
allOf:
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/schemas/PagedResult'
- type: object
properties:
result:
type: array
items:
type: string
'400':
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/bad-request'
default:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/default'

$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/responses/default'
/lookup/shells/{aasIdentifier}:
parameters:
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/parameters/AssetAdministrationShellIdentifier'
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/parameters/AssetAdministrationShellIdentifier'
get:
tags:
- Asset Administration Shell Basic Discovery API
Expand All @@ -103,11 +82,11 @@ paths:
schema:
type: array
items:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/SpecificAssetId'
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.0.1#/components/schemas/SpecificAssetId'
'404':
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/not-found'
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/responses/not-found'
default:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/default'
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/responses/default'
post:
tags:
- Asset Administration Shell Basic Discovery API
Expand All @@ -122,7 +101,7 @@ paths:
schema:
type: array
items:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/SpecificAssetId'
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.0.1#/components/schemas/SpecificAssetId'
required: true
responses:
'201':
Expand All @@ -132,15 +111,15 @@ paths:
schema:
type: array
items:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/SpecificAssetId'
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.0.1#/components/schemas/SpecificAssetId'
'400':
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/bad-request'
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/responses/bad-request'
'404':
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/not-found'
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/responses/not-found'
'409':
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/conflict'
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/responses/conflict'
default:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/default'
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/responses/default'
delete:
tags:
- Asset Administration Shell Basic Discovery API
Expand All @@ -152,9 +131,9 @@ paths:
'204':
description: Specific Asset identifiers deleted successfully
'404':
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/not-found'
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/responses/not-found'
default:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/default'
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/responses/default'
/description:
get:
tags:
Expand All @@ -169,6 +148,6 @@ paths:
content:
application/json:
schema:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/schemas/ServiceDescription'
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/schemas/ServiceDescription'
default:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/default'
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.0.1#/components/responses/default'
174 changes: 174 additions & 0 deletions DiscoveryServiceSpecification/V3.1_SSP-001.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
openapi: 3.0.3
info:
title: DotAAS Part 2 | HTTP/REST | Discovery Service Specification (V3.1 Draft, not released)
description: >-
The entire Full Profile of the Discovery Service Specification as part of the [Specification of the Asset Administration Shell: Part 2](http://industrialdigitaltwin.org/en/content-hub).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The entire Full Profile of the Discovery Service Specification as part of the [Specification of the Asset Administration Shell: Part 2](http://industrialdigitaltwin.org/en/content-hub).
The entire Full Profile of the Discovery Service Specification as part of the [Specification of the Asset Administration Shell: Part 2](https://industrialdigitaltwin.org/en/content-hub/aasspecifications).


Publisher: Industrial Digital Twin Association (IDTA) April 2023
contact:
name: Industrial Digital Twin Association (IDTA)
email: [email protected]
license:
name: CC BY 4.0
url: https://creativecommons.org/licenses/by/4.0/
version: V3.1.0_SSP-001
x-profile-identifier: https://admin-shell.io/aas/API/3/1/DiscoveryServiceSpecification/SSP-001
servers:
- url: 'https://admin-shell.io/api/v3.1'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only v3 or v3.1 correct in this context?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both are possible. I feel like "v3.1" is closer to the profile version. Doesn't really matter.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it is a url? And we recommend in endpoints to just use major version

- url: 'https://example.com/'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why two url?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make clear that the "/api/v3.1" path segments are not mandatory.


paths:
/lookup/shells:
get:
deprecated: true
tags:
- Asset Administration Shell Basic Discovery API
summary: Returns a list of Asset Administration Shell ids linked to specific Asset identifiers
operationId: GetAllAssetAdministrationShellIdsByAssetLink
x-semanticIds:
- https://admin-shell.io/aas/API/GetAllAssetAdministrationShellIdsByAssetLink/3/0
parameters:
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/parameters/AssetIds'
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/parameters/Limit'
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/parameters/Cursor'
responses:
'200':
description: Requested Asset Administration Shell ids
sebbader-sap marked this conversation as resolved.
Show resolved Hide resolved
content:
application/json:
schema:
allOf:
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/schemas/PagedResult'
- type: object
properties:
result:
type: array
items:
type: string
default:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/default'
/lookup/shellsByAssetLink:
post:
tags:
- Asset Administration Shell Basic Discovery API
summary: Returns a list of Asset Administration Shell ids linked to specific Asset identifiers
operationId: SearchAllAssetAdministrationShellIdsByAssetLink
x-semanticIds:
- https://admin-shell.io/aas/API/SearchAllAssetAdministrationShellIdsByAssetLink/3/1
parameters:
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/parameters/Limit'
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/parameters/Cursor'
requestBody:
description: A list of specific Asset identifiers
Copy link
Collaborator

@BirgitBoss BirgitBoss Mar 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: A list of specific Asset identifiers
description: A list of specific asset identifiers. Search for the global asset ID is supported by setting "name" to "globalAssetId" (see Constraint AASd-077).

content:
application/json:
schema:
type: array
items:
'$ref': 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/schemas/AssetLink'
responses:
'200':
description: Requested Asset Administration Shell ids
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: Requested Asset Administration Shell ids
description: Requested Asset Administration Shell IDs

content:
application/json:
schema:
allOf:
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/schemas/PagedResult'
- type: object
properties:
result:
type: array
items:
type: string
'400':
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/bad-request'
default:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/default'

/lookup/shells/{aasIdentifier}:
parameters:
- $ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/parameters/AssetAdministrationShellIdentifier'
get:
tags:
- Asset Administration Shell Basic Discovery API
summary: Returns a list of specific Asset identifiers based on an Asset Administration Shell id to edit discoverable content
Copy link
Collaborator

@BirgitBoss BirgitBoss Mar 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
summary: Returns a list of specific Asset identifiers based on an Asset Administration Shell id to edit discoverable content
summary: Returns a list of specific asset identifiers based on an Asset Administration Shell ID to edit discoverable content. The global asset ID is returned as specific asset ID with "name" equal to "globalAssetId" (see Constraint AASd-077).

operationId: GetAllAssetLinksById
x-semanticIds:
- https://admin-shell.io/aas/API/GetAllAssetLinksById/3/0
responses:
'200':
description: Requested specific Asset identifiers
content:
application/json:
schema:
type: array
items:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/SpecificAssetId'
'404':
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/not-found'
default:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/default'
post:
tags:
- Asset Administration Shell Basic Discovery API
summary: Creates specific Asset identifiers linked to an Asset Administration Shell to edit discoverable content
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
summary: Creates specific Asset identifiers linked to an Asset Administration Shell to edit discoverable content
summary: Creates specific asset identifiers linked to an Asset Administration Shell to edit discoverable content

operationId: PostAllAssetLinksById
x-semanticIds:
- https://admin-shell.io/aas/API/PostAllAssetLinksById/3/0
requestBody:
description: A list of specific Asset identifiers
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: A list of specific Asset identifiers
description: A list of specific asset identifiers

content:
application/json:
schema:
type: array
items:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.0.1#/components/schemas/SpecificAssetId'
required: true
responses:
'201':
description: Specific Asset identifiers created successfully
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: Specific Asset identifiers created successfully
description: Specific asset identifiers created successfully

content:
application/json:
schema:
type: array
items:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.0.1#/components/schemas/SpecificAssetId'
'400':
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/bad-request'
'404':
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/not-found'
'409':
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/conflict'
default:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/default'
delete:
tags:
- Asset Administration Shell Basic Discovery API
summary: Deletes all specific Asset identifiers linked to an Asset Administration Shell to edit discoverable content
operationId: DeleteAllAssetLinksById
x-semanticIds:
- https://admin-shell.io/aas/API/DeleteAllAssetLinksById/3/0
responses:
'204':
description: Specific Asset identifiers deleted successfully
'404':
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/not-found'
default:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/default'
/description:
get:
tags:
- Description API
summary: Returns the self-describing information of a network resource (ServiceDescription)
operationId: GetDescription
x-semanticIds:
- https://admin-shell.io/aas/API/Descriptor/GetDescription/3/0
responses:
'200':
description: Requested Description
content:
application/json:
schema:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/schemas/ServiceDescription'
default:
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/default'