You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When reading and parsing an OpenAPI document with the OpenApi.Net library and there is a Path is a reference to another Path in another document where the path contains segments and therefore contina forward slashes between path segments, these have to be escaped with ~1 in the Path reference and the OpenApi library cannot resolve these.
To Reproduce
Parse the attached example with this OpenAPI.Net library.
Expected behavior
When a Path is a reference to a path in another file then the forward slashes in th path is escaped with ~1, the reference should be resolved to the correct path in the other file, currently it cannot be resolved.
Screenshots/Code Snippets
The reference in file (see attached) registration_v4.yaml is:
"/applications/{AppUUID}/services/{ServiceName}":
#~1 is escape for forward slash in json pointer
$ref: 'common-definitions_v4.yaml#/paths/~1applications~1{AppUUID}~1services~1{ServiceName}'
And the Path definition in the file common-definitions_v4.yaml is:
"/applications/{AppUUID}/services/{ServiceName}":
get:
tags:
- Service Versions
summary: 'Retrieves details of all the versions and their endpoints for a specified service.'
security:
- OAuth2: ['mx:datahub:services:read', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: '#/components/parameters/AppUUID_Path'
- $ref: '#/components/parameters/ServiceName_Path'
responses:
'200':
$ref: '#/components/responses/Service_GET_200'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'410':
$ref: '#/components/responses/410'
'500':
$ref: '#/components/responses/500'
EXAMPLE
registration_v4.yaml
openapi: 3.0.1
info:
title: 'Data Hub Registration API'
description: "This is the API description for the Data Hub. With these APIs, you can register and manage your data sources and datasets in the Data Hub."
termsOfService: '#'
contact:
email: PlatformCore@democompany.com
version: '4.1.0'
externalDocs:
description: 'Specification of this API'
url: 'https://docs.democompany.com/apidocs-mxsdk/apidocs/data-hub-apis/'
servers:
- url: 'https://hub.democompany.com/rest/registration/v4'
paths:
/applications:
post:
tags:
- Applications
summary: 'Registers an application'
security:
- OAuth2: ['mx:datahub:services:write', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
requestBody:
$ref: '#/components/requestBodies/Applications_POST'
responses:
'201':
$ref: '#/components/responses/Applications_POST_201'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
get:
tags:
- Applications
summary: 'Retrieves all the applications from users company'
security:
- OAuth2: ['mx:datahub:services:read', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- in: query
name: "limit"
description: 'The maximum number of applications that can be returned per request. If the total applications retrieved is more than this limit, then we shall provide page links for retrieval of subsequent applications in the response. If no limit is provided it shall be defaulted to 20, the maximum limit that can be supplied is 100, if a limit over 100 is supplied it shall be defaulted to 100 and no error message shall be generated.'
schema:
type: integer
minimum: 1
default: 20
maximum: 100
- in: query
name: "offset"
description: 'The offset is the zero-based index of the first application to be returned on the page.'
schema:
type: integer
minimum: 0
default: 0
responses:
'200':
$ref: '#/components/responses/All_Applications_GET_200'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
"/applications/{AppUUID}":
get:
tags:
- Applications
summary: 'Retrieves the details of a particular application'
security:
- OAuth2: ['mx:datahub:services:read', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
responses:
'200':
$ref: '#/components/responses/Application_GET_200'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
delete:
tags:
- Applications
summary: 'Deletes the specified application and all environments and endpoints associated to it'
description: 'Deleting an application can only be done by the owner of the resource’s application, Democompany Admins, or Data Hub Curators.'
security:
- OAuth2: ['mx:datahub:services:write', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
responses:
'204':
$ref: 'common-definitions_v4.yaml#/components/responses/204'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
externalDocs:
description: 'Learn more about the specific roles required to execute this API operation.'
url: 'https://docs.democompany.com/data-hub/#data-hub-roles'
put:
tags:
- Applications
summary: "Register a new application or update an existing application at the given UUID. Currently registered application are overwritten with the values provided in this request body."
description: 'Some PUT operations can only be done by the owner of the resource’s application, Democompany Admins, or Data Hub Curators.'
security:
- OAuth2: ['mx:datahub:services:write', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
requestBody:
$ref: '#/components/requestBodies/Applications_PUT'
responses:
'200':
$ref: '#/components/responses/Applications_PUT_200'
'201':
$ref: "#/components/responses/Applications_PUT_201"
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
externalDocs:
description: 'Learn more about the specific roles required to execute this API operation.'
url: 'https://docs.democompany.com/data-hub/#data-hub-roles'
"/applications/{AppUUID}/environments":
post:
tags:
- Environments
summary: 'Registers an environment for the specified application'
security:
- OAuth2: ['mx:datahub:services:write', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
requestBody:
$ref: '#/components/requestBodies/Environments_POST'
responses:
'201':
$ref: '#/components/responses/Environments_POST_201'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'409':
$ref: 'common-definitions_v4.yaml#/components/responses/409'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
get:
tags:
- Environments
summary: 'Retrieves the details of all environments of an application'
security:
- OAuth2: ['mx:datahub:services:read', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
- in: query
name: "environmentType"
schema:
type: string
enum: ['Production','Non-Production','Sandbox']
description: 'Type of environment. (Default: all environment types)'
- in: query
name: "limit"
description: 'The maximum number of environments that can be returned per request. If the total environments retrieved is more than this limit, then we shall provide page links for retrieval of subsequent environments in the response. If no limit is provided it shall be defaulted to 20, the maximum limit that can be supplied is 100, if a limit over 100 is supplied it shall be defaulted to 100 and no error message shall be generated.'
schema:
type: integer
minimum: 1
default: 20
maximum: 100
- in: query
name: "offset"
description: 'The offset is the zero-based index of the first environment to be returned on the page.'
schema:
type: integer
minimum: 0
default: 0
responses:
'200':
$ref: '#/components/responses/ApplicationEnvironments_GET_200'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
"/applications/{AppUUID}/environments/{EnvironmentUUID}":
get:
tags:
- Environments
summary: 'Retrieves the details of a particular environment of an application'
security:
- OAuth2: ['mx:datahub:services:read', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EnvironmentUUID_Path'
responses:
'200':
$ref: '#/components/responses/Environments_GET_200'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
delete:
tags:
- Environments
summary: 'Deletes the specified environment'
description: 'Deleting an environment can only be done by the owner of the resource’s application, Democompany Admins, or Data Hub Curators.'
security:
- OAuth2: ['mx:datahub:services:write', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EnvironmentUUID_Path'
responses:
'204':
$ref: 'common-definitions_v4.yaml#/components/responses/204'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
externalDocs:
description: 'Learn more about the specific roles required to execute this API operation.'
url: 'https://docs.democompany.com/data-hub/#data-hub-roles'
put:
tags:
- Environments
summary: "Registers or updates a specific environment at the given UUID. Currently registered environments are overwritten with the values provided in this request body."
description: 'Some PUT operations can only be done by the owner of the resource’s application, Democompany Admins, or Data Hub Curators.'
security:
- OAuth2: ['mx:datahub:services:write', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EnvironmentUUID_Path'
requestBody:
$ref: '#/components/requestBodies/Environments_PUT'
responses:
'200':
$ref: '#/components/responses/Environments_PUT_200'
'201':
$ref: '#/components/responses/Environments_PUT_201'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
externalDocs:
description: 'Learn more about the specific roles required to execute this API operation.'
url: 'https://docs.democompany.com/data-hub/#data-hub-roles'
"/applications/{AppUUID}/environments/{EnvironmentUUID}/published-endpoints":
put:
tags:
- Endpoints
summary: "Registers all published endpoints for the specified app UUID and environment UUID. Currently registered published endpoints are overwritten with the values provided in this request body. Endpoints that are not in the new request will be deleted."
description: 'Some PUT operations can only be done by the owner of the resource’s application, Democompany Admins, or Data Hub Curators.'
security:
- OAuth2: ['mx:datahub:services:write', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EnvironmentUUID_Path'
requestBody:
$ref: '#/components/requestBodies/PublishedEndpoints_PUT'
responses:
'200':
$ref: '#/components/responses/PublishedEndpoints_PUTGET_200'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
externalDocs:
description: 'Learn more about the specific roles required to execute this API operation.'
url: 'https://docs.democompany.com/data-hub/#data-hub-roles'
post:
tags:
- Endpoints
summary: "Registers a published endpoint for the specified app and environment."
security:
- OAuth2: ['mx:datahub:services:write', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EnvironmentUUID_Path'
requestBody:
$ref: '#/components/requestBodies/PublishedEndpoint_POSTPUT'
responses:
'201':
$ref: '#/components/responses/PublishedEndpoint_POSTPUT_201'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'409':
$ref: 'common-definitions_v4.yaml#/components/responses/409'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
get:
tags:
- Endpoints
summary: "Returns all published endpoints for the specified environment."
security:
- OAuth2: ['mx:datahub:services:read', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EnvironmentUUID_Path'
responses:
'200':
$ref: '#/components/responses/PublishedEndpoints_PUTGET_200'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
"/applications/{AppUUID}/environments/{EnvironmentUUID}/published-endpoints/{EndpointUUID}":
get:
tags:
- Endpoints
summary: "Returns details of the specified published endpoint"
security:
- OAuth2: ['mx:datahub:services:read', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EnvironmentUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EndpointUUID_Path'
responses:
'200':
$ref: '#/components/responses/PublishedEndpoint_GETPUT_200'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
delete:
tags:
- Endpoints
summary: "Deletes the specified published endpoint"
description: 'Deleting an endpoint can only be done by the owner of the resource’s application, Democompany Admins, or Data Hub Curators.'
security:
- OAuth2: ['mx:datahub:services:write', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EnvironmentUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EndpointUUID_Path'
responses:
'204':
$ref: 'common-definitions_v4.yaml#/components/responses/204'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
externalDocs:
description: 'Learn more about the specific roles required to execute this API operation.'
url: 'https://docs.democompany.com/data-hub/#data-hub-roles'
put:
tags:
- Endpoints
summary: "Updates the details of the specified published endpoint. Will create the published endpoint if it does not exist yet."
description: 'Some PUT operations can only be done by the owner of the resource’s application, Democompany Admins, or Data Hub Curators.'
security:
- OAuth2: ['mx:datahub:services:write', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
requestBody:
$ref: '#/components/requestBodies/PublishedEndpoint_POSTPUT'
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EnvironmentUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EndpointUUID_Path'
responses:
'200':
$ref: '#/components/responses/PublishedEndpoint_GETPUT_200'
'201':
$ref: '#/components/responses/PublishedEndpoint_POSTPUT_201'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'409':
$ref: 'common-definitions_v4.yaml#/components/responses/409'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
externalDocs:
description: 'Learn more about the specific roles required to execute this API operation.'
url: 'https://docs.democompany.com/data-hub/#data-hub-roles'
"/applications/{AppUUID}/environments/{EnvironmentUUID}/consumed-endpoints":
put:
tags:
- Endpoints
summary: "Registers all consumed endpoints for the specified app and environment. Currently registered consumed endpoints are overwritten with the values provided in this request body."
description: 'Some PUT operations can only be done by the owner of the resource’s application, Democompany Admins, or Data Hub Curators.'
security:
- OAuth2: ['mx:datahub:services:write', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EnvironmentUUID_Path'
requestBody:
$ref: '#/components/requestBodies/ConsumedEndpoints_PUT'
responses:
'200':
$ref: '#/components/responses/ConsumedEndpoints_PUTGET_200'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
externalDocs:
description: 'Learn more about the specific roles required to execute this API operation.'
url: 'https://docs.democompany.com/data-hub/#data-hub-roles'
get:
tags:
- Endpoints
summary: "Returns all consumed endpoints for the specified environment."
security:
- OAuth2: ['mx:datahub:services:read', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EnvironmentUUID_Path'
responses:
'200':
$ref: '#/components/responses/ConsumedEndpoints_PUTGET_200'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
"/applications/{AppUUID}/environments/{EnvironmentUUID}/consumed-endpoints/{EndpointUUID}":
get:
tags:
- Endpoints
summary: "Return details of specified consumed endpoint"
security:
- OAuth2: ['mx:datahub:services:read', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: 'common-definitions_v4.yaml#/components/parameters/AppUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EnvironmentUUID_Path'
- $ref: 'common-definitions_v4.yaml#/components/parameters/EndpointUUID_Path'
responses:
'200':
$ref: '#/components/responses/ConsumedEndpoint_GET_200'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'404':
$ref: 'common-definitions_v4.yaml#/components/responses/404'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
"/applications/{AppUUID}/services/{ServiceName}":
#~1 is escape for forward slash in json pointer
$ref: 'common-definitions_v4.yaml#/paths/~1applications~1{AppUUID}~1services~1{ServiceName}'
"/endpoints/{EndpointUUID}":
$ref: 'common-definitions_v4.yaml#/paths/~1endpoints~1{EndpointUUID}'
/transform/dependenciesjson:
post:
tags:
- Endpoints
summary: 'Transforms contents of the dependencies.json file for your Democompany app into request bodies for the PUT published/consumed-endpoints operations of the Data Hub V4 API'
description: 'For this call the contents of the dependencies.json file have to be included. <br> The dependencies.json file for your Democompany app is usually located in your project folder in the deployment\model directory. <br> Contents of this file must be included in escaped JSON format.'
security:
- OAuth2: ['mx:datahub:services:read', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
requestBody:
$ref: '#/components/requestBodies/TransformDependenciesJson_POST'
responses:
'200':
$ref: '#/components/responses/TransformDependenciesJson_POST_200'
'400':
$ref: 'common-definitions_v4.yaml#/components/responses/400'
'401':
$ref: 'common-definitions_v4.yaml#/components/responses/401'
'403':
$ref: 'common-definitions_v4.yaml#/components/responses/403'
'410':
$ref: 'common-definitions_v4.yaml#/components/responses/410'
'500':
$ref: 'common-definitions_v4.yaml#/components/responses/500'
components:
requestBodies:
Applications_POST:
description: 'Description of an application that publishes or consumes services.'
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Application_Base'
required: true
Applications_PUT:
description: 'Description of the application'
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Application_Base'
required: true
ConsumedEndpoints_PUT:
description: 'Description of consumed endpoints.'
content:
application/json:
schema:
type: object
required:
- Endpoints
properties:
Endpoints:
type: array
description: 'List of the endpoints the environment consumes. Note that passing an empty array here will be interpreted as the environment not consuming any endpoints.'
items:
$ref: 'common-definitions_v4.yaml#/components/schemas/Endpoint_ConsumedRequest'
Environments_POST:
description: 'Description of the environment'
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Environment_Base'
required: true
Environments_PUT:
description: 'Description of the environment'
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Environment_Base'
required: true
PublishedEndpoint_POSTPUT:
description: 'Description of the published endpoint'
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Endpoint_PublishedRequest'
example:
Path: '/employeeservice/v2'
Discoverable: true
Validated: true
ServiceVersion:
Version: '2.0'
Description: 'Information about the employees of AcmeCorp.'
ContractType: 'OData'
Service:
Name: 'test.acme.employeeinformation'
Tags:
- Name: 'hr'
- Name: 'employee'
SecurityScheme:
SecurityTypes:
- Name: 'MxID'
MarketplaceModuleID: '93457'
MxAllowedRoles:
- Name: 'User'
UUID: '91ca220e-9498-4d23-9d2e-90b9c19aca37'
Contracts:
- Type: 'ServiceFeed'
Value: '<?xml version="1.0" encoding="utf-8"?><service xmlns:atom="http://www.w3.org/2005/Atom" xml:base="https://hr.acmecorp.test/odata/test.acme.employeeinformation/v1/" xmlns="http://www.w3.org/2007/app"><workspace><atom:title>Default</atom:title><collection href="Employees"><atom:title>Employees</atom:title></collection> </workspace></service>'
- Type: 'Metadata'
Value: '<?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:mx="http://www.democompany.com/Protocols/DemocompanyData"> <edmx:DataServices m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <Schema Namespace="DefaultNamespace" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"><EntityType Name="Employee"><Key><PropertyRef Name="ID" /></Key><Property Name="ID" Type="Edm.Int64" Nullable="false" mx:isAttribute="false" /><Property Name="Name" Type="Edm.String" MaxLength="200" /><Property Name="DateOfBirth" Type="Edm.DateTimeOffset" /><Property Name="Address" Type="Edm.String" MaxLength="200" /><Property Name="JobTitle" Type="Edm.String" MaxLength="200" /><Property Name="Salary" Type="Edm.Decimal" /></EntityType><EntityContainer Name="test.acme.employeeinformation/v1Entities" m:IsDefaultEntityContainer="true"><EntitySet Name="Employees" EntityType="DefaultNamespace.Employee" /></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>'
PublishedEndpoints_PUT:
description: 'Description of the published endpoints.'
content:
application/json:
schema:
type: object
required:
- Endpoints
properties:
Endpoints:
type: array
description: 'List of the endpoints the environment publishes. Note that passing an empty array here will be interpreted as the environment not publishing any endpoints.'
items:
$ref: 'common-definitions_v4.yaml#/components/schemas/Endpoint_PublishedRequest'
example:
Endpoints:
- Path: '/employeeservice/v2'
Discoverable: true
Validated: true
ServiceVersion:
Version: '2.0'
Description: 'Information about the employees of AcmeCorp.'
ContractType: 'OData'
Service:
Name: 'test.acme.employeeinformation'
Tags:
- Name: 'hr'
- Name: 'employee'
SecurityScheme:
SecurityTypes:
- Name: 'MxID'
MarketplaceModuleID: '93457'
MxAllowedRoles:
- Name: 'User'
UUID: '91ca220e-9498-4d23-9d2e-90b9c19aca37'
Contracts:
- Type: 'ServiceFeed'
Value: '<?xml version="1.0" encoding="utf-8"?><service xmlns:atom="http://www.w3.org/2005/Atom" xml:base="https://hr.acmecorp.test/odata/test.acme.employeeinformation/v1/" xmlns="http://www.w3.org/2007/app"><workspace><atom:title>Default</atom:title><collection href="Employees"><atom:title>Employees</atom:title></collection> </workspace></service>'
- Type: 'Metadata'
Value: '<?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:mx="http://www.democompany.com/Protocols/DemocompanyData"> <edmx:DataServices m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <Schema Namespace="DefaultNamespace" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"><EntityType Name="Employee"><Key><PropertyRef Name="ID" /></Key><Property Name="ID" Type="Edm.Int64" Nullable="false" mx:isAttribute="false" /><Property Name="Name" Type="Edm.String" MaxLength="200" /><Property Name="DateOfBirth" Type="Edm.DateTimeOffset" /><Property Name="Address" Type="Edm.String" MaxLength="200" /><Property Name="JobTitle" Type="Edm.String" MaxLength="200" /><Property Name="Salary" Type="Edm.Decimal" /></EntityType><EntityContainer Name="test.acme.employeeinformation/v1Entities" m:IsDefaultEntityContainer="true"><EntitySet Name="Employees" EntityType="DefaultNamespace.Employee" /></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>'
- Path: '/salaryservice/v3'
Discoverable: true
Validated: true
ServiceVersion:
Version: '3.0'
Description: 'This service contains salary information.'
ContractType: 'OData'
Service:
Name: 'test.acme.salaryservice'
Tags:
- Name: 'salary'
- Name : 'money'
SecurityScheme:
SecurityTypes:
- Name: 'MxID'
MarketplaceModuleID: '93457'
MxAllowedRoles:
- Name: 'User'
UUID: 'ba4a309d-63e8-49e1-a02d-b98745b24b7c'
Contracts:
- Type: 'Metadata'
Value: '<?xml version="1.0" encoding="UTF-8"?><edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"><edmx:DataServices><Schema Namespace="Democompany.Integration" xmlns="http://docs.oasis-open.org/odata/ns/edm"><EntityType Name="Category"><Key><PropertyRef Name="CategoryID"/></Key><Property Name="CategoryID" Type="Edm.Int32" Nullable="false"/><Property Name="CategoryName" Type="Edm.String"/><Property Name="Description" Type="Edm.String"/><Property Name="Picture" Type="Edm.Binary"/><NavigationProperty Name="Products" Type="Collection(Democompany.Integration.Product)" Partner="Category"/><NavigationProperty Name="RelatedCategory" Type="Democompany.Integration.Category" Partner="IsRelatedCategoryOf"/><NavigationProperty Name="IsRelatedCategoryOf" Type="Democompany.Integration.Category" Partner="RelatedCategory"/></EntityType><EntityType Name="Product"><Key><PropertyRef Name="ProductID"/></Key><Property Name="ProductID" Type="Edm.Int32" Nullable="false"/><Property Name="ProductName" Type="Edm.String" MaxLength="280"/><Property Name="Status" Type="Democompany.Integration.Status"/><NavigationProperty Name="Category" Type="Democompany.Integration.Category" Partner="Products"/><NavigationProperty Name="RelatedProducts" Type="Collection(Democompany.Integration.Product)"/></EntityType><EnumType Name="Status" UnderlyingType="Edm.Int32"><Member Name="InStock" Value="1"/><Member Name="OutOfStock" Value="2"/></EnumType><EntityContainer Name="Container"><EntitySet Name="Categories" EntityType="Democompany.Integration.Category"><NavigationPropertyBinding Path="Products" Target="Products"/></EntitySet><EntitySet Name="Products" EntityType="Democompany.Integration.Product"><NavigationPropertyBinding Path="Category" Target="Categories"/></EntitySet></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>'
Includes:
- Value: '<?xml version="1.0" encoding="UTF-8"?><edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"><edmx:DataServices><Schema Namespace="Democompany.Integration" xmlns="http://docs.oasis-open.org/odata/ns/edm"><EntityType Name="Category"><Key><PropertyRef Name="CategoryID"/></Key><Property Name="CategoryID" Type="Edm.Int32" Nullable="false"/><Property Name="CategoryName" Type="Edm.String"/><Property Name="Description" Type="Edm.String"/><Property Name="Picture" Type="Edm.Binary"/><NavigationProperty Name="Products" Type="Collection(Democompany.Integration.Product)" Partner="Category"/><NavigationProperty Name="RelatedCategory" Type="Democompany.Integration.Category" Partner="IsRelatedCategoryOf"/><NavigationProperty Name="IsRelatedCategoryOf" Type="Democompany.Integration.Category" Partner="RelatedCategory"/></EntityType><EntityType Name="Product"><Key><PropertyRef Name="ProductID"/></Key><Property Name="ProductID" Type="Edm.Int32" Nullable="false"/><Property Name="ProductName" Type="Edm.String" MaxLength="280"/><Property Name="Status" Type="Democompany.Integration.Status"/><NavigationProperty Name="Category" Type="Democompany.Integration.Category" Partner="Products"/><NavigationProperty Name="RelatedProducts" Type="Collection(Democompany.Integration.Product)"/></EntityType><EnumType Name="Status" UnderlyingType="Edm.Int32"><Member Name="InStock" Value="1"/><Member Name="OutOfStock" Value="2"/></EnumType><EntityContainer Name="Container"><EntitySet Name="Categories" EntityType="Democompany.Integration.Category"><NavigationPropertyBinding Path="Products" Target="Products"/></EntitySet><EntitySet Name="Products" EntityType="Democompany.Integration.Product"><NavigationPropertyBinding Path="Category" Target="Categories"/></EntitySet></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>'
TransformDependenciesJson_POST:
description: 'Contents of the dependencies.json file. Note: it should be JSON escaped'
required: true
content:
application/json:
schema:
type: object
required:
- DependenciesJsonString
example: '{ "DependenciesJsonString": "{ \"schemaVersion\": \"1.3\", \"appName\": \"HR Acme Corp\", \"published\": [ { \"name\": \"test.acme.employeeinformation\", \"version\": \"2.0\", \"path\": \"\/employeeservice\/v2\", \"serviceType\": \"OData 3.0\", \"contracts\": [ { \"type\": \"ServiceFeed\", \"value\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\r\\n<service xmlns=\\\"http:\/\/www.w3.org\/2007\/app\\\" xmlns:atom=\\\"http:\/\/www.w3.org\/2005\/Atom\\\" xml:base=\\\"https:\/\/hr.acmecorp.test\/odata\/test.acme.employeeinformation\/v1\/\\\">\\r\\n <workspace>\\r\\n <atom:title>Default<\/atom:title>\\r\\n <collection href=\\\"Employees\\\">\\r\\n <atom:title>Employees<\/atom:title>\\r\\n <\/collection>\\r\\n <\/workspace>\\r\\n<\/service>\" }, { \"type\": \"Metadata\", \"value\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\r\\n<edmx:Edmx xmlns:edmx=\\\"http:\/\/schemas.microsoft.com\/ado\/2007\/06\/edmx\\\" xmlns:mx=\\\"http:\/\/www.democompany.com\/Protocols\/DemocompanyData\\\" Version=\\\"1.0\\\">\\r\\n <edmx:DataServices xmlns:m=\\\"http:\/\/schemas.microsoft.com\/ado\/2007\/08\/dataservices\/metadata\\\" m:DataServiceVersion=\\\"3.0\\\" m:MaxDataServiceVersion=\\\"3.0\\\">\\r\\n <Schema xmlns=\\\"http:\/\/schemas.microsoft.com\/ado\/2009\/11\/edm\\\" Namespace=\\\"DefaultNamespace\\\">\\r\\n <EntityType Name=\\\"Employee\\\">\\r\\n <Key>\\r\\n <PropertyRef Name=\\\"ID\\\" \/>\\r\\n <\/Key>\\r\\n <Property Name=\\\"ID\\\" Type=\\\"Edm.Int64\\\" Nullable=\\\"false\\\" mx:isAttribute=\\\"false\\\" \/>\\r\\n <Property Name=\\\"Name\\\" Type=\\\"Edm.String\\\" MaxLength=\\\"200\\\" \/>\\r\\n <Property Name=\\\"DateOfBirth\\\" Type=\\\"Edm.DateTimeOffset\\\" \/>\\r\\n <Property Name=\\\"Address\\\" Type=\\\"Edm.String\\\" MaxLength=\\\"200\\\" \/>\\r\\n <Property Name=\\\"JobTitle\\\" Type=\\\"Edm.String\\\" MaxLength=\\\"200\\\" \/>\\r\\n <Property Name=\\\"Salary\\\" Type=\\\"Edm.Decimal\\\" \/>\\r\\n <\/EntityType>\\r\\n <EntityContainer Name=\\\"test.acme.employeeinformation\/v1Entities\\\" m:IsDefaultEntityContainer=\\\"true\\\">\\r\\n <EntitySet Name=\\\"Employees\\\" EntityType=\\\"DefaultNamespace.Employee\\\" \/>\\r\\n <\/EntityContainer>\\r\\n <\/Schema>\\r\\n <\/edmx:DataServices>\\r\\n<\/edmx:Edmx>\" } ], \"security\": { \"types\": [ { \"type\": \"MxID\", \"authenticationModuleId\": \"a4f7847b-9562-4b5a-adc2-4a0bf41cc534\" } ], \"allowedRoles\": [ { \"name\": \"User\", \"id\": \"91ca220e-9498-4d23-9d2e-90b9c19aca37\" } ] } } ], \"consumed\": [ { \"name\": \"test.acme.employeemanagement\", \"version\": \"1.0\", \"serviceType\": \"OData 3.0\", \"constant\": \"MyFirstModule.EmployeeManagement_Location\", \"uses\": [{ \"type\": \"entity\", \"name\": \"ManagingEmployees\" }] } ] }", "EndpointLocationConstants": [ { "Name": "MyFirstModule.EmployeeManagement_Location", "Value": "https://hr.acmecorp.test/employeeservice/v2" } ] }'
properties:
DependenciesJsonString:
type: string
description: 'JSON escaped contents of a dependencies.json file'
EndpointLocationConstants:
type: array
items:
$ref: '#/components/schemas/EndpointLocationConstant'
description: 'Specify all the location constants for the consumed endpoints referred to in the dependencies.json file. <br> You can find this information in Studio Pro in the constant location documents for the OData service. <br>This information is also in the metadata.json file for the specified constants. The metadata.json file is in the same directory as the dependencies.json file '
responses:
Applications_PUT_200:
description: 'OK'
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Application_Response'
Applications_PUT_201:
description: 'Created'
headers:
Location:
schema:
type: string
maxLength: 400
format: uri
description: Location at which the newly created resource can be found.
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Application_Response'
Applications_POST_201:
description: 'Created'
headers:
Location:
schema:
type: string
maxLength: 400
format: uri
description: Location at which the newly created resource can be found.
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Application_Response'
Application_GET_200:
description: 'OK'
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Application_Response'
All_Applications_GET_200:
description: 'OK'
content:
application/json:
schema:
type: object
required:
- TotalApplications
- Links
- Limit
- Offset
properties:
Applications:
type: array
items:
$ref: 'common-definitions_v4.yaml#/components/schemas/Application_Response'
TotalApplications:
type: integer
example: 383
description: 'Total number of application in the user''s company'
Links:
type: array
description: 'Pagination links to the First, Previous, Current and Next pages of results'
items:
$ref: 'common-definitions_v4.yaml#/components/schemas/Link'
example:
- Rel: 'First'
Href: 'https://hub.democompany.com/rest/registration/v4/applications?limit=20'
- Rel: 'Previous'
Href: 'https://hub.democompany.com/rest/registration/v4/applications?limit=20&offset=120'
- Rel: 'Current'
Href: 'https://hub.democompany.com/rest/registration/v4/applications?limit=20&offset=140'
- Rel: 'Next'
Href: 'https://hub.democompany.com/rest/registration/v4/applications?limit=20&offset=160'
- Rel: 'Last'
Href: 'https://hub.democompany.com/rest/registration/v4/applications?limit=20&offset=380'
Limit:
type: integer
description: The maximum number of applications that is returned in this resultset.
example: 20
Offset:
type: integer
example: 120
description: The zero-based index of the first application in the resultset.
ConsumedEndpoints_PUTGET_200:
description: 'OK'
content:
application/json:
schema:
type: object
required:
- Endpoints
properties:
Endpoints:
type: array
items:
$ref: 'common-definitions_v4.yaml#/components/schemas/Endpoint_ConsumedResponse'
ConsumedEndpoint_GET_200:
description: 'OK'
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Endpoint_ConsumedResponseSingle'
Environments_GET_200:
description: 'OK'
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Environment_ResponseWithApplication'
ApplicationEnvironments_GET_200:
description: 'OK'
content:
application/json:
schema:
type: object
required:
- TotalEnvironments
- Links
- Limit
- Offset
properties:
Environments:
type: array
items:
$ref: 'common-definitions_v4.yaml#/components/schemas/Environment_ResponseWithApplication'
TotalEnvironments:
type: integer
example: 383
description: 'Total number of environments for the specified application.'
Links:
type: array
description: Pagination URL links are provided to the 'First', 'Previous', 'Current', 'Next' and 'Last' result pages.
items:
$ref: 'common-definitions_v4.yaml#/components/schemas/Link'
example:
- Rel: 'First'
Href: 'https://hub.democompany.com/rest/registration/v4/applications/cfc36b98-7409-4384-b71d-f003b0c2f84b/environments?limit=20&environmentType=Production'
- Rel: 'Previous'
Href: 'https://hub.democompany.com/rest/registration/v4/applications/cfc36b98-7409-4384-b71d-f003b0c2f84b/environments?limit=20&offset=120&environmentType=Production'
- Rel: 'Current'
Href: 'https://hub.democompany.com/rest/registration/v4/applications/cfc36b98-7409-4384-b71d-f003b0c2f84b/environments?limit=20&offset=140&environmentType=Production'
- Rel: 'Next'
Href: 'https://hub.democompany.com/rest/registration/v4/applications/cfc36b98-7409-4384-b71d-f003b0c2f84b/environments?limit=20&offset=160&environmentType=Production'
- Rel: 'Last'
Href: 'https://hub.democompany.com/rest/registration/v4/applications/cfc36b98-7409-4384-b71d-f003b0c2f84b/environments?limit=20&offset=380&environmentType=Production'
Limit:
type: integer
description: The maximum number of environments that is returned in this resultset.
example: 20
Offset:
type: integer
example: 120
description: The zero-based index of the first environment in the resultset.
Environments_POST_201:
description: 'Created'
headers:
Location:
schema:
type: string
maxLength: 500
format: uri
description: Location at which the newly created resource can be found.
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Environment_ResponseWithApplication'
Environments_PUT_200:
description: 'OK'
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Environment_ResponseWithApplication'
Environments_PUT_201:
description: 'Created'
headers:
Location:
schema:
type: string
description: Location at which the newly created resource can be found.
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Environment_ResponseWithApplication'
PublishedEndpoint_POSTPUT_201:
description: 'Created'
headers:
Location:
schema:
type: string
description: Location at which the newly created resource can be found.
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Endpoint_PublishedResponseSingle'
PublishedEndpoint_GETPUT_200:
description: 'OK'
content:
application/json:
schema:
$ref: 'common-definitions_v4.yaml#/components/schemas/Endpoint_PublishedResponseSingle'
PublishedEndpoints_PUTGET_200:
description: 'OK'
content:
application/json:
schema:
type: object
required:
- Endpoints
properties:
Endpoints:
type: array
items:
$ref: 'common-definitions_v4.yaml#/components/schemas/Endpoint_PublishedResponseArray'
example:
- UUID: '9e26c386-9316-4a33-9963-8fe9f69a5117'
Path: '/employeeservice/v3'
SecurityClassification: 'Public'
Discoverable: true
Validated: true
Connections: 17
LastUpdated: '2019-01-01T15:22:58.981Z'
Links:
- Rel: 'Self'
Href: 'https://hub.democompany.com/rest/registration/v4/endpoints/9e26c386-9316-4a33-9963-8fe9f69a5117'
- Rel: 'Catalog'
Href: 'https://hub.democompany.com/link/endpoint?EndpointUUID=9e26c386-9316-4a33-9963-8fe9f69a5117'
ServiceVersion:
Version: '2.1'
UUID: 'ac288b46-7bd1-4dbe-98e5-e5956d91aa76'
ContractType: 'OData'
ProtocolVersion: '3.0'
MinProtocolVersion: '3.0'
Description: 'Information about the employees of AcmeCorp'
PublishDate: '2019-07-23T15:28:34.981Z'
Service:
Name: 'test.acme.employeeinformation'
UUID: '4f68596a-7bd3-4f31-b8d7-a9e1344e7b60'
Links:
- Rel: 'Self'
Href: 'https://hub.democompany.com/rest/registration/v4/applications/cfc36b98-7409-4384-b71d-f003b0c2f84b/services/test.acme.employeeinformation'
Tags:
- Name: 'hr'
- Name : 'employee'
SecurityScheme:
SecurityTypes:
- Name: 'MxID'
MarketplaceModuleID: '93457'
MxAllowedRoles:
- Name: 'User'
UUID: 'ba4a309d-63e8-49e1-a02d-b98745b24b7c'
- UUID: '0a25b1d5-5b17-494b-99c6-81ecec7ccab2'
Path: '/salaryservice/v3'
SecurityClassification: 'Public'
Discoverable: true
Validated: true
Connections: 42
LastUpdated: '2019-01-01T15:22:58.981Z'
Links:
- Rel: 'Self'
Href: 'https://hub.democompany.com/rest/registration/v4/endpoints/0a25b1d5-5b17-494b-99c6-81ecec7ccab2'
- Rel: 'Catalog'
Href: 'https://hub.democompany.com/link/endpoints?EndpointUUID=0a25b1d5-5b17-494b-99c6-81ecec7ccab2'
ServiceVersion:
Version: '3.0'
UUID: 'fef91870-0306-42a7-810f-13d3dbb14331'
ContractType: 'OData'
ProtocolVersion: '4.0'
MinProtocolVersion: '4.0'
Description: 'This service contains salary information'
Service:
- Name: 'test.acme.salaryservice'
UUID: '8afabb90-fb74-4647-b33a-39b81cc33abb'
Links:
- Rel: 'Self'
Href: 'https://hub.democompany.com/rest/registration/v4/applications/cfc36b98-7409-4384-b71d-f003b0c2f84b/services/test.acme.salaryservice'
Tags:
- Name: 'salary'
- Name : 'money'
SecurityScheme:
SecurityTypes:
- Name: 'MxID'
MarketplaceModuleID: '93457'
MxAllowedRoles:
- Name: 'User'
UUID: 'ba4a309d-63e8-49e1-a02d-b98745b24b7c'
TransformDependenciesJson_POST_200:
description: 'Transformation successful'
content:
application/json:
schema:
type: object
required:
- PUTPublishedEndpoints
- PUTConsumedEndpoints
properties:
PUTPublishedEndpoints:
type: object
required:
- Endpoints
description: 'List of OData services published by this app. Use this object in your Data Hub API PUT request.'
properties:
Endpoints:
type: array
items:
$ref: 'common-definitions_v4.yaml#/components/schemas/Endpoint_PublishedRequest'
example:
Path: '/employeeservice/v2'
Discoverable: true
Validated: true
ServiceVersion:
Version: '2.0'
ContractType: 'OData'
Service:
Name: 'test.acme.employeeinformation'
Tags:
- Name: 'hr'
- Name: 'employee'
SecurityScheme:
SecurityTypes:
- Name: 'MxID'
MarketplaceModuleID: '93457'
MxAllowedRoles:
- Name: 'User'
UUID: '91ca220e-9498-4d23-9d2e-90b9c19aca37'
Contracts:
- Type: 'ServiceFeed'
Value: '<?xml version="1.0" encoding="utf-8"?><service xmlns:atom="http://www.w3.org/2005/Atom" xml:base="https://hr.acmecorp.test/odata/test.acme.employeeinformation/v1/" xmlns="http://www.w3.org/2007/app"><workspace><atom:title>Default</atom:title><collection href="Employees"><atom:title>Employees</atom:title></collection> </workspace></service>'
- Type: 'Metadata'
Value: '<?xml version="1.0" encoding="utf-8"?><edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:mx="http://www.democompany.com/Protocols/DemocompanyData"> <edmx:DataServices m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"> <Schema Namespace="DefaultNamespace" xmlns="http://schemas.microsoft.com/ado/2009/11/edm"><EntityType Name="Employee"><Key><PropertyRef Name="ID" /></Key><Property Name="ID" Type="Edm.Int64" Nullable="false" mx:isAttribute="false" /><Property Name="Name" Type="Edm.String" MaxLength="200" /><Property Name="DateOfBirth" Type="Edm.DateTimeOffset" /><Property Name="Address" Type="Edm.String" MaxLength="200" /><Property Name="JobTitle" Type="Edm.String" MaxLength="200" /><Property Name="Salary" Type="Edm.Decimal" /></EntityType><EntityContainer Name="test.acme.employeeinformation/v1Entities" m:IsDefaultEntityContainer="true"><EntitySet Name="Employees" EntityType="DefaultNamespace.Employee" /></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>'
PUTConsumedEndpoints:
type: object
required:
- Endpoints
description: 'List of the endpoints the environment consumes. Note that passing an empty array here will be interpreted as the environment not consuming any endpoints.'
properties:
Endpoints:
type: array
items:
$ref: 'common-definitions_v4.yaml#/components/schemas/Endpoint_ConsumedRequest'
schemas:
EndpointLocationConstant:
type: object
required:
- Name
- Value
properties:
Name:
type: string
example: 'MyFirstModule.EmployeeManagement_Location'
description: 'Canonical name (Module.ConstantName) of the constant that holds the location of a consumed endpoint'
Value:
type: string
example: 'https://hr.acmecorp.test/employeeservice/v2'
description: 'Value of the location constant; should be a valid, absolute URL. <br> In the metadata.json file this is the value given for the attribute DefaultValue.'
securitySchemes:
OAuth2:
$ref: 'common-definitions_v4.yaml#/components/securitySchemes/OAuth2'
PersonalAccessTokens:
$ref: 'common-definitions_v4.yaml#/components/securitySchemes/PersonalAccessTokens'
common-definitions_v4.yaml
openapi: 3.0.1
info:
title: 'Data Hub API Common Definitions'
description: "These are the common definitions for the Data Hub API."
termsOfService: '#'
contact:
email: PlatformCore@democompany.com
version: '4.1.0'
paths:
"/applications/{AppUUID}/services/{ServiceName}":
get:
tags:
- Service Versions
summary: 'Retrieves details of all the versions and their endpoints for a specified service.'
security:
- OAuth2: ['mx:datahub:services:read', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: '#/components/parameters/AppUUID_Path'
- $ref: '#/components/parameters/ServiceName_Path'
responses:
'200':
$ref: '#/components/responses/Service_GET_200'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'410':
$ref: '#/components/responses/410'
'500':
$ref: '#/components/responses/500'
"/endpoints/{EndpointUUID}":
get:
tags:
- Endpoints
summary: 'Retrieves the details of the specified endpoint'
security:
- OAuth2: ['mx:datahub:services:read', 'openid', 'offline_access', 'mx:user:profile:v1:read']
- PersonalAccessTokens: []
parameters:
- $ref: '#/components/parameters/EndpointUUID_Path'
responses:
'200':
$ref: '#/components/responses/PublishedEndpoint_GET_200'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'410':
$ref: '#/components/responses/410'
'500':
$ref: '#/components/responses/500'
components:
parameters:
AppUUID_Path:
in: "path"
name: "AppUUID"
schema:
type: string
format: uuid
required: true
description: 'Valid UUID of the specified application.'
EnvironmentUUID_Path:
in: "path"
name: "EnvironmentUUID"
schema:
type: string
format: uuid
required: true
description: 'Valid UUID of the specified environment.'
EndpointUUID_Path:
in: "path"
name: "EndpointUUID"
schema:
type: string
required: true
description: 'Valid UUID of the specified endpoint.'
ServiceName_Path:
in: "path"
name: "ServiceName"
schema:
type: string
maxLength: 200
required: true
description: 'Name of the specified service.'
responses:
'204':
description: 'No content'
'400':
description: 'Incorrect Input'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error_Base'
- type: object
properties:
code:
description: 'Code describing why the request failed.'
example: 'INVALID_REQUEST'
message:
description: 'Message detailing the reason why the request failed. A response with HTTP status 400 indicates (some of) the provided parameters with the request are invalid.'
example: 'Invalid input'
'401':
description: 'Authentication Failed'
headers:
WWW-Authenticate:
schema:
type: string
description: Message detailing challenge to the request.
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error_Base'
- type: object
properties:
code:
description: 'Code describing why the request failed.'
example: 'UNAUTHORIZED'
message:
description: 'Message detailing the reason why the request failed. A response with HTTP status 401 indicates the provided means of authentication was not accepted.'
example: 'Credentials could not be authenticated.'
'403':
description: 'Forbidden'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error_Base'
- type : object
properties:
code:
description: 'Code describing why the request failed.'
example: 'FORBIDDEN'
message:
description: 'Message detailing the reason why the request failed. A response with HTTP status 403 indicates that the provided means of authentication does not give access to the requested resource.'
example: 'You do not have access to the requested resource.'
'404':
description: 'Not Found'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error_Base'
- type: object
properties:
code:
description: 'Code describing why the request failed.'
example: 'NOT_FOUND'
message:
description: 'Message detailing the reason why the request failed. A response with HTTP status 404 indicates that the requested resource could not be found.'
example: 'Could not find the requested resource.'
'409':
description: 'Conflict'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error_Base'
- type : object
properties:
code:
description: 'Code describing why the request failed.'
example: 'CONFLICT'
message:
description: 'Message detailing the reason why the request failed. A response with HTTP status 409 indicates a conflict with the data already existing in the Catalog.'
example: 'Another environment ({UUID}) already exists in your company with the provided location.'
'410':
description: 'Unsupported Version'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error_Base'
- type: object
properties:
code:
description: 'Code describing why the request failed.'
example: 'UNSUPPORTED_VERSION'
message:
description: 'Message detailing the reason why the request failed. A response with HTTP status 410 indicates that the requested operation is not supported by this version of the API.'
example: 'This version of the API is no longer available.'
'500':
description: 'Internal Server Error'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error_Base'
- type: object
properties:
code:
description: 'Code describing why the request failed.'
example: 'INTERNAL_SERVER_ERROR'
message:
description: 'Message detailing the reason why the request failed. A response with HTTP status 500 indicates that an unexpected error occurred while the server was processing the request. If the problem persists you should contact Democompany Support.'
example: 'An internal server error occurred.'
Service_GET_200:
description: OK
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Service_Response'
- type: object
required:
- Application
properties:
Application:
$ref: '#/components/schemas/Application_Response'
Versions:
type: array
items:
allOf:
- $ref: '#/components/schemas/ServiceVersion_ResponseBase'
- type: object
required:
- Endpoints
properties:
Endpoints:
type: array
items:
allOf:
- $ref: '#/components/schemas/Endpoint_ResponseBase'
- type: object
required:
- Environment
properties:
Environment:
$ref: '#/components/schemas/Environment_Response'
ServiceVersion_GET_200:
description: "OK"
content:
application/json:
schema:
type: object
required:
- Version
- PublishDate
- Location
- Service
- Contracts
properties:
Version:
type: string
maxLength: 200
description: Version of the downloaded service.
example: '2.1'
PublishDate:
type: string
format: date-time
description: Date this specific version was published.
example: '2019-01-01T15:22:58.981Z'
Location:
type: string
format: uri
description: Location at which the service version has been published.
example: 'https://hr.acmecorp.test/odata/employeeinfo/v2/'
Description:
type: string
description: Description of the service.
example: 'Information about the employees of AcmeCorp'
Service:
$ref: '#/components/schemas/Service_Response'
Contracts:
type: array
items:
$ref: '#/components/schemas/Contract'
example:
- Type: 'ServiceFeed'
Value: '<?xml version=\"1.0\" encoding=\"utf-8\"?><service xmlns:atom=\"http://www.w3.org/2005/Atom\" xml:base=\"https://hr.acmecorp.test/odata/test.acme.employeeinformation/v1/\" xmlns=\"http://www.w3.org/2007/app\"><workspace><atom:title>Default</atom:title><collection href=\"Employees\"><atom:title>Employees</atom:title></collection> </workspace></service>'
- Type: 'Metadata'
Value: '<?xml version=\"1.0\" encoding=\"utf-8\"?><edmx:Edmx Version=\"1.0\" xmlns:edmx=\"http://schemas.microsoft.com/ado/2007/06/edmx\" xmlns:mx=\"http://www.democompany.com/Protocols/DemocompanyData\"> <edmx:DataServices m:DataServiceVersion=\"3.0\" m:MaxDataServiceVersion=\"3.0\" xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"> <Schema Namespace=\"DefaultNamespace\" xmlns=\"http://schemas.microsoft.com/ado/2009/11/edm\"><EntityType Name=\"Employee\"><Key><PropertyRef Name=\"ID\" /></Key><Property Name=\"ID\" Type=\"Edm.Int64\" Nullable=\"false\" mx:isAttribute=\"false\" /><Property Name=\"Name\" Type=\"Edm.String\" MaxLength=\"200\" /><Property Name=\"DateOfBirth\" Type=\"Edm.DateTimeOffset\" /><Property Name=\"Address\" Type=\"Edm.String\" MaxLength=\"200\" /><Property Name=\"JobTitle\" Type=\"Edm.String\" MaxLength=\"200\" /><Property Name=\"Salary\" Type=\"Edm.Decimal\" /></EntityType><EntityContainer Name=\"test.acme.employeeinformation/v1Entities\" m:IsDefaultEntityContainer=\"true\"><EntitySet Name=\"Employees\" EntityType=\"DefaultNamespace.Employee\" /></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>'
PublishedEndpoint_GET_200:
description: 'OK'
content:
application/json:
schema:
$ref: '#/components/schemas/Endpoint_PublishedResponseSingle'
schemas:
Capabilities:
type: string
enum:
- creatable
- updatable
- deletable
- countable
- topsupported
- skipsupported
- filterable
- sortable
Application_Base:
required:
- Name
properties:
Name:
type: string
maxLength: 200
example: 'AcmeHR'
description: 'Name of the application.'
Description:
type: string
maxLength: 10000
example: 'This application is used to manage the entire HR process of AcmeCorp'
description: 'Description of the application'
RepositoryLocation:
type: string
format: uri
maxLength: 400
example: 'https://teamserver.sprintr.com/e0fb450a-203f-3e0a-ae3c-9cadaea00743'
description: 'Location of the development repository of the application.'
Type:
type: string
enum: [Democompany, Teamcenter, MindSphere, Microsoft, SAP, Opcenter, Other]
example: 'Democompany'
description: 'Type of the application, possible values are "Democompany", "Teamcenter", "MindSphere", "Microsoft", "SAP", "Opcenter" and "Other" (Default)'
BusinessOwner:
allOf:
- $ref: '#/components/schemas/Owner'
- type: object
description: 'Business owner of the application.'
TechnicalOwner:
allOf:
- $ref: '#/components/schemas/Owner'
- type: object
description: 'Technical owner of the application.'
Application_Response:
allOf:
- $ref: '#/components/schemas/Application_Base'
- type: object
required:
- Type
- UUID
- Icon
properties:
UUID:
type: string
format: uuid
example: 'cfc36b98-7409-4384-b71d-f003b0c2f84b'
description: 'UUID that uniquely identifies the application in the Democompany Platform.'
Icon:
type: string
format: uri
description: URL of the icon location
example: 'https://cdn.democompany.com/image.png'
ConsumedItem_Base:
type: object
required:
- Type
properties:
Type:
type: string
enum: ['EntitySet']
description: 'Type of item being consumed. Currently only `EntitySet` is supported.'
example: 'EntitySet'
ConsumedItem_Request:
allOf:
- $ref: '#/components/schemas/ConsumedItem_Base'
- oneOf:
- $ref: '#/components/schemas/ConsumedItem_EntitySetRequest'
discriminator:
propertyName: Type
mapping:
EntitySet: '#/components/schemas/ConsumedItem_EntitySetRequest'
example:
Type: 'EntitySet'
Name: 'ManagingEmployees'
NameSpace: 'DefaultNameSpace'
ConsumedItem_EntitySetRequest:
type: object
required:
- Name
properties:
Namespace:
type: string
maxLength: 200
description: 'Namespace from which the EntitySet is consumed. Note that while this field is optional, we strongly recommend including it. Not doing so could result in ambiguous situations where it is impossible to register consumptions, for example when the consumed EntitySet name exists in multiple Namespaces in the published endpoint.'
example: 'DefaultNamespace'
Name:
type: string
maxLength: 200
description: 'Name of the EntitySet being consumed.'
example: 'ManagingEmployees'
ConsumedItem_Response:
allOf:
- $ref: '#/components/schemas/ConsumedItem_Base'
- oneOf:
- $ref: '#/components/schemas/ConsumedItem_EntitySetResponse'
discriminator:
propertyName: Type
mapping:
EntitySet: '#/components/schemas/ConsumedItem_EntitySetResponse'
example:
Type: 'EntitySet'
Name: 'ManagingEmployees'
NameSpace: 'DefaultNameSpace'
ConsumedItem_EntitySetResponse:
type: object
required:
- Name
- Namespace
properties:
Namespace:
type: string
maxLength: 200
description: 'Namespace from which the EntitySet is consumed.'
example: 'DefaultNamespace'
Name:
type: string
maxLength: 200
description: 'Name of the EntitySet being consumed.'
example: 'ManagingEmployees'
Contract:
type: object
required:
- Type
- Value
properties:
Type:
type: string
maxLength: 200
description: Type of contract described here. For OData V3, the accepted types are "ServiceFeed" and "Metadata". For OData V4, the primary contract should be called "Metadata".
example: 'ServiceFeed'
Value:
type: string
description: Json-encoded contents of the contract.
example: '<?xml version=\"1.0\" encoding=\"utf-8\"?><edmx:Edmx Version=\"1.0\" xmlns:edmx=\"http://schemas.microsoft.com/ado/2007/06/edmx\"> <edmx:DataServices m:DataServiceVersion=\"3.0\" m:MaxDataServiceVersion=\"3.0\" xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"><Schema Namespace=\"DefaultNamespace\" xmlns=\"http://schemas.microsoft.com/ado/2009/11/edm\"><EntityType Name=\"Entity\"><Key><PropertyRef Name=\"ID\" /></Key><Property Name=\"ID\" Type=\"Edm.Int64\" Nullable=\"false\" /><Property Name=\"Attribute\" Type=\"Edm.String\" /></EntityType><EntityContainer Name=\"ODataServiceEntities\" m:IsDefaultEntityContainer=\"true\"><EntitySet Name=\"Entities\" EntityType=\"DefaultNamespace.Entity\" /></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>'
Includes:
type: array
description: List of contract documents which this contract includes (ie, depends upon); only supported for OData_4_0_Xml services.
items:
$ref: '#/components/schemas/Contract_Included'
Contract_Included:
type: object
required:
- Value
properties:
Value:
type: string
description: Json-encoded contents of the included contract document.
example: '<?xml version=\"1.0\" encoding=\"UTF-8\"?><edmx:Edmx Version=\"4.0\" xmlns:edmx=\"http://docs.oasis-open.org/odata/ns/edmx\"><edmx:Reference Uri=\"http://localhost/CORE/v1/CsdlSchema.xml\"><edmx:Include Alias=\"CORE\" Namespace=\"CORE_SCHEMA_V_1_0\"/><edmx:Include Alias=\"FOUNDATION\" Namespace=\"FOUNDATION_SCHEMA_V_1_0\"/></edmx:Reference><edmx:DataServices><Schema xmlns=\"http://docs.oasis-open.org/odata/ns/edm\" Namespace=\"SUB_SCHEMA_V_1_0\"><EntityType Name=\"VendorPart\" BaseType=\"CORE_SCHEMA_V_1_0.Part\"><NavigationProperty Name=\"VendorReference\" Type=\"SUB_SCHEMA_V_1_0.Vendor\"></NavigationProperty></EntityType><EntityType Name=\"Vendor\"><Key><PropertyRef Name=\"ContactName\"/></Key><Property Name=\"Name\" Type=\"Edm.String\"></Property><Property Name=\"Description\" Type=\"Edm.String\"></Property><Property Name=\"Address\" Type=\"Edm.String\"></Property><Property Name=\"Phone\" Type=\"Edm.String\"></Property><Property Name=\"Email\" Type=\"Edm.String\"></Property><Property Name=\"ContactName\" Type=\"Edm.String\"></Property></EntityType><EntityContainer Name=\"SupplierCollaborationContainer\" Extends=\"CORE_SCHEMA_V_1_0.CORE_APA242_CONTAINER_1\"><EntitySet Name=\"VendorParts\" EntityType=\"SUB_SCHEMA_V_1_0.VendorPart\"><NavigationPropertyBinding Path=\"VendorReference\" Target=\"Vendors\"/></EntitySet><EntitySet Name=\"Vendors\" EntityType=\"SUB_SCHEMA_V_1_0.Vendor\"></EntitySet></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>'
Endpoint_Base:
type: object
required:
- Path
properties:
Path:
type: string
maxLength: 400
description: "Path to the endpoint."
example: '/employeeservice/v2'
Discoverable:
type: boolean
description: 'Indicates whether the endpoint can be found through searches and then consumed by another application.'
example: true
Validated:
type: boolean
description: 'Indicates whether a curator has reviewed the metadata of this endpoint and vouched for its correctness.'
example: true
Endpoint_ResponseBase:
allOf:
- $ref: '#/components/schemas/Endpoint_Base'
- type: object
required:
- SecurityClassification
- Discoverable
- Validated
- UUID
- Connections
- LastUpdated
- Links
properties:
UUID:
type: string
format: uuid
description: 'UUID that uniquely identifies the endpoint in the Democompany Platform.'
example: "9e26c386-9316-4a33-9963-8fe9f69a5117"
SecurityClassification:
type: string
enum: ['Internal','Public','Confidential']
description: The access restrictions for this service. Currently supported values are Public, Internal (restricted to company), or Confidential (restricted within company). (Default: Internal)
Connections:
type: integer
description: Number of application environments consuming this endpoint.
example: 17
LastUpdated:
type: string
format: date-time
description: UTC timestamp of the most recent update to the service.
example: "2019-01-01T15:22:58.981Z"
Links:
type: array
items:
$ref: '#/components/schemas/Link'
example:
- Rel: 'Self'
Href: 'https://hub.democompany.com/rest/registration/v4/endpoints/9e26c386-9316-4a33-9963-8fe9f69a5117'
- Rel: 'Catalog'
Href: 'https://hub.democompany.com/link/endpoint?EndpointUUID=9e26c386-9316-4a33-9963-8fe9f69a5117'
Endpoint_PublishedRequest:
allOf:
- $ref: '#/components/schemas/Endpoint_Base'
- type: object
required:
- ServiceVersion
properties:
ServiceVersion:
$ref: '#/components/schemas/ServiceVersion_Request'
Endpoint_PublishedResponseArray:
allOf:
- $ref: '#/components/schemas/Endpoint_ResponseBase'
- type: object
required:
- ServiceVersion
properties:
ServiceVersion:
$ref: '#/components/schemas/ServiceVersion_Response'
Endpoint_PublishedResponseSingle:
allOf:
- $ref: '#/components/schemas/Endpoint_ResponseBase'
- type: object
required:
- ServiceVersion
- Environment
- Location
properties:
Location:
type: string
description: 'The location at which the endpoint is published.'
example: 'https://hr.acmecorp.test/employeeservice/v2'
ServiceVersion:
allOf:
- $ref: '#/components/schemas/ServiceVersionResponseWithEntity'
- type: object
required:
- Contracts
properties:
Contracts:
type: array
items:
$ref: '#/components/schemas/Contract'
example:
- Type: 'ServiceFeed'
Value: '<?xml version=\"1.0\" encoding=\"utf-8\"?><service xmlns:atom=\"http://www.w3.org/2005/Atom\" xml:base=\"https://hr.acmecorp.test/odata/test.acme.employeeinformation/v1/\" xmlns=\"http://www.w3.org/2007/app\"><workspace><atom:title>Default</atom:title><collection href=\"Employees\"><atom:title>Employees</atom:title></collection> </workspace></service>'
- Type: 'Metadata'
Value: '<?xml version=\"1.0\" encoding=\"utf-8\"?><edmx:Edmx Version=\"1.0\" xmlns:edmx=\"http://schemas.microsoft.com/ado/2007/06/edmx\" xmlns:mx=\"http://www.democompany.com/Protocols/DemocompanyData\"> <edmx:DataServices m:DataServiceVersion=\"3.0\" m:MaxDataServiceVersion=\"3.0\" xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\"> <Schema Namespace=\"DefaultNamespace\" xmlns=\"http://schemas.microsoft.com/ado/2009/11/edm\"><EntityType Name=\"Employee\"><Key><PropertyRef Name=\"ID\" /></Key><Property Name=\"ID\" Type=\"Edm.Int64\" Nullable=\"false\" mx:isAttribute=\"false\" /><Property Name=\"Name\" Type=\"Edm.String\" MaxLength=\"200\" /><Property Name=\"DateOfBirth\" Type=\"Edm.DateTimeOffset\" /><Property Name=\"Address\" Type=\"Edm.String\" MaxLength=\"200\" /><Property Name=\"JobTitle\" Type=\"Edm.String\" MaxLength=\"200\" /><Property Name=\"Salary\" Type=\"Edm.Decimal\" /></EntityType><EntityContainer Name=\"test.acme.employeeinformation/v1Entities\" m:IsDefaultEntityContainer=\"true\"><EntitySet Name=\"Employees\" EntityType=\"DefaultNamespace.Employee\" /></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>'
Environment:
$ref: '#/components/schemas/Environment_ResponseWithApplication'
ItemsArray:
type: array
description: List of items (such as data sources) at this endpoint
items:
$ref: '#/components/schemas/Item'
example:
- Name: 'Employee'
Type: 'Dataset'
EntitySetName: 'NewEmployees'
EntityTypeName: 'Employee'
Namespace: 'AcmeHR'
TotalItems: 3
Validated: true
Updatable: false
Insertable: false
Deletable: false
Countable: false
TopSupported: false
SkipSupported: false
Filterable: false
Sortable: false
Items:
- Name: 'Name'
Type: 'Attribute'
EdmType: 'String'
Updatable: false
Insertable: false
Countable: false
Filterable: false
Sortable: false
- Name: 'Salary'
Type: 'Attribute'
EdmType: 'Decimal'
Updatable: false
Insertable: false
Countable: false
Filterable: false
Sortable: false
- Name: 'Employee_Car'
Type: 'Association'
ReferencedDataSource: 'Car'
Multiplicity: '0..1'
EntitySetName: 'CompanyCars'
EntityTypeName: 'Car'
Namespace: 'AcmeHR'
Updatable: true
Insertable: false
Countable: false
Links:
- Rel: 'Catalog'
Href: 'https://hub.democompany.com/link/entity?EndpointUUID=9e26c386-9316-4a33-9963-8fe9f69a5117&EntityUUID=130b6d98-bb60-4920-8262-a0adfbe0ade8'
Endpoint_ConsumedRequest:
type: object
required:
- EndpointLocation
properties:
EndpointLocation:
type: string
format: uri
maxLength: 500
description: 'Absolute URL of the consumed endpoint.'
example: 'https://hr.acmecorp.test/employeeservice/v2'
ConsumedItems:
type: array
items:
$ref: '#/components/schemas/ConsumedItem_Request'
example:
- Type: 'EntitySet'
Name: 'ManagingEmployees'
Namespace: 'DefaultNamespace'
Endpoint_ConsumedResponse:
allOf:
- $ref: '#/components/schemas/Endpoint_PublishedResponseArray'
- type: object
required:
- Environment
properties:
ConsumedItems:
type: array
items:
$ref: '#/components/schemas/ConsumedItem_Response'
Environment:
$ref: '#/components/schemas/Environment_ResponseWithApplication'
Endpoint_ConsumedResponseSingle:
allOf:
- $ref: '#/components/schemas/Endpoint_ResponseBase'
- type: object
required:
- ServiceVersion
- Environment
properties:
ServiceVersion:
$ref: '#/components/schemas/ServiceVersion_Response'
Environment:
$ref: '#/components/schemas/Environment_ResponseWithApplication'
ConsumedItems:
type: array
items:
$ref: '#/components/schemas/ConsumedItem_Response'
Environment_Base:
type: object
required:
- Name
- Location
- Type
properties:
Name:
type: string
maxLength: 200
example: 'HR-eu-prod'
description: 'Name of the environment.'
Location:
type: string
format: uri
maxLength: 500
example: 'https://hr.acmecorp.test'
description: 'Location of the environment.'
Type:
type: string
enum: [Production, Non-Production, Sandbox]
example: 'Production'
description: 'Value for the environment type, allowed values are: Production, Non-Production, Sandbox. Default value is Non-Production.'
CustomLocations:
type: array
minLength: 1
description: 'List of custom locations at which this environment can also be reached.'
items:
type: object
required:
- URL
properties:
URL:
type: string
format: uri
maxLength: 500
example: 'https://hr.acme.com'
Environment_Response:
allOf:
- $ref: '#/components/schemas/Environment_Base'
- type : object
required:
- UUID
properties:
UUID:
type: string
format: uuid
example: '57e214d1-d8b2-48fb-8ff3-d67932ae392b'
description: 'UUID uniquely identifying the environment.'
Environment_ResponseWithApplication:
allOf:
- $ref: '#/components/schemas/Environment_Response'
- type: object
required:
- Application
properties:
Application:
$ref: '#/components/schemas/Application_Response'
Error_Base:
type: object
required:
- code
- message
properties:
code:
type: string
message:
type: string
Item:
allOf:
- $ref: '#/components/schemas/Item_Base'
- oneOf:
- $ref: '#/components/schemas/Item_Attribute'
- $ref: '#/components/schemas/Item_Association'
- $ref: '#/components/schemas/Item_Dataset'
discriminator:
propertyName: Type
mapping:
Attribute: '#/components/schemas/Item_Attribute'
Association: '#/components/schemas/Item_Association'
Dataset: '#/components/schemas/Item_Dataset'
- type: object
description: Details about a data source, attribute, association, etc.
Item_Base:
type: object
required:
- Name
- Type
properties:
Name:
type: string
maxLength: 200
description: Name of the item.
example: 'Employee_Car'
Type:
type: string
enum: ['Dataset','Attribute','Association']
description: Currently one of Dataset, Attribute, Association.
example: 'Attribute'
Item_Association:
type: object
required:
- ReferencedDataSource
- Multiplicity
- EntitySetName
- EntityTypeName
- Namespace
- Updatable
- Insertable
- Countable
properties:
ReferencedDataSource:
type: string
maxLength: 200
description: The associated entity.
example: "Car"
Multiplicity:
type: string
enum: ["0..1", "1", "*"]
EntitySetName:
type: string
maxLength: 200
description: EntitySet name of the associated entity.
example: "Cars"
EntityTypeName:
type: string
maxLength: 200
description: EntityType name of the associated entity.
example: "Car"
Namespace:
type: string
maxLength: 200
description: Namespace of the associated entity.
example: "SUPC_SCHEMA_V_1_0"
Updatable:
type: boolean
description: Indicates if the dataset supports updates to this association.
Insertable:
type: boolean
description: Indicates if the dataset supports setting this association when creating a new instance of the entity.
Countable:
type: boolean
description: Indicates if this dataset is countable.
Item_Attribute:
type: object
required:
- EdmType
- Updatable
- Insertable
- Countable
- Filterable
- Sortable
properties:
EdmType:
type: string
maxLength: 200
description: The Edm primitive type of the attribute.
example: 'Edm.Int16'
Updatable:
type: boolean
description: Indicates if the dataset supports updates to this attribute.
Insertable:
type: boolean
description: Indicates if the dataset supports setting this attribute when creating a new instance of the entity.
Countable:
type: boolean
description: Indicates if this dataset is countable.
Filterable:
type: boolean
description: Indicates if this dataset supports usage of `$filter` for navigation properties.
Sortable:
type: boolean
description: Indicates if this dataset supports usage of `$orderby` for navigation properties.
Item_Dataset:
type: object
required:
- EntitySetName
- EntityTypeName
- Namespace
- Links
- TotalItems
- Items
- Validated
- Deletable
- Updatable
- Insertable
- Countable
- TopSupported
- SkipSupported
- Filterable
- Sortable
properties:
EntitySetName:
type: string
maxLength: 200
description: The name of the entity set, for odata items.
example: 'Employee_Cars'
EntityTypeName:
type: string
maxLength: 200
description: The name of the entity type, for odata items.
example: 'Employee_Car'
Namespace:
type: string
maxLength: 200
description: The namespace of the entity, for odata items.
example: 'SUPC_SCHEMA_V_1_0'
Links:
type: array
description: Deeplink to the detail page of the data source in the Catalog.
items:
$ref: '#/components/schemas/Link'
example:
- Rel: 'Catalog'
Href: https://hub.democompany.com/link/endpoint?EndpointUUID=9e26c386-9316-4a33-9963-8fe9f69a5117&EntityUUID=39a261cc-bb79-435e-8194-1cfe9b1cd693'
TotalItems:
type: integer
description: The number of items in the array.
example: 25
Items:
type: array
description: List of the attributes or associations belonging to this data source.
items:
$ref: '#/components/schemas/Item'
Validated:
type: boolean
description: Shows whether this entity has been validated by an owner or curator.
Updatable:
type: boolean
description: Indicates if this dataset supports changes the entity's properties.
Insertable:
type: boolean
description: Indicates if this dataset supports adding new instances of the entity.
Deletable:
type: boolean
description: Indicates if this dataset supports deleting instances of the entity.
Countable:
type: boolean
description: Indicates if this dataset is countable.
TopSupported:
type: boolean
description: Indicates if this dataset supports `$top` usage for queries.
SkipSupported:
type: boolean
description: Indicates if this dataset supports `$skip` usage for queries.
Filterable:
type: boolean
description: Indicates if this dataset supports usage of `$filter` for navigation properties.
Sortable:
type: boolean
description: Indicates if this dataset supports usage of `$orderby` for navigation properties.
Link:
type: object
required:
- Rel
- Href
properties:
Rel:
type: string
description: 'Describes how the link relates to the object, see the specific array description to see what kinds of links to expect.'
example: 'Self'
Href:
type: string
format: uri
description: Location of the link.
example: 'https://hub.democompany.com/rest/datahubservice/v2/applications/ab1a74cb-2f28-458c-801c-ea4ded75070f/services/com.democompany.contacts'
MxAllowedRole:
type: object
required:
- Name
- UUID
properties:
Name:
type: string
maxLength: 255
description: The name of the Democompany role.
example: "HrExpert"
UUID:
type: string
format: uuid
example: '04989324-8a86-495b-b2d0-baf491ce6ff5'
Owner:
type: object
required:
- Name
- Email
properties:
Name:
type: string
maxLength: 400
description: Name of the owner.
example: 'Stan Raine'
Email:
type: string
maxLength: 500
description: Email of the owner.
example: 'stan.raine@acme.test'
OpenID:
type: string
format: uri
maxLength: 100
description: The OpenID of the owner. Will only be available if the owner has a Democompany Platform account.
example: 'https://mxid2.democompanycloud.com/mxid2/id?id=964fe18e-65f6-4ed2-99c3-62acee9dcdd6'
SecurityScheme:
type: object
properties:
SecurityTypes:
type: array
items:
$ref: '#/components/schemas/SecurityType'
example:
- Name: 'Basic'
- Name: 'MxID'
MarketplaceModuleID: '93457'
MxAllowedRoles:
type: array
description: The roles that can access this endpoint in a Democompany application.
items:
$ref: '#/components/schemas/MxAllowedRole'
SecurityType:
description: Description of the supported security type
anyOf:
- $ref: '#/components/schemas/SecurityType_Base'
- $ref: '#/components/schemas/SecurityType_Custom'
discriminator:
propertyName: Name
mapping:
Basic: '#/components/schemas/SecurityType_Base'
Anonymous: '#/components/schemas/SecurityType_Base'
Session: '#/components/schemas/SecurityType_Base'
MxID: '#/components/schemas/SecurityType_Custom'
Custom: '#/components/schemas/SecurityType_Custom'
SecurityType_Base:
type: object
required:
- Name
properties:
Name:
type: string
enum: ['Basic','Session','Custom','MxID','Anonymous']
description: The name of a security scheme
example: 'MxID'
SecurityType_Custom:
allOf:
- $ref: '#/components/schemas/SecurityType_Base'
- type: object
properties:
MarketplaceModuleID:
type: string
maxLength: 200
description: The numeric ID of the Marketplace module that implements this security type. It can be found in the Marketplace webpage URL of the desired module.
example: '93457'
MarketplaceModuleLocation:
type: string
maxLength: 500
description: The full URL of the Marketplace module that implements this security type.
Service_Base:
type: object
required:
- Name
properties:
Name:
type: string
maxLength: 200
example: 'test.acme.employeeinformation'
description: 'Name of the service. This is the key by which a service is identified within an environment. Changing the name will cause it to be considered a new service.'
Service_Response:
allOf:
- $ref: '#/components/schemas/Service_Base'
- type: object
required:
- UUID
- Links
properties:
UUID:
type: string
format: uuid
description: 'UUID uniquely identifying the service.'
example: '4f68596a-7bd3-4f31-b8d7-a9e1344e7b60'
Links:
type: array
description: Will contain a Self link for the Service that can be used to retrieve a detailed representation.
items:
$ref: '#/components/schemas/Link'
example:
- Rel: 'Self'
Href: 'https://hub.democompany.com/rest/registration/v4/applications/cfc36b98-7409-4384-b71d-f003b0c2f84b/services/test.acme.employeeinformation'
ServiceVersion_Base:
type: object
required:
- Version
- SecurityScheme
- ContractType
properties:
Version:
type: string
maxLength: 200
example: '2.1'
description: 'Version number of the service. This is the key by which a version is identified within a service.'
ContractType:
type: string
enum: ['OData']
description: 'Protocol used by the service. Currently supported value: OData'
example: 'OData'
Description:
type: string
example: 'Information about the employees of AcmeCorp'
description: 'Description of the service'
Tags:
type: array
items:
$ref: '#/components/schemas/Tag'
example:
- Name: 'HR'
- Name: 'Employee'
SecurityScheme:
$ref: '#/components/schemas/SecurityScheme'
ServiceVersion_ResponseBase:
allOf:
- $ref: '#/components/schemas/ServiceVersion_Base'
- type: object
required:
- UUID
- PublishDate
- ProtocolVersion
- MinProtocolVersion
properties:
UUID:
type: string
format: uuid
description: UUID uniquely identifying this ServiceVersion.
example: 'ac288b46-7bd1-4dbe-98e5-e5956d91aa76'
PublishDate:
type: string
format: date-time
description: UTC timestamp of the most recent update to the service.
example: "2019-07-23T15:28:34.981Z"
ProtocolVersion:
type: string
description: 'Protocol version implemented by the service'
example: '3.0'
MinProtocolVersion:
type: string
description: 'Minimum protocol version supported by the service'
example: '2.0'
ServiceVersion_Request:
allOf:
- $ref: '#/components/schemas/ServiceVersion_Base'
- type: object
required:
- Contracts
- Service
properties:
Service:
allOf:
- $ref: '#/components/schemas/Service_Base'
- type: object
description: 'Service details of endpoint.'
Contracts:
type: array
items:
$ref: '#/components/schemas/Contract'
ServiceVersion_Response:
allOf:
- $ref: '#/components/schemas/ServiceVersion_ResponseBase'
- type: object
required:
- Service
properties:
Service:
allOf:
- $ref: '#/components/schemas/Service_Response'
- type: object
description: 'Service details of endpoint.'
ServiceVersionResponseWithEntity:
allOf:
- $ref: '#/components/schemas/ServiceVersion_Response'
- type: object
required:
- TotalItems
- Items
properties:
TotalItems:
type: integer
description: The total number of items (such as data sources) existing at this level
example: 17
Items:
$ref: '#/components/schemas/ItemsArray'
Tag:
type: object
description: A tag on this endpoint
required:
- Name
properties:
Name:
type: string
maxLength: 100
description: name of the tag.
example: 'hr'
securitySchemes:
OAuth2:
type: oauth2
description: OAuth2 based authentication using authorization code flow.
flows:
authorizationCode:
authorizationUrl: 'https://login.democompany.com/oauth/authorize'
tokenUrl: 'https://login.democompany.com/oauth/token'
scopes:
mx:datahub:services:write: Operations on resources that may create, delete or change resources.
mx:datahub:services:read: Read-only access to resources.
openid: Required to access user info, must have scope for every api
offline_access: Required to access user info, must have scope for every api
mx:user:profile:v1:read: Required to access user info, must have scope for every api
PersonalAccessTokens:
type: apiKey
in: header
name: Authorization
description: 'Personal access tokens for access to the Data Hub Catalog APIs; set in your [Democompany Developer Settings](https://user-settings.democompany.com/link/developersettings). Contents of the header should be ```MxToken <Your PAT>```.'
The text was updated successfully, but these errors were encountered:
Honestly, I didn't even think we had implemented $ref in PathItems, never mind external references here. I'm not sure we are likely to get a chance to fix this before the v2 release. If you have an idea how to fix it, we would be happy to take a PR for it.
Describe the bug
When reading and parsing an OpenAPI document with the OpenApi.Net library and there is a Path is a reference to another Path in another document where the path contains segments and therefore contina forward slashes between path segments, these have to be escaped with
~1
in the Path reference and the OpenApi library cannot resolve these.To Reproduce
Parse the attached example with this OpenAPI.Net library.
Expected behavior
When a Path is a reference to a path in another file then the forward slashes in th path is escaped with
~1
, the reference should be resolved to the correct path in the other file, currently it cannot be resolved.Screenshots/Code Snippets
The reference in file (see attached) registration_v4.yaml is:
And the Path definition in the file common-definitions_v4.yaml is:
EXAMPLE
registration_v4.yaml
common-definitions_v4.yaml
The text was updated successfully, but these errors were encountered: