Skip to content

Commit fa97b76

Browse files
vanch3dCopilot
andauthored
refactor(37325): Refactor the OpenAPI to support filters (#1217)
* refactor(37057): reorganise the domain path * refactor(37057): reorganise the domain path * refactor(37057): add list of tags with their ownership * refactor(37057): add list of northbound mappings with their ownership * refactor(37057): add list of southbound mappings with their ownership * refactor(37057): refactor the list of topic filters * Update hivemq-edge-openapi/openapi/components/schemas/SouthboundMappingOwnerList.yaml Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 8ce391b commit fa97b76

10 files changed

+99
-35
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
type: object
2+
properties:
3+
items:
4+
type: array
5+
description: List of result items that are returned by this endpoint
6+
items:
7+
type: object
8+
required:
9+
- adapterId
10+
- mapping
11+
properties:
12+
adapterId:
13+
type: string
14+
description: The id of the adapter owning the tag
15+
mapping:
16+
$ref: ./DomainTag.yaml
17+
required:
18+
- items
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
type: object
2+
properties:
3+
items:
4+
type: array
5+
description: List of result items that are returned by this endpoint
6+
items:
7+
type: object
8+
required:
9+
- adapterId
10+
- mapping
11+
properties:
12+
adapterId:
13+
type: string
14+
description: The id of the adapter owning the mapping
15+
mapping:
16+
$ref: ./NorthboundMapping.yaml
17+
required:
18+
- items
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
type: object
2+
properties:
3+
items:
4+
type: array
5+
description: List of result items that are returned by this endpoint
6+
items:
7+
type: object
8+
required:
9+
- adapterId
10+
- mapping
11+
properties:
12+
adapterId:
13+
type: string
14+
description: The id of the adapter owning the mapping
15+
mapping:
16+
$ref: ./SouthboundMapping.yaml
17+
required:
18+
- items

hivemq-edge-openapi/openapi/openapi.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ tags:
155155
Hub.
156156
157157
name: Data Hub - State
158+
- description: >+
159+
These endpoints can be used to retrieve the different elements of the Edge topology
160+
name: Domain
158161
- description: >+
159162
These endpoints can be used to manage Pulse and its assets.
160163
name: Pulse
@@ -193,6 +196,14 @@ paths:
193196
$ref: paths/api_v1_data-hub_scripts.yaml
194197
/api/v1/data-hub/scripts/{scriptId}:
195198
$ref: paths/api_v1_data-hub_scripts_{scriptId}.yaml
199+
/api/v1/domain/protocol-adapters/northboundMappings:
200+
$ref: paths/domain/protocol-adapters_northboundMappings.yaml
201+
/api/v1/domain/protocol-adapters/southboundMappings:
202+
$ref: paths/domain/protocol-adapters_southboundMappings.yaml
203+
/api/v1/domain/protocol-adapters/tags:
204+
$ref: paths/domain/protocol-adapters_tags.yaml
205+
/api/v1/domain/edge/topic-filters:
206+
$ref: "paths/domain/edge_topic-filters.yaml"
196207
/api/v1/frontend/capabilities:
197208
$ref: paths/api_v1_frontend_capabilities.yaml
198209
/api/v1/frontend/configuration:
@@ -239,16 +250,10 @@ paths:
239250
$ref: paths/api_v1_management_protocol-adapters_adapters_{adapterId}_tags_{tagName}.yaml
240251
/api/v1/management/protocol-adapters/adapters/{adapterType}:
241252
$ref: paths/api_v1_management_protocol-adapters_adapters_{adapterType}.yaml
242-
/api/v1/management/protocol-adapters/northboundMappings:
243-
$ref: paths/api_v1_management_protocol-adapters_northboundMappings.yaml
244-
/api/v1/management/protocol-adapters/southboundMappings:
245-
$ref: paths/api_v1_management_protocol-adapters_southboundMappings.yaml
246253
/api/v1/management/protocol-adapters/status:
247254
$ref: paths/api_v1_management_protocol-adapters_status.yaml
248255
/api/v1/management/protocol-adapters/tag-schemas/{protocolId}:
249256
$ref: paths/api_v1_management_protocol-adapters_tag-schemas_{protocolId}.yaml
250-
/api/v1/management/protocol-adapters/tags:
251-
$ref: paths/api_v1_management_protocol-adapters_tags.yaml
252257
/api/v1/management/protocol-adapters/tags/{tagName}:
253258
$ref: paths/api_v1_management_protocol-adapters_tags_{tagName}.yaml
254259
/api/v1/management/protocol-adapters/types:

hivemq-edge-openapi/openapi/paths/api_v1_management_topic-filters.yaml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,3 @@
1-
get:
2-
description: Get the list of all topic filters created in this Edge instance
3-
operationId: get-topicFilters
4-
responses:
5-
'200':
6-
content:
7-
application/json:
8-
examples:
9-
An example for the topic filter list:
10-
description: An example for the topic filter list
11-
summary: An example for the topic filter list
12-
value:
13-
items:
14-
- topicFilter: topic1
15-
description: filter1
16-
- topicFilter: topic2
17-
description: filter2
18-
schema:
19-
$ref: ../components/schemas/TopicFilterList.yaml
20-
description: Success
21-
summary: Get the list of all topic filters created in this Edge instance
22-
tags:
23-
- Topic Filters
241
post:
252
description: Add a new topic filter.
263
operationId: add-topicFilters
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
get:
2+
description: Get the list of all topic filters created in this Edge instance
3+
operationId: get-topicFilters
4+
responses:
5+
'200':
6+
content:
7+
application/json:
8+
examples:
9+
An example for the topic filter list:
10+
description: An example for the topic filter list
11+
summary: An example for the topic filter list
12+
value:
13+
items:
14+
- topicFilter: topic1
15+
description: filter1
16+
- topicFilter: topic2
17+
description: filter2
18+
schema:
19+
$ref: ../../components/schemas/TopicFilterList.yaml
20+
description: Success
21+
summary: Get the list of all topic filters created in this Edge instance
22+
tags:
23+
- Topic Filters
24+
- Domain
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ get:
66
content:
77
application/json:
88
schema:
9-
$ref: ../components/schemas/NorthboundMappingList.yaml
9+
$ref: ../../components/schemas/NorthboundMappingOwnerList.yaml
1010
description: Success
11-
summary: Get the mappings for northbound messages.
11+
summary: Get all the northbound mappings.
1212
tags:
1313
- Protocol Adapters
14+
- Domain
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ get:
66
content:
77
application/json:
88
schema:
9-
$ref: ../components/schemas/SouthboundMappingList.yaml
9+
$ref: ../../components/schemas/SouthboundMappingOwnerList.yaml
1010
description: Success
11-
summary: Get all southbound mappings.
11+
summary: Get all the southbound mappings.
1212
tags:
1313
- Protocol Adapters
14+
- Domain
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ get:
1818
node: ns=2;i=test2
1919
name: tag2
2020
schema:
21-
$ref: ../components/schemas/DomainTagList.yaml
21+
$ref: ../../components/schemas/DomainTagOwnerList.yaml
2222
description: Success
23-
summary: Get the list of all domain tags created in this Edge instance
23+
summary: Get the list of all tags created in this Edge instance
2424
tags:
2525
- Protocol Adapters
26+
- Domain

hivemq-edge-openapi/openapi/paths/pulse/managed-assets.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ get:
44
operationId: get-managed-assets
55
tags:
66
- Pulse
7+
- Domain
78
responses:
89
'200':
910
content:

0 commit comments

Comments
 (0)