Commit e9551f33 authored by Elian Kraja's avatar Elian Kraja
Browse files

First draft

parent 1e353498
#!/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
This diff is collapsed.
This diff is collapsed.
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
import public "models/adjacent_app_info_subscription_filter_criteria.proto";
import public "models/adjacent_app_info_subscription_links.proto";
import public "models/time_stamp.proto";
message AdjacentAppInfoSubscription {
AdjacentAppInfoSubscriptionLinks Underscorelinks = 1;
// URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service. This shall be included both in the request and in response.
string callbackReference = 2;
TimeStamp expiryDeadline = 3;
AdjacentAppInfoSubscriptionFilterCriteria filterCriteria = 4;
// Shall be set to \"AdjacentAppInfoSubscription\".
enum subscriptionType {
ADJACENTAPPINFOSUBSCRIPTION = 0;
}
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
message AdjacentAppInfoSubscriptionFilterCriteria {
string appInstanceId = 1;
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
import public "models/link_type.proto";
message AdjacentAppInfoSubscriptionLinks {
LinkType self = 1;
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
import public "models/communication_interface.proto";
import public "models/mec_host_information.proto";
message AdjacentAppInstanceInfo {
// Identifier of the application descriptor.
string appDId = 1;
// It specifies the communication interface of application instance.
repeated CommunicationInterface appInstanceCommLink = 2;
// Identifier of the application instance.
string appInstanceId = 3;
MECHostInformation mecHostInformation = 4;
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
//This attribute provides an option for the application instance (server) to communicate with the application client before relocating this application instance to another MEC host. The applicable values of this attribute are: 1 = APP_MOBILITY_NOT_ALLOWED 2 = APP_MOBILITY_WITH_CONFIRMATION 3 = APP_MOBILITY_WITHOUT_CONFIRMATION.
message AppMobilityServiceLevel {
enum TypeEnum {
_1 = 0;
_2 = 1;
_3 = 2;
}
TypeEnum type = 1;
// Value for the identifier.
string value = 2;
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
message AssociateId {
// Numeric value (0-255) corresponding to specified type of identifier as following: <p>0 = reserved. <p>1 = UE_IPv4_ADDRESS. <p>2 = UE_IPV6_ADDRESS. <p>3 = NATED_IP_ADDRESS. <p>4 = GTP_TEID.
enum TypeEnum {
_0 = 0;
_1 = 1;
_2 = 2;
_3 = 3;
_4 = 4;
}
TypeEnum type = 1;
// Value for the identifier.
string value = 2;
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
import public "models/communication_interface_ip_addresses.proto";
message CommunicationInterface {
repeated CommunicationInterfaceIpAddresses ipAddresses = 1;
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
message CommunicationInterfaceIpAddresses {
string host = 1;
int32 port = 2;
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
//If present, it represents the state of transferring the user context to another application instance. The applicable values of this attribute are: 0 = NOT_TRANSFERRED (default value) 1 = USER_CONTEXT_TRANSFER_COMPLETED In the initial application mobility registration, this attribute shall be set to the default value.
message ContextTransferState{
enum TypeEnum {
_0 = 0;
_1 = 1;
}
TypeEnum type = 1;
// Value for the identifier.
string value = 2;
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
message LinkType {
// The URI referring to the subscription.
string href = 1;
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
import "google/protobuf/any.proto";
message MECHostInformation {
// Human-readable name of MEC host.
string hostName = 1;
// 'This data type represents a list of key-value pairs. The order of the pairs in the list is not significant. In JSON, a set of key-value pairs is represented as an object. It shall comply with the provisions defined in clause 4 of IETF RFC 8259'
map <string, google.protobuf.Any> hostId = 2;
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
import public "models/mobility_procedure_subscription_filter_criteria.proto";
import public "models/mobility_procedure_subscription_links.proto";
import public "models/time_stamp.proto";
message MobilityProcedureSubscription {
MobilityProcedureSubscriptionLinks Underscorelinks = 1;
// URI selected by the service consumer to receive notifications on the subscribed Application Mobility Service. This shall be included both in the request and in response.
string callbackReference = 2;
TimeStamp expiryDeadline = 3;
MobilityProcedureSubscriptionFilterCriteria filterCriteria = 4;
// Shall be set to \"MobilityProcedureSubscription\".
enum subscriptionType {
MOBILITYPROCEDURESUBSCRIPTION = 0;
}
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
import public "models/associate_id.proto";
import public "models/mobility_status.proto";
message MobilityProcedureSubscriptionFilterCriteria {
// Identifier of the application instance that registers the application mobility service.
string appInstanceId = 1;
// 0 to N identifiers to associate the information for specific UE(s) and flow(s).
repeated AssociateId associateId = 2;
// In case mobilityStatus is not included in the subscription request, the default value 1 = INTER_HOST_MOBILITY_TRIGGERED shall be used and included in the response.
repeated MobilityStatus mobilityStatus = 3;
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
import public "models/link_type.proto";
message MobilityProcedureSubscriptionLinks {
LinkType self = 1;
}
/*
ETSI GS MEC 021 Application Mobility Service API
ETSI GS MEC 021 Application Mobility Service API described using OpenAPI.
The version of the OpenAPI document: 2.1.1
Generated by OpenAPI Generator: https://openapi-generator.tech
*/
syntax = "proto3";
package mec021;
//In case mobilityStatus is not included in the subscription request, the default value 1 = INTER_HOST_MOBILITY_TRIGGERED shall be used and included in the response. 1 = INTERHOST_MOVEOUT_TRIGGERED. 2 = INTERHOST_MOVEOUT_COMPLETED. 3 = INTERHOST_MOVEOUT_FAILED.
message MobilityStatus{
enum TypeEnum {
_1 = 0;
_2 = 1;
_3 = 2;
}
TypeEnum type = 1;
// Value for the identifier.
string value = 2;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment