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

827 Adding appD error route examples #973

Merged
merged 2 commits into from
May 11, 2023
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Added

* Added error examples to the /v2 App Directory API routes ([#973](https://github.com/finos/FDC3/pull/973))

### Changed

* Updated definition of the `Instrument` context type to include optional market identifiers ([#819](https://github.com/finos/FDC3/pull/819))
Expand Down
61 changes: 45 additions & 16 deletions src/app-directory/specification/appd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,32 @@ paths:
FDC3WorkbenchAppDefinition:
$ref: '#/components/examples/FDC3WorkbenchAppDefinition'
'400':
description: Bad request.
description: Bad request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorDTO'
examples:
Error400Example:
$ref: '#/components/examples/Error400Example'
'403':
description: >-
Forbidden: Certificate authentication is not allowed for the
requested user.
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorDTO'
examples:
Error403Example:
$ref: '#/components/examples/Error403Example'
'500':
description: 'Server error, see response body for further details.'
description: Server error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorDTO'
examples:
Error500Example:
$ref: '#/components/examples/Error500Example'
tags:
- Application
/v2/apps:
Expand All @@ -69,25 +76,32 @@ paths:
AllAppsResponse:
$ref: '#/components/examples/AllAppsResponse'
'400':
description: Bad request.
description: Bad request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorDTO'
examples:
Error400Example:
$ref: '#/components/examples/Error400Example'
'403':
description: >-
Forbidden: Certificate authentication is not allowed for the
requested user.
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorDTO'
examples:
Error403Example:
$ref: '#/components/examples/Error403Example'
'500':
description: 'Server error, see response body for further details.'
description: Server error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorDTO'
examples:
Error500Example:
$ref: '#/components/examples/Error500Example'
tags:
- Application
'/v1/apps/{appId}':
Expand Down Expand Up @@ -379,7 +393,7 @@ components:
- training
- travel
- video
- visualisation
- visualization
- weather
type: array
items:
Expand Down Expand Up @@ -409,7 +423,7 @@ components:
moreInfo:
type: string
format: uri
description: Optional URL that provides more infomation about the application
description: Optional URL that provides more information about the application
publisher:
type: string
description: >-
Expand Down Expand Up @@ -533,7 +547,7 @@ components:
properties:
url:
type: string
formt: uri
format: uri
description: Application start URL.
additionalProperties: false
NativeAppDetails:
Expand Down Expand Up @@ -750,7 +764,7 @@ components:
items:
type: string
description: >-
A comma sepaarted list of the types of contexts the intent offered by the application can process.
A comma separated list of the types of contexts the intent offered by the application can process.
where the first part of the context type is the namespace e.g."fdc3.contact, org.symphony.contact"
customConfig:
type: object
Expand Down Expand Up @@ -947,7 +961,7 @@ components:
description: Outil de développement et de test pour les desktop agents et applications FDC3
}
}
summary: A sample app definition for the FDC3 Workbench application
summary: A sample app definition for the FDC3 Workbench
MyAppDefinition:
value:
appId: my-application
Expand Down Expand Up @@ -1061,7 +1075,7 @@ components:
fr-FR:
title: Mon application,
description: Un exemple d'application qui utilise FDC3 et se décrit entièrement dans un enregistrement AppD.
summary: A sample app definition for an application that describes its use of interop.
summary: A sample app definition that describes the app's use of interop.
AllAppsResponse:
value:
applications: # you can't $ref inside a $ref so example is repeated here for search response
Expand Down Expand Up @@ -1253,3 +1267,18 @@ components:
}
message: OK
summary: A sample 'all applications' listing response
Error400Example:
value:
code: 400
message: There was an error in your request.
summary: A sample Bad Request error.
Error403Example:
value:
code: 403
message: Certificate authentication failed for the requested user.
summary: A sample Forbidden error.
Error500Example:
value:
code: 500
message: An internal server error occurred. See the response body for further details.
summary: A sample Server error.
4 changes: 2 additions & 2 deletions website/static/schemas/1.2/app-directory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ security:
paths:
'/v1/apps/{appId}':
get:
summary: Retrieve an application defintion
summary: Retrieve an application definition
parameters:
- name: appId
in: path
Expand Down Expand Up @@ -374,7 +374,7 @@ components:
items:
type: string
description: >-
A comma sepaarted list of the types of contexts the intent offered by the application can process.
A comma separated list of the types of contexts the intent offered by the application can process.
where the first part of the context type is the namespace e.g."fdc3.contact, org.symphony.contact"
customConfig:
type: object
Expand Down
8 changes: 4 additions & 4 deletions website/static/schemas/2.0/app-directory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ components:
- training
- travel
- video
- visualisation
- visualization
- weather
type: array
items:
Expand Down Expand Up @@ -409,7 +409,7 @@ components:
moreInfo:
type: string
format: uri
description: Optional URL that provides more infomation about the application
description: Optional URL that provides more information about the application
publisher:
type: string
description: >-
Expand Down Expand Up @@ -533,7 +533,7 @@ components:
properties:
url:
type: string
formt: uri
format: uri
description: Application start URL.
additionalProperties: false
NativeAppDetails:
Expand Down Expand Up @@ -750,7 +750,7 @@ components:
items:
type: string
description: >-
A comma sepaarted list of the types of contexts the intent offered by the application can process.
A comma separated list of the types of contexts the intent offered by the application can process.
where the first part of the context type is the namespace e.g."fdc3.contact, org.symphony.contact"
customConfig:
type: object
Expand Down
61 changes: 45 additions & 16 deletions website/static/schemas/next/app-directory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,32 @@ paths:
FDC3WorkbenchAppDefinition:
$ref: '#/components/examples/FDC3WorkbenchAppDefinition'
'400':
description: Bad request.
description: Bad request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorDTO'
examples:
Error400Example:
$ref: '#/components/examples/Error400Example'
'403':
description: >-
Forbidden: Certificate authentication is not allowed for the
requested user.
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorDTO'
examples:
Error403Example:
$ref: '#/components/examples/Error403Example'
'500':
description: 'Server error, see response body for further details.'
description: Server error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorDTO'
examples:
Error500Example:
$ref: '#/components/examples/Error500Example'
tags:
- Application
/v2/apps:
Expand All @@ -69,25 +76,32 @@ paths:
AllAppsResponse:
$ref: '#/components/examples/AllAppsResponse'
'400':
description: Bad request.
description: Bad request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorDTO'
examples:
Error400Example:
$ref: '#/components/examples/Error400Example'
'403':
description: >-
Forbidden: Certificate authentication is not allowed for the
requested user.
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorDTO'
examples:
Error403Example:
$ref: '#/components/examples/Error403Example'
'500':
description: 'Server error, see response body for further details.'
description: Server error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorDTO'
examples:
Error500Example:
$ref: '#/components/examples/Error500Example'
tags:
- Application
'/v1/apps/{appId}':
Expand Down Expand Up @@ -379,7 +393,7 @@ components:
- training
- travel
- video
- visualisation
- visualization
- weather
type: array
items:
Expand Down Expand Up @@ -409,7 +423,7 @@ components:
moreInfo:
type: string
format: uri
description: Optional URL that provides more infomation about the application
description: Optional URL that provides more information about the application
publisher:
type: string
description: >-
Expand Down Expand Up @@ -533,7 +547,7 @@ components:
properties:
url:
type: string
formt: uri
format: uri
description: Application start URL.
additionalProperties: false
NativeAppDetails:
Expand Down Expand Up @@ -750,7 +764,7 @@ components:
items:
type: string
description: >-
A comma sepaarted list of the types of contexts the intent offered by the application can process.
A comma separated list of the types of contexts the intent offered by the application can process.
where the first part of the context type is the namespace e.g."fdc3.contact, org.symphony.contact"
customConfig:
type: object
Expand Down Expand Up @@ -947,7 +961,7 @@ components:
description: Outil de développement et de test pour les desktop agents et applications FDC3
}
}
summary: A sample app definition for the FDC3 Workbench application
summary: A sample app definition for the FDC3 Workbench
MyAppDefinition:
value:
appId: my-application
Expand Down Expand Up @@ -1061,7 +1075,7 @@ components:
fr-FR:
title: Mon application,
description: Un exemple d'application qui utilise FDC3 et se décrit entièrement dans un enregistrement AppD.
summary: A sample app definition for an application that describes its use of interop.
summary: A sample app definition that describes the app's use of interop.
AllAppsResponse:
value:
applications: # you can't $ref inside a $ref so example is repeated here for search response
Expand Down Expand Up @@ -1253,3 +1267,18 @@ components:
}
message: OK
summary: A sample 'all applications' listing response
Error400Example:
value:
code: 400
message: There was an error in your request.
summary: A sample Bad Request error.
Error403Example:
value:
code: 403
message: Certificate authentication failed for the requested user.
summary: A sample Forbidden error.
Error500Example:
value:
code: 500
message: An internal server error occurred. See the response body for further details.
summary: A sample Server error.