Commits (7)
#!/bin/bash
specfiles=$(ls | egrep "^[^.]*.(json|yaml)")
fres=0
for i in $specfiles ; do
echo "-- Validating and linting OpenAPI file $i..."
swagger-cli validate $i
res=$?
speccy lint "$i"
res2=$?
fres=$(($fres||$res||$res2))
echo "--- Validator returned $res, linter returned $res2."
done
echo "-- Final validator returns $fres."
exit $fres
...@@ -25,16 +25,20 @@ ...@@ -25,16 +25,20 @@
], ],
"tags": [ "tags": [
{ {
"name": "Queries" "name": "Queries",
"description": "APIs for Device and fa_info"
}, },
{ {
"name": "Subscription" "name": "Subscription",
"description": "Subscription API"
}, },
{ {
"name": "Cable line info" "name": "Cable line info",
"description": "Cable line info API"
}, },
{ {
"name": "Optical network info" "name": "Optical network info",
"description": "Optican network Info API"
} }
], ],
"paths": { "paths": {
...@@ -535,6 +539,9 @@ ...@@ -535,6 +539,9 @@
"responses": { "responses": {
"204": { "204": {
"$ref": "#/components/responses/204" "$ref": "#/components/responses/204"
},
"400": {
"$ref": "#/components/responses/400"
} }
} }
} }
...@@ -1070,15 +1077,17 @@ ...@@ -1070,15 +1077,17 @@
"ifIndex", "ifIndex",
"serviceFlowInfo" "serviceFlowInfo"
], ],
"ifIndex": { "properties": {
"description": "It represents the interface index of the MAC Domain of the Service Flow.", "ifIndex": {
"type": "string" "description": "It represents the interface index of the MAC Domain of the Service Flow.",
}, "type": "string"
"serviceFlowInfo": { },
"description": "It represents the information of a Service Flow.", "serviceFlowInfo": {
"type": "array", "description": "It represents the information of a Service Flow.",
"items": { "type": "array",
"$ref": "#/components/schemas/CableLineInfo.serviceFlowStats.serviceFlowInfo" "items": {
"$ref": "#/components/schemas/CableLineInfo.serviceFlowStats.serviceFlowInfo"
}
} }
} }
}, },
...@@ -1140,9 +1149,6 @@ ...@@ -1140,9 +1149,6 @@
}, },
"CmConnNotification.cmIf": { "CmConnNotification.cmIf": {
"description": "", "description": "",
"items": {
"type": "object"
},
"properties": { "properties": {
"cmId": { "cmId": {
"description": "The Cable Modem identifier.", "description": "The Cable Modem identifier.",
...@@ -1616,7 +1622,7 @@ ...@@ -1616,7 +1622,7 @@
"downloadURI": { "downloadURI": {
"description": "The URI for the device to perform the download on.", "description": "The URI for the device to perform the download on.",
"format": "uri", "format": "uri",
"type": "uri", "type": "string",
"x-etsi-mec-cardinality": "0..1", "x-etsi-mec-cardinality": "0..1",
"x-etsi-mec-origin-type": "URI" "x-etsi-mec-origin-type": "URI"
}, },
...@@ -1657,7 +1663,7 @@ ...@@ -1657,7 +1663,7 @@
"self": { "self": {
"description": "Self referring URI. This shall be included in the response from the FAIS. The URI shall be unique within the FAI API as it acts as an ID for the subscription.", "description": "Self referring URI. This shall be included in the response from the FAIS. The URI shall be unique within the FAI API as it acts as an ID for the subscription.",
"format": "uri", "format": "uri",
"type": "uri", "type": "string",
"x-etsi-mec-cardinality": "1", "x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "URI" "x-etsi-mec-origin-type": "URI"
} }
...@@ -2002,7 +2008,8 @@ ...@@ -2002,7 +2008,8 @@
"properties": { "properties": {
"subscriptionType": { "subscriptionType": {
"description": "Set by FAIS to indicate to the service consumer the Websocket URI to be used for delivering notifications.", "description": "Set by FAIS to indicate to the service consumer the Websocket URI to be used for delivering notifications.",
"type": "uri" "type": "string",
"format": "uri"
}, },
"requestWebsocketUri": { "requestWebsocketUri": {
"description": "Set to true by the service consumer to indicate that Websocket delivery is requested.", "description": "Set to true by the service consumer to indicate that Websocket delivery is requested.",
...@@ -2100,7 +2107,9 @@ ...@@ -2100,7 +2107,9 @@
}, },
"customerPremisesInfo": { "customerPremisesInfo": {
"description": "The physical location of a customer site.", "description": "The physical location of a customer site.",
"$ref": "#/components/schemas/CpInfo", "items": {
"$ref": "#/components/schemas/CpInfo"
},
"minItems": 1, "minItems": 1,
"type": "array", "type": "array",
"x-etsi-mec-cardinality": "1..N", "x-etsi-mec-cardinality": "1..N",
...@@ -2161,7 +2170,7 @@ ...@@ -2161,7 +2170,7 @@
"href": { "href": {
"description": "The URI referring to the subscription.", "description": "The URI referring to the subscription.",
"format": "uri", "format": "uri",
"type": "uri", "type": "string",
"x-etsi-mec-cardinality": "1", "x-etsi-mec-cardinality": "1",
"x-etsi-mec-origin-type": "URI" "x-etsi-mec-origin-type": "URI"
}, },
......
...@@ -17,9 +17,13 @@ servers: ...@@ -17,9 +17,13 @@ servers:
- url: "https://localhost/fai/v1" - url: "https://localhost/fai/v1"
tags: tags:
- name: Queries - name: Queries
description: "APIs for Device and fa_info"
- name: Subscription - name: Subscription
description: "Subscription API"
- name: "Cable line info" - name: "Cable line info"
description: "Cable line info API"
- name: "Optical network info" - name: "Optical network info"
description: "Optican network Info API"
paths: paths:
/queries/fa_info: /queries/fa_info:
get: get:
...@@ -345,6 +349,8 @@ paths: ...@@ -345,6 +349,8 @@ paths:
responses: responses:
"204": "204":
$ref: "#/components/responses/204" $ref: "#/components/responses/204"
"400":
$ref: "#/components/responses/400"
/subscriptions/{subscriptionId}: /subscriptions/{subscriptionId}:
parameters: parameters:
...@@ -754,14 +760,15 @@ components: ...@@ -754,14 +760,15 @@ components:
required: required:
- ifIndex - ifIndex
- serviceFlowInfo - serviceFlowInfo
ifIndex: properties:
description: It represents the interface index of the MAC Domain of the Service Flow. ifIndex:
type: string description: It represents the interface index of the MAC Domain of the Service Flow.
serviceFlowInfo: type: string
description: It represents the information of a Service Flow. serviceFlowInfo:
type: array description: It represents the information of a Service Flow.
items: type: array
$ref: "#/components/schemas/CableLineInfo.serviceFlowStats.serviceFlowInfo" items:
$ref: "#/components/schemas/CableLineInfo.serviceFlowStats.serviceFlowInfo"
CableLineInfo: CableLineInfo:
type: object type: object
...@@ -819,8 +826,6 @@ components: ...@@ -819,8 +826,6 @@ components:
CmConnNotification.cmIf: CmConnNotification.cmIf:
description: "" description: ""
items:
type: object
properties: properties:
cmId: cmId:
description: The Cable Modem identifier. description: The Cable Modem identifier.
...@@ -1246,7 +1251,7 @@ components: ...@@ -1246,7 +1251,7 @@ components:
downloadURI: downloadURI:
description: The URI for the device to perform the download on. description: The URI for the device to perform the download on.
format: uri format: uri
type: uri type: string
x-etsi-mec-cardinality: 0..1 x-etsi-mec-cardinality: 0..1
x-etsi-mec-origin-type: URI x-etsi-mec-origin-type: URI
eOMTime: eOMTime:
...@@ -1289,7 +1294,7 @@ components: ...@@ -1289,7 +1294,7 @@ components:
self: self:
description: Self referring URI. This shall be included in the response from the FAIS. The URI shall be unique within the FAI API as it acts as an ID for the subscription. description: Self referring URI. This shall be included in the response from the FAIS. The URI shall be unique within the FAI API as it acts as an ID for the subscription.
format: uri format: uri
type: uri type: string
x-etsi-mec-cardinality: "1" x-etsi-mec-cardinality: "1"
x-etsi-mec-origin-type: URI x-etsi-mec-origin-type: URI
required: required:
...@@ -1600,7 +1605,8 @@ components: ...@@ -1600,7 +1605,8 @@ components:
properties: properties:
subscriptionType: subscriptionType:
description: Set by FAIS to indicate to the service consumer the Websocket URI to be used for delivering notifications. description: Set by FAIS to indicate to the service consumer the Websocket URI to be used for delivering notifications.
type: uri type: string
format: uri
requestWebsocketUri: requestWebsocketUri:
description: Set to true by the service consumer to indicate that Websocket delivery is requested. description: Set to true by the service consumer to indicate that Websocket delivery is requested.
type: boolean type: boolean
...@@ -1683,7 +1689,8 @@ components: ...@@ -1683,7 +1689,8 @@ components:
$ref: "#/components/schemas/TimeStamp" $ref: "#/components/schemas/TimeStamp"
customerPremisesInfo: customerPremisesInfo:
description: The physical location of a customer site. description: The physical location of a customer site.
$ref: "#/components/schemas/CpInfo" items:
$ref: "#/components/schemas/CpInfo"
minItems: 1 minItems: 1
type: array type: array
x-etsi-mec-cardinality: 1..N x-etsi-mec-cardinality: 1..N
...@@ -1738,7 +1745,7 @@ components: ...@@ -1738,7 +1745,7 @@ components:
href: href:
description: The URI referring to the subscription. description: The URI referring to the subscription.
format: uri format: uri
type: uri type: string
x-etsi-mec-cardinality: "1" x-etsi-mec-cardinality: "1"
x-etsi-mec-origin-type: URI x-etsi-mec-origin-type: URI
subscriptionType: subscriptionType:
...@@ -2050,4 +2057,4 @@ components: ...@@ -2050,4 +2057,4 @@ components:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/ProblemDetails" $ref: "#/components/schemas/ProblemDetails"
\ No newline at end of file
...@@ -6,8 +6,7 @@ This repository contains OpenAPIs descriptions for the interfaces specified in E ...@@ -6,8 +6,7 @@ This repository contains OpenAPIs descriptions for the interfaces specified in E
## Online resources ## Online resources
* [Specification document](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/029/02.02.01_60/gs_MEC029v020201p.pdf) * [Specification document](https://www.etsi.org/deliver/etsi_gs/MEC/001_099/029/02.02.01_60/gs_MEC029v020201p.pdf)
* [Navigate the Fixed Access Information API in the browser](https://forge.etsi.org/swagger/ui/?url=https://forge.etsi.org/rep/mec/gs029-fai-api/raw/stf606-final/MEC029_FAI.yaml) * [Navigate the Fixed Access Information API in the browser](https://redocly.github.io/redoc/?url=https://forge.etsi.org/rep/mec/gs029-fai-api/-/raw/v2.2.1/MEC029_FAI.yaml)
* [Edit the Fixed Access Information API online ](https://forge.etsi.org/swagger/editor/?url=https://forge.etsi.org/rep/mec/gs029-fai-api/raw/stf606-final/MEC029_FAI.yaml)
## License ## License
......