Skip to content
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
10 changes: 8 additions & 2 deletions code/API_definitions/network-slice-assignment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.0.3

Check warning on line 1 in code/API_definitions/network-slice-assignment.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

CloudEvent should be $ref

[P-020] CloudEvent is defined inline in code/API_definitions/network-slice-assignment.yaml. Consume the shared schema from CAMARA_event_common.yaml via $ref instead of maintaining a local copy. | Suggestion%3A Replace the local CloudEvent schema with `$ref%3A './CAMARA_event_common.yaml#/components/schemas/CloudEvent'`, or an allOf combining the $ref with an API-specific ApiEventType schema. See implicit-events API template in Commonalities artifacts/api-templates/.
info:
title: Network Slice Assignment
description: |
Expand Down Expand Up @@ -60,7 +60,7 @@
- url: "{apiRoot}/network-slice-assignment/vwip"
variables:
apiRoot:
default: http://localhost:9100
default: http://localhost:9091
description: API root, defined by the service provider, e.g. `api.example.com` or `api.example.com/somepath`
tags:
- name: Network Slice Assignment
Expand Down Expand Up @@ -464,7 +464,8 @@
Port:
description: TCP or UDP port number
type: integer
minimum: 0
format: int32
minimum: 1
maximum: 65535

DeviceIpv6Address:
Expand Down Expand Up @@ -574,20 +575,24 @@
type: object
properties:
sliceList:
description: List of slices assigned to the device
type: array
items:
$ref: "#/components/schemas/SliceInfo"
minItems: 0
maxItems: 16

SliceDevices:
description: Information about devices assigned to a slice
type: object
properties:
deviceList:
description: List of devices assigned to the slice
type: array
items:
$ref: "#/components/schemas/Device"
minItems: 0
maxItems: 2147483647
sliceInfo:
$ref: "#/components/schemas/SliceInfo"
required:
Expand Down Expand Up @@ -687,6 +692,7 @@
example: 12
format: int32
minimum: 1
maximum: 2147483647
unit:
$ref: "#/components/schemas/TimeUnitEnum"

Expand Down Expand Up @@ -772,7 +778,7 @@
- CIRCLE
- POLYGON

Circle:

Check notice on line 781 in code/API_definitions/network-slice-assignment.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Component may be unused

[S-211] Potentially unused component has been detected. | Suggestion%3A Spectral does not follow discriminator mappings — verify the schema is truly unused.
description: Circular area
allOf:
- $ref: "#/components/schemas/Area"
Expand All @@ -788,7 +794,7 @@
description: Distance from the center in meters
minimum: 1

Polygon:

Check notice on line 797 in code/API_definitions/network-slice-assignment.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Component may be unused

[S-211] Potentially unused component has been detected. | Suggestion%3A Spectral does not follow discriminator mappings — verify the schema is truly unused.
description: Polygonal area. The Polygon should be a simple polygon, i.e. should not intersect itself.
allOf:
- $ref: "#/components/schemas/Area"
Expand Down Expand Up @@ -928,7 +934,7 @@
propertyName: "type"
mapping:
org.camaraproject.network-slice-assignment.v0.status-changed: "#/components/schemas/AssignmentDeviceEvent"
AssignmentDeviceEvent:

Check notice on line 937 in code/API_definitions/network-slice-assignment.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Component may be unused

[S-211] Potentially unused component has been detected. | Suggestion%3A Spectral does not follow discriminator mappings — verify the schema is truly unused.
description: Event to notify about device assignment status change
allOf:
- $ref: "#/components/schemas/ApiNotificationEvent"
Expand Down Expand Up @@ -986,14 +992,14 @@
PRIVATE_KEY_JWT: "#/components/schemas/PrivateKeyJWTCredential"
required:
- credentialType
AccessTokenCredential:

Check notice on line 995 in code/API_definitions/network-slice-assignment.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Component may be unused

[S-211] Potentially unused component has been detected. | Suggestion%3A Spectral does not follow discriminator mappings — verify the schema is truly unused.
type: object
description: An access token credential. This type of credential is meant to be used by API Consumers that have limited capabilities to handle authorization requests.
allOf:
- $ref: "#/components/schemas/SinkCredential"
- type: object
properties:
accessToken:

Check notice on line 1002 in code/API_definitions/network-slice-assignment.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

String has no format/pattern/enum

[S-313] Schema of type string should specify a format, pattern, enum, or const. | Suggestion%3A Acceptable if free-form field or implementation-dependent — no fix needed.
description: REQUIRED. An access token is a token granting access to the target resource.
type: string
maxLength: 4096
Expand All @@ -1016,7 +1022,7 @@
- accessToken
- accessTokenExpiresUtc
- accessTokenType
PrivateKeyJWTCredential:

Check notice on line 1025 in code/API_definitions/network-slice-assignment.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Component may be unused

[S-211] Potentially unused component has been detected. | Suggestion%3A Spectral does not follow discriminator mappings — verify the schema is truly unused.
type: object
description: Use PRIVATE_KEY_JWT to get an access token. The authorization server information needed for this type of sink credential (token endpoint, client ID, JWKS URL) is shared upfront between the client and the CAMARA entity. This type of credential is to be used by clients that have an authorization server.
allOf:
Expand Down Expand Up @@ -1163,7 +1169,7 @@
status: 410
code: GONE
message: Access to the target resource is no longer available.
NetworkSliceBooking422:

Check notice on line 1172 in code/API_definitions/network-slice-assignment.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Component may be unused

[S-211] Potentially unused component has been detected. | Suggestion%3A Spectral does not follow discriminator mappings — verify the schema is truly unused.
description: Unprocessable Content
headers:
x-correlator:
Expand Down
17 changes: 12 additions & 5 deletions code/API_definitions/network-slice-booking.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.0.3

Check warning on line 1 in code/API_definitions/network-slice-booking.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

CloudEvent should be $ref

[P-020] CloudEvent is defined inline in code/API_definitions/network-slice-booking.yaml. Consume the shared schema from CAMARA_event_common.yaml via $ref instead of maintaining a local copy. | Suggestion%3A Replace the local CloudEvent schema with `$ref%3A './CAMARA_event_common.yaml#/components/schemas/CloudEvent'`, or an allOf combining the $ref with an API-specific ApiEventType schema. See implicit-events API template in Commonalities artifacts/api-templates/.
info:
title: Network Slice Booking
description: |
Expand Down Expand Up @@ -55,7 +55,7 @@
- url: "{apiRoot}/network-slice-booking/vwip"
variables:
apiRoot:
default: http://localhost:9100
default: http://localhost:9091
description: API root, defined by the service provider, e.g. `api.example.com` or `api.example.com/somepath`
tags:
- name: Network Slice Booking
Expand Down Expand Up @@ -87,9 +87,9 @@
$ref: "#/components/schemas/SliceAttributes"
examples:
LOCATION_CIRCLE:
$ref: "#/components/examples/RETRIEVAL_CIRCLE"
$ref: "#/components/examples/CREATE_CIRCLE"
LOCATION_POLYGON:
$ref: "#/components/examples/RETRIEVAL_POLYGON"
$ref: "#/components/examples/CREATE_POLYGON"
required: true
callbacks:
networkSliceBookingSinkCallback:
Expand Down Expand Up @@ -379,6 +379,7 @@
example: 12
format: int32
minimum: 1
maximum: 2147483647
unit:
$ref: "#/components/schemas/TimeUnitEnum"

Expand Down Expand Up @@ -464,7 +465,7 @@
- CIRCLE
- POLYGON

Circle:

Check notice on line 468 in code/API_definitions/network-slice-booking.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Component may be unused

[S-211] Potentially unused component has been detected. | Suggestion%3A Spectral does not follow discriminator mappings — verify the schema is truly unused.
description: Circular area
allOf:
- $ref: "#/components/schemas/Area"
Expand All @@ -480,7 +481,7 @@
description: Distance from the center in meters
minimum: 1

Polygon:

Check notice on line 484 in code/API_definitions/network-slice-booking.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Component may be unused

[S-211] Potentially unused component has been detected. | Suggestion%3A Spectral does not follow discriminator mappings — verify the schema is truly unused.
description: Polygonal area. The Polygon should be a simple polygon, i.e. should not intersect itself.
allOf:
- $ref: "#/components/schemas/Area"
Expand Down Expand Up @@ -623,7 +624,7 @@
propertyName: "type"
mapping:
org.camaraproject.network-slice-booking.v0.status-changed: "#/components/schemas/SliceCreatedEvent"
SliceCreatedEvent:

Check notice on line 627 in code/API_definitions/network-slice-booking.yaml

View workflow job for this annotation

GitHub Actions / validation / Validate

Component may be unused

[S-211] Potentially unused component has been detected. | Suggestion%3A Spectral does not follow discriminator mappings — verify the schema is truly unused.
description: Event to notify about device assignment status change
allOf:
- $ref: "#/components/schemas/ApiNotificationEvent"
Expand Down Expand Up @@ -917,7 +918,8 @@
message: Rate limit reached.

examples:
RETRIEVAL_CIRCLE:
CREATE_CIRCLE:
description: Create a circle service area slice
value:
serviceTime:
startDate: "2024-06-01T12:00:00Z"
Expand Down Expand Up @@ -949,7 +951,8 @@
accessToken: "<access_token>"
accessTokenExpiresUtc: "2025-12-31T23:59:59Z"
accessTokenType: bearer
RETRIEVAL_POLYGON:
CREATE_POLYGON:
description: Create a polygon service area slice
value:
serviceTime:
startDate: "2024-06-01T12:00:00Z"
Expand Down Expand Up @@ -987,6 +990,7 @@
accessTokenExpiresUtc: "2025-12-31T23:59:59Z"
accessTokenType: bearer
RESPONSE_CIRCLE:
description: Response example for a circle service area slice
value:
serviceTime:
startDate: "2024-06-01T12:00:00Z"
Expand All @@ -1013,6 +1017,7 @@
unit: Milliseconds
sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
RESPONSE_POLYGON:
description: Response example for a polygon service area slice
value:
serviceTime:
startDate: "2024-06-01T12:00:00Z"
Expand Down Expand Up @@ -1044,6 +1049,7 @@
unit: Milliseconds
sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
SLICE_CREATED_EVENT_CIRCLE:
description: Event example for a slice created with circle service area
value:
id: "83a0d986-0866-4f38-b8c0-fc65bfcda452"
source: "https://notificationSendServer12.example.com"
Expand Down Expand Up @@ -1077,6 +1083,7 @@
unit: Milliseconds
sliceId: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
SLICE_CREATED_EVENT_POLYGON:
description: Event example for a slice created with polygon service area
value:
id: "83a0d986-0866-4f38-b8c0-fc65bfcda452"
source: "https://notificationSendServer12.example.com"
Expand Down