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

Added artifacts for part_site_information_as_planned-1.0.0 #438

Merged
Merged
Show file tree
Hide file tree
Changes from all 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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"$schema" : "http://json-schema.org/draft-04/schema",
"description" : "The aspect provides site related information for a given as planned item (i.e. a part type or part instance that is uniquely identifiable within Catena-X via its Catena-X ID). A site is a delimited geographical area where a legal entity does business. In the \"as planned\" lifecycle context all potentially related sites are listed including all sites where e.g. production of this part (type) is planned.",
"type" : "object",
"components" : {
"schemas" : {
"urn_samm_io.catenax.part_site_information_as_planned_1.0.0_CatenaXIdTrait" : {
"type" : "string",
"description" : "The provided regular expression ensures that the UUID is composed of five groups of characters separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters (32 hexadecimal characters and 4 hyphens), optionally prefixed by \"urn:uuid:\" to make it an IRI.",
"pattern" : "(^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)|(^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)"
},
"urn_samm_io.catenax.part_site_information_as_planned_1.0.0_BpnCharacteristic" : {
"type" : "string",
"description" : "A string of 16 characters:\nPrefix: 3 digits\t\t\t\t\nClassification: 1 digit\nIdentifier: 10 digits"
},
"urn_samm_io.catenax.part_site_information_as_planned_1.0.0_FunctionCharacteristic" : {
"type" : "string",
"enum" : [ "production" ]
},
"urn_samm_org.eclipse.esmf.samm_characteristic_2.1.0_Timestamp" : {
"type" : "string",
"pattern" : "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?",
"description" : "Describes a Property which contains the date and time with an optional timezone."
},
"urn_samm_io.catenax.part_site_information_as_planned_1.0.0_SiteEntity" : {
"description" : "Site Entity",
"type" : "object",
"properties" : {
"catenaXsiteId" : {
"description" : "The identifier of the site according to Catena-X BPDM. The catenaXsiteId must be a valid Catena-X BPN. The BPN is a unique, unchangeable identifier for Business Partners / company locations from foundation to closure, regardless of the different business relationships / structures between or within the Business Partners or company locations.",
"$ref" : "#/components/schemas/urn_samm_io.catenax.part_site_information_as_planned_1.0.0_BpnCharacteristic"
},
"function" : {
"description" : "The function of the site in relation to the part (i.e. the activity within the value chain of the part that is performed at the site)",
"$ref" : "#/components/schemas/urn_samm_io.catenax.part_site_information_as_planned_1.0.0_FunctionCharacteristic"
},
"functionValidFrom" : {
"description" : "Timestamp, from when the site has the specified function for the given part",
"$ref" : "#/components/schemas/urn_samm_org.eclipse.esmf.samm_characteristic_2.1.0_Timestamp"
},
"functionValidUntil" : {
"description" : "Timestamp, until when the site has the specified function for the given part",
"$ref" : "#/components/schemas/urn_samm_org.eclipse.esmf.samm_characteristic_2.1.0_Timestamp"
}
},
"required" : [ "catenaXsiteId", "function" ]
},
"urn_samm_io.catenax.part_site_information_as_planned_1.0.0_SitesCharacteristic" : {
"description" : "Sites Characteristic",
"type" : "array",
"items" : {
"$ref" : "#/components/schemas/urn_samm_io.catenax.part_site_information_as_planned_1.0.0_SiteEntity"
},
"uniqueItems" : true
}
}
},
"properties" : {
"catenaXId" : {
"description" : "The Catena-X ID of the given item (i.e. a part type or part instance), valid for the Catena-X dataspace.",
"$ref" : "#/components/schemas/urn_samm_io.catenax.part_site_information_as_planned_1.0.0_CatenaXIdTrait"
},
"sites" : {
"description" : "A site is a delimited geographical area where a legal entity does business (geographical address with geo coordinates).A site always has a primary physical address. It is possible that further physical addresses are specified for the site. P.O. box details are only possible in addition to the physical address. A site has a 1:n relation to addresses, means at least 1 address is necessary and multiple addresses are possible.",
"$ref" : "#/components/schemas/urn_samm_io.catenax.part_site_information_as_planned_1.0.0_SitesCharacteristic"
}
},
"required" : [ "catenaXId", "sites" ]
}
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"catenaXId" : "580d3adf-1981-44a0-a214-13d6ceed9379",
"sites" : [ {
"functionValidUntil" : "2023-10-31T11:06:27.232+01:00",
"catenaXsiteId" : "BPNS1234567890ZZ",
"function" : "production",
"functionValidFrom" : "2023-10-31T11:06:27.231+01:00"
} ]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
---
openapi: 3.0.3
info:
title: Part Site Information as Planned
version: v1
servers:
- url: catenax.io/api/v1
variables:
api-version:
default: v1
paths:
/{tenant-id}/part-site-information-as-planned:
get:
tags:
- PartSiteInformationAsPlanned
operationId: getPartSiteInformationAsPlanned
parameters:
- name: tenant-id
in: path
description: The ID of the tenant owning the requested Twin.
required: true
schema:
type: string
format: uuid
- name: start
in: query
description: Starting index which is starting by 0
required: false
schema:
type: number
- name: count
in: query
description: Number of items to return per call.
required: false
schema:
type: number
- name: totalItemCount
in: query
description: Flag that indicates that the total counts should be returned.
required: false
schema:
type: boolean
responses:
"200":
$ref: '#/components/responses/PartSiteInformationAsPlanned'
"401":
$ref: '#/components/responses/ClientError'
"402":
$ref: '#/components/responses/Unauthorized'
"403":
$ref: '#/components/responses/Forbidden'
"404":
$ref: '#/components/responses/NotFoundError'
components:
schemas:
ErrorResponse:
type: object
required:
- error
properties:
error:
$ref: '#/components/schemas/Error'
Error:
type: object
required:
- details
properties:
message:
type: string
minLength: 1
path:
type: string
minLength: 1
details:
type: object
minLength: 1
additionalProperties:
type: object
code:
type: string
nullable: true
PagingSchema:
type: object
properties:
items:
type: array
items:
$ref: '#/components/schemas/PartSiteInformationAsPlanned'
totalItems:
type: number
totalPages:
type: number
pageSize:
type: number
currentPage:
type: number
urn_samm_io.catenax.part_site_information_as_planned_1.0.0_CatenaXIdTrait:
type: string
description: "The provided regular expression ensures that the UUID is composed\
\ of five groups of characters separated by hyphens, in the form 8-4-4-4-12\
\ for a total of 36 characters (32 hexadecimal characters and 4 hyphens),\
\ optionally prefixed by \"urn:uuid:\" to make it an IRI."
pattern: "(^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)|(^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)"
urn_samm_io.catenax.part_site_information_as_planned_1.0.0_BpnCharacteristic:
type: string
description: "A string of 16 characters:\nPrefix: 3 digits\t\t\t\t\nClassification:\
\ 1 digit\nIdentifier: 10 digits"
urn_samm_io.catenax.part_site_information_as_planned_1.0.0_FunctionCharacteristic:
type: string
enum:
- production
urn_samm_org.eclipse.esmf.samm_characteristic_2.1.0_Timestamp:
type: string
pattern: "-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\\
.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?"
description: Describes a Property which contains the date and time with an optional
timezone.
urn_samm_io.catenax.part_site_information_as_planned_1.0.0_SiteEntity:
description: Site Entity
type: object
properties:
catenaXsiteId:
description: "The identifier of the site according to Catena-X BPDM. The\
\ catenaXsiteId must be a valid Catena-X BPN. The BPN is a unique, unchangeable\
\ identifier for Business Partners / company locations from foundation\
\ to closure, regardless of the different business relationships / structures\
\ between or within the Business Partners or company locations."
$ref: '#/components/schemas/urn_samm_io.catenax.part_site_information_as_planned_1.0.0_BpnCharacteristic'
function:
description: The function of the site in relation to the part (i.e. the
activity within the value chain of the part that is performed at the site)
$ref: '#/components/schemas/urn_samm_io.catenax.part_site_information_as_planned_1.0.0_FunctionCharacteristic'
functionValidFrom:
description: "Timestamp, from when the site has the specified function for\
\ the given part"
$ref: '#/components/schemas/urn_samm_org.eclipse.esmf.samm_characteristic_2.1.0_Timestamp'
functionValidUntil:
description: "Timestamp, until when the site has the specified function\
\ for the given part"
$ref: '#/components/schemas/urn_samm_org.eclipse.esmf.samm_characteristic_2.1.0_Timestamp'
required:
- catenaXsiteId
- function
urn_samm_io.catenax.part_site_information_as_planned_1.0.0_SitesCharacteristic:
description: Sites Characteristic
type: array
items:
$ref: '#/components/schemas/urn_samm_io.catenax.part_site_information_as_planned_1.0.0_SiteEntity'
uniqueItems: true
PartSiteInformationAsPlanned:
description: The aspect provides site related information for a given as planned
item (i.e. a part type or part instance that is uniquely identifiable within
Catena-X via its Catena-X ID). A site is a delimited geographical area where
a legal entity does business. In the "as planned" lifecycle context all potentially
related sites are listed including all sites where e.g. production of this
part (type) is planned.
type: object
properties:
catenaXId:
description: "The Catena-X ID of the given item (i.e. a part type or part\
\ instance), valid for the Catena-X dataspace."
$ref: '#/components/schemas/urn_samm_io.catenax.part_site_information_as_planned_1.0.0_CatenaXIdTrait'
sites:
description: "A site is a delimited geographical area where a legal entity\
\ does business (geographical address with geo coordinates).A site always\
\ has a primary physical address. It is possible that further physical\
\ addresses are specified for the site. P.O. box details are only possible\
\ in addition to the physical address. A site has a 1:n relation to addresses,\
\ means at least 1 address is necessary and multiple addresses are possible."
$ref: '#/components/schemas/urn_samm_io.catenax.part_site_information_as_planned_1.0.0_SitesCharacteristic'
required:
- catenaXId
- sites
responses:
Unauthorized:
description: The requesting user or client is not authenticated.
Forbidden:
description: The requesting user or client is not authorized to access resources
for the given tenant.
NotFoundError:
description: The requested Twin has not been found.
ClientError:
description: Payload or user input is invalid. See error details in the payload
for more.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
PartSiteInformationAsPlanned:
content:
application/json:
schema:
$ref: '#/components/schemas/PagingSchema'
description: The request was successful.
requestBodies:
PartSiteInformationAsPlanned:
content:
application/json:
schema:
$ref: '#/components/schemas/PartSiteInformationAsPlanned'