Skip to content

Commit

Permalink
Integration endpoint improvements (#301)
Browse files Browse the repository at this point in the history
- Add additional properties to integration definitions
- add meta parameter for inlining an integration definition into integration calls
- remove provider options endpoint
  • Loading branch information
mattoni authored Feb 22, 2024
1 parent 935edc3 commit ef84428
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 45 deletions.
29 changes: 29 additions & 0 deletions components/schemas/hubs/integrations/IntegrationDefinition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ required:
- identifier
- name
- supports_verification
- supports_multiple
- required_fields
- url
- public
- usable
properties:
identifier:
type: string
Expand All @@ -28,6 +31,29 @@ properties:
type: boolean
supports_multiple:
type: boolean
features:
type: array
description: A list of additional features supported by this Integration.
nullable: true
items:
type: string
extended_configuration:
type: object
nullable: true
description: Additional configuration options that are available when using this Integration. These describe additional functionality that Cycle may utilize.
properties:
options:
type: array
nullable: true
items:
type: object
properties:
title:
type: string
key:
type: string
type:
type: string
fields:
type: object
properties:
Expand Down Expand Up @@ -69,3 +95,6 @@ properties:
public:
type: boolean
nullable: true
usable:
type: boolean
nullable: true
7 changes: 7 additions & 0 deletions components/schemas/hubs/integrations/IntegrationMeta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: IntegrationMeta
type: object
description: Additional fields that can be requested for an Integration on fetch.
properties:
definition:
$ref: "../StateCountSummary.yml"
description: The full Integration definition associated with this Integration.
2 changes: 0 additions & 2 deletions public/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,6 @@ paths:
"/v1/infrastructure/summary":
"$ref": "./paths/infrastructure/summary.yml"
## Providers
"/v1/infrastructure/providers/options":
"$ref": "./paths/infrastructure/providers/options.yml"
"/v1/infrastructure/providers/{providerIdentifier}/servers":
"$ref": "./paths/infrastructure/providers/servers.yml"
"/v1/infrastructure/providers/{providerIdentifier}/locations":
Expand Down
30 changes: 30 additions & 0 deletions public/paths/hubs/integrations/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ get:
type: string
pattern: "^[a-f0-9]{24}$"
description: The ID of the integration to retrieve.
- name: meta
in: query
required: false
description:
A comma separated list of meta values. Meta values will show up under a resource's
`meta` field. In the case of applying a meta to a collection of resources, each
resource will have it's own relevant meta data. In some rare cases, meta may not
apply to individual resources, and may appear in the root document. These will be
clearly labeled.
schema:
type: array
items:
type: string
enum:
- definition
responses:
200:
description: Details of the specified integration
Expand Down Expand Up @@ -45,6 +60,21 @@ patch:
type: string
pattern: "^[a-f0-9]{24}$"
description: The ID of the integration to update.
- name: meta
in: query
required: false
description:
A comma separated list of meta values. Meta values will show up under a resource's
`meta` field. In the case of applying a meta to a collection of resources, each
resource will have it's own relevant meta data. In some rare cases, meta may not
apply to individual resources, and may appear in the root document. These will be
clearly labeled.
schema:
type: array
items:
type: string
enum:
- definition
requestBody:
required: true
content:
Expand Down
32 changes: 31 additions & 1 deletion public/paths/hubs/integrations/integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ get:
description: Lists all integrations associated with the current hub, with optional filtering.
parameters:
- $ref: ../../../../components/parameters/PageParam.yml
- name: meta
in: query
required: false
description:
A comma separated list of meta values. Meta values will show up under a resource's
`meta` field. In the case of applying a meta to a collection of resources, each
resource will have it's own relevant meta data. In some rare cases, meta may not
apply to individual resources, and may appear in the root document. These will be
clearly labeled.
schema:
type: array
items:
type: string
enum:
- definition
- name: filter
in: query
style: deepObject
Expand Down Expand Up @@ -57,7 +72,22 @@ post:
- Hubs
security:
- bearerAuth: []
parameters: []
parameters:
- name: meta
in: query
required: false
description:
A comma separated list of meta values. Meta values will show up under a resource's
`meta` field. In the case of applying a meta to a collection of resources, each
resource will have it's own relevant meta data. In some rare cases, meta may not
apply to individual resources, and may appear in the root document. These will be
clearly labeled.
schema:
type: array
items:
type: string
enum:
- definition
summary: Create Integration
description: Create an integration resource within a hub.
requestBody:
Expand Down
42 changes: 0 additions & 42 deletions public/paths/infrastructure/providers/options.yml

This file was deleted.

0 comments on commit ef84428

Please sign in to comment.