From 2f986c6e7ad04e7c1014fd488f0df1e2f0459eb2 Mon Sep 17 00:00:00 2001 From: featherstone Date: Fri, 15 Sep 2017 14:28:23 +0100 Subject: [PATCH] Elevated path parameters to the path level, rather than method level Change-Id: Ie5a7a2d0c8a5e6b4e64ee78e8eaf8776f94efde4 Signed-off-by: featherstone --- Mp1.json | Bin 119506 -> 118342 bytes Mp1.yaml | 48 ++++++++---------- .../Mp1SubscriptionLinkList.Subscription.yaml | 2 +- definitions/ServiceInfo.TransportId.yaml | 2 +- paths/ApplicationsDnsRule.GET.yaml | 3 -- paths/ApplicationsDnsRule.PUT.yaml | 2 - paths/ApplicationsDnsRule.yaml | 4 ++ paths/ApplicationsDnsRules.GET.yaml | 2 - paths/ApplicationsDnsRules.yaml | 3 ++ paths/ApplicationsSubscription.GET.yaml | 4 -- paths/ApplicationsSubscription.yaml | 5 ++ paths/ApplicationsSubscriptions.GET.yaml | 2 - paths/ApplicationsSubscriptions.POST.yaml | 1 - paths/ApplicationsSubscriptions.yaml | 3 ++ paths/ApplicationsTrafficRule.GET.yaml | 3 -- paths/ApplicationsTrafficRule.PUT.yaml | 2 - paths/ApplicationsTrafficRule.yaml | 4 ++ paths/ApplicationsTrafficRules.GET.yaml | 2 - paths/ApplicationsTrafficRules.yaml | 3 ++ paths/ServicesServiceId.GET.yaml | 3 +- paths/ServicesServiceId.PUT.yaml | 1 - paths/ServicesServiceId.yaml | 3 ++ 22 files changed, 49 insertions(+), 53 deletions(-) diff --git a/Mp1.json b/Mp1.json index ea3b417c5e24fbc927d98445074231a1f3396815..f16f40b9f037a4e973460ef71104b5dbe1418490 100644 GIT binary patch delta 531 zcmcb#l>OKo_6;^#lMTELCQs0jnw$`7HhEov!Q=x5LX*CVO%8}#wE3P^9pmPNj%|#a z|LHwp!ch6aS^};!!A1k2bIRs2qZ*J-EvCtT{_ssQFqp)rw^_i#j(PF|3z5wUrWrs6 zpWNgJu{M*#0;ML`IY?m`4tIvz3M$CddzAa#{E-HVgwHPTCw0XTSsw zmC66~zD#!5%Qih=HKV|0os?gU7+MhanoVxVgat0ph%Uy-8`76Rf(T~BWSta)$q6Z0 zlM`w`ZQhVOfe92^lMP&6O^%u4wE09)nh=ut7L(aJ)DV7{GWp32waN49N;b!|DS(1r zO$Zn=izYYdx^3o~bEKIuX7WTyW#$+LrR_iE856ZZtm%qgjKY(%cG_&;;LWJi4ggJg B)F=P| delta 571 zcmX>$hyBu0_6;^#lP|<9ntbECz~rvjU6UJhwoF!-RyWxo#cJ|}aH+`;a-=rJuVR{9 zU~V`0!bhXceg+MUKn+tipE9mtL{iB%c|u7FP#4$aIiezy-=&BkbZ=vv98h1fxxjoC zGgJ}CXks*|0Il*XnapJ`1+>y_@&itmNkL+pV;s_$kZcCKaZ-HUW(VhIY*2SY44*fR zYqNn@87oZlrXW9LjSxi_8hIuk2rz-W2*MYeJVBgoa#bMQ8$b&tJ2*#8_Tl2&Y!Z5e zZS#c~17yRXA+?JIDAC0@c}v<7Bqt*LdMU*KJzzE!m@rNjsLGo>!Psi@1_!pu>$EvG z=VW^@VGS%K13-RG$onM(^xl-s`v_;Y}HH?|i_GbU<7WTpr1WfY$N!i`Y{A~!j3h3Iw_cSfal071L; A=l}o! diff --git a/Mp1.yaml b/Mp1.yaml index 0c40543..89d76ee 100644 --- a/Mp1.yaml +++ b/Mp1.yaml @@ -7,7 +7,7 @@ info: name: ETSI Forge copyright notice url: 'https://forge.etsi.org/etsi-forge-copyright-notice.txt' externalDocs: - description: ETSI GS MEC011 Application Enablement API, V1.1.1 + description: 'ETSI GS MEC011 Application Enablement API, V1.1.1' url: 'http://www.etsi.org/deliver/etsi_gs/MEC/001_099/011/01.01.01_60/gs_mec011v010101p.pdf' host: '127.0.0.1:8081' basePath: /exampleAPI/mp1/v1/ @@ -120,13 +120,13 @@ parameters: type: string paths: '/applications/{appInstanceId}/dns_rules': + parameters: + - $ref: '#/parameters/Path.AppInstanceId' get: description: This method retrieves information about all the DNS rules associated with a mobile edge application instance. operationId: ApplicationsDnsRules.GET produces: - application/json - parameters: - - $ref: '#/parameters/Path.AppInstanceId' responses: '200': description: It is used to indicate nonspecific success. The response body contains a representation of the resource. @@ -138,14 +138,14 @@ paths: DnsRule: $ref: '#/definitions/DnsRule' '/applications/{appInstanceId}/dns_rules/{dnsRuleId}': + parameters: + - $ref: '#/parameters/Path.AppInstanceId' + - $ref: '#/parameters/Path.DnsRuleId' get: description: This method retrieves information about a DNS rule associated with a mobile edge application instance. operationId: ApplicationsDnsRule.GET produces: - application/json - parameters: - - $ref: '#/parameters/Path.AppInstanceId' - - $ref: '#/parameters/Path.DnsRuleId' responses: '200': description: It is used to indicate nonspecific success. The response body contains a representation of the resource. @@ -161,8 +161,6 @@ paths: - application/json parameters: - $ref: '#/parameters/Body.DnsRule' - - $ref: '#/parameters/Path.AppInstanceId' - - $ref: '#/parameters/Path.DnsRuleId' responses: '200': description: It is used to indicate nonspecific success. The response body contains a representation of the resource. @@ -172,13 +170,13 @@ paths: DnsRule: $ref: '#/definitions/DnsRule' '/applications/{appInstanceId}/subscriptions': + parameters: + - $ref: '#/parameters/Path.AppInstanceId' get: description: 'The GET method may be used to request information about all subscriptions for this requestor. Upon success, the response contains entity body with all the subscriptions for the requestor.' operationId: ApplicationsSubscriptions.GET produces: - application/json - parameters: - - $ref: '#/parameters/Path.AppInstanceId' responses: '200': description: 'Upon success, a response body containing the list of links to the requested subscriptions is returned.' @@ -193,7 +191,6 @@ paths: produces: - application/json parameters: - - $ref: '#/parameters/Path.AppInstanceId' - $ref: '#/parameters/Body.AppTerminationNotificationSubscription' responses: '200': @@ -204,15 +201,15 @@ paths: AppTerminationNotificationSubscription: $ref: '#/definitions/AppTerminationNotificationSubscription.Response' '/applications/{appInstanceId}/subscriptions/{subscriptionType}/{subscriptionId}': + parameters: + - $ref: '#/parameters/Path.AppInstanceId' + - $ref: '#/parameters/Path.SubscriptionType' + - $ref: '#/parameters/Path.SubscriptionId' get: description: 'The GET method requests information about a subscription for this requestor. Upon success, the response contains entity body with the subscription for the requestor.' operationId: ApplicationsSubscription.GET produces: - application/json - parameters: - - $ref: '#/parameters/Path.AppInstanceId' - - $ref: '#/parameters/Path.SubscriptionType' - - $ref: '#/parameters/Path.SubscriptionId' responses: '200': description: 'Upon success, a response body containing the requested subscription is returned.' @@ -230,13 +227,13 @@ paths: '204': description: No Content '/applications/{appInstanceId}/traffic_rules': + parameters: + - $ref: '#/parameters/Path.AppInstanceId' get: description: This method retrieves information about all the traffic rules associated with a mobile edge application instance. operationId: ApplicationsTrafficRules.GET produces: - application/json - parameters: - - $ref: '#/parameters/Path.AppInstanceId' responses: '200': description: It is used to indicate nonspecific success. The response body contains a representation of the resource. @@ -248,14 +245,14 @@ paths: TrafficRule: $ref: '#/definitions/TrafficRule' '/applications/{appInstanceId}/traffic_rules/{trafficRuleId}': + parameters: + - $ref: '#/parameters/Path.AppInstanceId' + - $ref: '#/parameters/Path.TrafficRuleId' get: description: This method retrieves information about all the traffic rules associated with a mobile edge application instance. operationId: ApplicationsTrafficRule.GET produces: - application/json - parameters: - - $ref: '#/parameters/Path.AppInstanceId' - - $ref: '#/parameters/Path.TrafficRuleId' responses: '200': description: It is used to indicate nonspecific success. The response body contains a representation of the resource. @@ -271,8 +268,6 @@ paths: - application/json parameters: - $ref: '#/parameters/Body.TrafficRule' - - $ref: '#/parameters/Path.AppInstanceId' - - $ref: '#/parameters/Path.TrafficRuleId' responses: '200': description: 'Upon success, a response body containing data type describing the updated TrafficRule is returned.' @@ -317,13 +312,13 @@ paths: ServiceInfo: $ref: '#/definitions/ServiceInfo' '/services/{serviceId}': + parameters: + - $ref: '#/parameters/Path.ServiceId' get: description: This method retrieves information about a meService resource. This method is typically used in "service availability query" procedure operationId: ServicesServiceId.GET produces: - application/json - parameters: - - $ref: '#/parameters/Path.ServiceId' responses: '200': description: It is used to indicate nonspecific success. The response body contains a representation of the resource. @@ -369,7 +364,6 @@ paths: produces: - application/json parameters: - - $ref: '#/parameters/Path.ServiceId' - $ref: '#/parameters/Body.ServiceInfo' responses: '200': @@ -739,7 +733,7 @@ definitions: type: string format: uri rel: - description: The values are as defined in the ÔÇ£subscriptionTypeÔÇØ attribute for each different Mp1 event subscription data type. + description: The values are as defined in the "subscriptionType" attribute for each different Mp1 event subscription data type. type: string Mp1SubscriptionLinkList: description: This type represents a list of links related to currently existing subscriptions for a mobile edge application instance. This information is returned when sending a request to receive current subscriptions. @@ -852,7 +846,7 @@ definitions: - INACTIVE example: ACTIVE ServiceInfo.TransportId: - description: 'Identifier of the platform-provided transport to be used by the service. Valid identifiers may be obtained using the ÔÇ£Transport information queryÔÇØ procedure. May be present in POST requests to signal the use of a platform-provided transport for the service, and shall be absent otherwise.' + description: 'Identifier of the platform-provided transport to be used by the service. Valid identifiers may be obtained using the "Transport information query" procedure. May be present in POST requests to signal the use of a platform-provided transport for the service, and shall be absent otherwise.' type: string example: Rest1 ServiceInfo.Version: diff --git a/definitions/Mp1SubscriptionLinkList.Subscription.yaml b/definitions/Mp1SubscriptionLinkList.Subscription.yaml index 1938e78..533fd3e 100644 --- a/definitions/Mp1SubscriptionLinkList.Subscription.yaml +++ b/definitions/Mp1SubscriptionLinkList.Subscription.yaml @@ -9,6 +9,6 @@ properties: type: string format: uri rel: - description: The values are as defined in the “subscriptionType” attribute for each different Mp1 event subscription data type. + description: The values are as defined in the "subscriptionType" attribute for each different Mp1 event subscription data type. type: string diff --git a/definitions/ServiceInfo.TransportId.yaml b/definitions/ServiceInfo.TransportId.yaml index efdc282..327bcb6 100644 --- a/definitions/ServiceInfo.TransportId.yaml +++ b/definitions/ServiceInfo.TransportId.yaml @@ -1,3 +1,3 @@ -description: Identifier of the platform-provided transport to be used by the service. Valid identifiers may be obtained using the “Transport information query” procedure. May be present in POST requests to signal the use of a platform-provided transport for the service, and shall be absent otherwise. +description: Identifier of the platform-provided transport to be used by the service. Valid identifiers may be obtained using the "Transport information query" procedure. May be present in POST requests to signal the use of a platform-provided transport for the service, and shall be absent otherwise. type: string example: Rest1 \ No newline at end of file diff --git a/paths/ApplicationsDnsRule.GET.yaml b/paths/ApplicationsDnsRule.GET.yaml index 4abc112..a2d2346 100644 --- a/paths/ApplicationsDnsRule.GET.yaml +++ b/paths/ApplicationsDnsRule.GET.yaml @@ -2,9 +2,6 @@ description: This method retrieves information about a DNS rule associated with operationId: ApplicationsDnsRule.GET produces: - application/json -parameters: -- $ref: '#/parameters/Path.AppInstanceId' -- $ref: '#/parameters/Path.DnsRuleId' responses: 200: diff --git a/paths/ApplicationsDnsRule.PUT.yaml b/paths/ApplicationsDnsRule.PUT.yaml index acec9bb..00542f7 100644 --- a/paths/ApplicationsDnsRule.PUT.yaml +++ b/paths/ApplicationsDnsRule.PUT.yaml @@ -4,8 +4,6 @@ produces: - application/json parameters: - $ref: '#/parameters/Body.DnsRule' -- $ref: '#/parameters/Path.AppInstanceId' -- $ref: '#/parameters/Path.DnsRuleId' responses: 200: diff --git a/paths/ApplicationsDnsRule.yaml b/paths/ApplicationsDnsRule.yaml index ad8072b..6264c01 100644 --- a/paths/ApplicationsDnsRule.yaml +++ b/paths/ApplicationsDnsRule.yaml @@ -1,3 +1,7 @@ +parameters: +- $ref: '#/parameters/Path.AppInstanceId' +- $ref: '#/parameters/Path.DnsRuleId' + get: $ref: ./ApplicationsDnsRule.GET.yaml diff --git a/paths/ApplicationsDnsRules.GET.yaml b/paths/ApplicationsDnsRules.GET.yaml index d1c307f..6948dae 100644 --- a/paths/ApplicationsDnsRules.GET.yaml +++ b/paths/ApplicationsDnsRules.GET.yaml @@ -2,8 +2,6 @@ description: This method retrieves information about all the DNS rules associate operationId: ApplicationsDnsRules.GET produces: - application/json -parameters: -- $ref: '#/parameters/Path.AppInstanceId' responses: 200: diff --git a/paths/ApplicationsDnsRules.yaml b/paths/ApplicationsDnsRules.yaml index 1e9aa76..4994f4c 100644 --- a/paths/ApplicationsDnsRules.yaml +++ b/paths/ApplicationsDnsRules.yaml @@ -1,2 +1,5 @@ +parameters: +- $ref: '#/parameters/Path.AppInstanceId' + get: $ref: ./ApplicationsDnsRules.GET.yaml \ No newline at end of file diff --git a/paths/ApplicationsSubscription.GET.yaml b/paths/ApplicationsSubscription.GET.yaml index 7831785..05305b4 100644 --- a/paths/ApplicationsSubscription.GET.yaml +++ b/paths/ApplicationsSubscription.GET.yaml @@ -2,10 +2,6 @@ description: The GET method requests information about a subscription for this r operationId: ApplicationsSubscription.GET produces: - application/json -parameters: -- $ref: '#/parameters/Path.AppInstanceId' -- $ref: '#/parameters/Path.SubscriptionType' -- $ref: '#/parameters/Path.SubscriptionId' responses: 200: diff --git a/paths/ApplicationsSubscription.yaml b/paths/ApplicationsSubscription.yaml index c5bd626..c2635fb 100644 --- a/paths/ApplicationsSubscription.yaml +++ b/paths/ApplicationsSubscription.yaml @@ -1,3 +1,8 @@ +parameters: +- $ref: '#/parameters/Path.AppInstanceId' +- $ref: '#/parameters/Path.SubscriptionType' +- $ref: '#/parameters/Path.SubscriptionId' + get: $ref: ./ApplicationsSubscription.GET.yaml diff --git a/paths/ApplicationsSubscriptions.GET.yaml b/paths/ApplicationsSubscriptions.GET.yaml index 60af88b..4f2e3f0 100644 --- a/paths/ApplicationsSubscriptions.GET.yaml +++ b/paths/ApplicationsSubscriptions.GET.yaml @@ -2,8 +2,6 @@ description: The GET method may be used to request information about all subscri operationId: ApplicationsSubscriptions.GET produces: - application/json -parameters: -- $ref: '#/parameters/Path.AppInstanceId' responses: 200: diff --git a/paths/ApplicationsSubscriptions.POST.yaml b/paths/ApplicationsSubscriptions.POST.yaml index 5b50776..5d9e8ee 100644 --- a/paths/ApplicationsSubscriptions.POST.yaml +++ b/paths/ApplicationsSubscriptions.POST.yaml @@ -3,7 +3,6 @@ operationId: ApplicationsSubscriptions.POST produces: - application/json parameters: -- $ref: '#/parameters/Path.AppInstanceId' - $ref: '#/parameters/Body.AppTerminationNotificationSubscription' # The alternative request #- $ref: '#/parameters/Body.SerAvailabilityNotificationSubscription' diff --git a/paths/ApplicationsSubscriptions.yaml b/paths/ApplicationsSubscriptions.yaml index fbf438b..5750586 100644 --- a/paths/ApplicationsSubscriptions.yaml +++ b/paths/ApplicationsSubscriptions.yaml @@ -1,3 +1,6 @@ +parameters: +- $ref: '#/parameters/Path.AppInstanceId' + get: $ref: ./ApplicationsSubscriptions.GET.yaml diff --git a/paths/ApplicationsTrafficRule.GET.yaml b/paths/ApplicationsTrafficRule.GET.yaml index ac8dfb0..f54dfa7 100644 --- a/paths/ApplicationsTrafficRule.GET.yaml +++ b/paths/ApplicationsTrafficRule.GET.yaml @@ -2,9 +2,6 @@ description: This method retrieves information about all the traffic rules assoc operationId: ApplicationsTrafficRule.GET produces: - application/json -parameters: -- $ref: '#/parameters/Path.AppInstanceId' -- $ref: '#/parameters/Path.TrafficRuleId' responses: 200: diff --git a/paths/ApplicationsTrafficRule.PUT.yaml b/paths/ApplicationsTrafficRule.PUT.yaml index 6fd8177..77da520 100644 --- a/paths/ApplicationsTrafficRule.PUT.yaml +++ b/paths/ApplicationsTrafficRule.PUT.yaml @@ -4,8 +4,6 @@ produces: - application/json parameters: - $ref: '#/parameters/Body.TrafficRule' -- $ref: '#/parameters/Path.AppInstanceId' -- $ref: '#/parameters/Path.TrafficRuleId' responses: 200: diff --git a/paths/ApplicationsTrafficRule.yaml b/paths/ApplicationsTrafficRule.yaml index a4930c5..c82177d 100644 --- a/paths/ApplicationsTrafficRule.yaml +++ b/paths/ApplicationsTrafficRule.yaml @@ -1,3 +1,7 @@ +parameters: +- $ref: '#/parameters/Path.AppInstanceId' +- $ref: '#/parameters/Path.TrafficRuleId' + get: $ref: ./ApplicationsTrafficRule.GET.yaml diff --git a/paths/ApplicationsTrafficRules.GET.yaml b/paths/ApplicationsTrafficRules.GET.yaml index 304f579..4b8432b 100644 --- a/paths/ApplicationsTrafficRules.GET.yaml +++ b/paths/ApplicationsTrafficRules.GET.yaml @@ -2,8 +2,6 @@ description: This method retrieves information about all the traffic rules assoc operationId: ApplicationsTrafficRules.GET produces: - application/json -parameters: -- $ref: '#/parameters/Path.AppInstanceId' responses: 200: diff --git a/paths/ApplicationsTrafficRules.yaml b/paths/ApplicationsTrafficRules.yaml index 9faf03e..880de16 100644 --- a/paths/ApplicationsTrafficRules.yaml +++ b/paths/ApplicationsTrafficRules.yaml @@ -1,2 +1,5 @@ +parameters: +- $ref: '#/parameters/Path.AppInstanceId' + get: $ref: ./ApplicationsTrafficRules.GET.yaml \ No newline at end of file diff --git a/paths/ServicesServiceId.GET.yaml b/paths/ServicesServiceId.GET.yaml index c06704a..57a60d8 100644 --- a/paths/ServicesServiceId.GET.yaml +++ b/paths/ServicesServiceId.GET.yaml @@ -2,8 +2,7 @@ description: This method retrieves information about a meService resource. This operationId: ServicesServiceId.GET produces: - application/json -parameters: -- $ref: '#/parameters/Path.ServiceId' + responses: 200: description: It is used to indicate nonspecific success. The response body contains a representation of the resource. diff --git a/paths/ServicesServiceId.PUT.yaml b/paths/ServicesServiceId.PUT.yaml index 99c2ca4..0b354ac 100644 --- a/paths/ServicesServiceId.PUT.yaml +++ b/paths/ServicesServiceId.PUT.yaml @@ -3,7 +3,6 @@ operationId: ServicesServiceId.PUT produces: - application/json parameters: -- $ref: '#/parameters/Path.ServiceId' - $ref: '#/parameters/Body.ServiceInfo' responses: diff --git a/paths/ServicesServiceId.yaml b/paths/ServicesServiceId.yaml index d43e55d..323eb2a 100644 --- a/paths/ServicesServiceId.yaml +++ b/paths/ServicesServiceId.yaml @@ -1,3 +1,6 @@ +parameters: +- $ref: '#/parameters/Path.ServiceId' + get: $ref: ./ServicesServiceId.GET.yaml -- GitLab