Skip to content

Commit

Permalink
fix pipeline issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ellabrmicrosoft committed Dec 13, 2023
1 parent 1a151f4 commit 8e8f84a
Show file tree
Hide file tree
Showing 24 changed files with 101 additions and 312 deletions.
1 change: 1 addition & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ aods
aosm
apac
apacheavro
apcgatewayapi
api's
apim
apimanagement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ alias ServiceTraits = NoRepeatableRequests &
SupportsClientRequestId &
RequestHeadersTrait<ApcGatewayIdHeader>;

alias Operations = Azure.Core.ResourceOperations<ServiceTraits, ApcErrorResponse>;
alias Operations = Azure.Core.ResourceOperations<
ServiceTraits,
ApcErrorResponse
>;

@doc("Header to identify APC Gateway resource.")
model ApcGatewayIdHeader {
Expand All @@ -29,6 +32,7 @@ model ApcGatewayIdHeader {
model NetworkIdentifier {
@doc("The type of identifier for the network. one of: 'IPv4', 'IPv6', 'NetworkCode'")
identifierType: string;

/**
The network identifier in a format matching the type above:
- IPv4 of a device in dotted-quad form 1.2.3.4.
Expand All @@ -38,25 +42,24 @@ model NetworkIdentifier {
identifier: string;
}

@doc("The phone number of the device to be identified.")
model PhoneNumberModel
{
@doc("Phone number in E.164 format (starting with country code), and optionally prefixed with '+'")
@pattern("^\\+?[0-9]{5,15}$")
phoneNumber?: string;
}
@doc("The phone number of the device to be identified.")
model PhoneNumberModel {
@doc("Phone number in E.164 format (starting with country code), and optionally prefixed with '+'")
@pattern("^\\+?[0-9]{5,15}$")
phoneNumber?: string;
}

@error
@doc("A custom error type for APC.")
model ApcErrorResponse {
@doc("The numeric error code.")
@doc("The numerical error status eg 500, 404")
status: int32;

@doc("The error code")
code: string;

@doc("The detailed error message.")
errorMessage: string;
message: string;

@doc("The consent URL in case of a consent failure")
consentUrl?: url;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ interface LocationInterface {

/// Endpoints

@resource("Location")
@resource("Apis")
@doc("Static endpoint to access Location API")
model LocationEndpoint {
@key("action")
@key
@doc("Static endpoint")
@visibility("read")
action: "";
location: "Location";
}

/// Request models

@doc("Request to verify Location")
model LocationVerifyRequest {
@doc("Network to query for this device, or device information to enable network routing.")
@doc("Network to query for this device, or device information to enable network routing.")
networkIdentifier: NetworkIdentifier;

@doc("Latitude of location to be verified")
Expand All @@ -52,7 +52,7 @@ model LocationVerifyRequest {
accuracy: int32;

@doc("The device to find the location for.")
locationDevice: LocationDevice
locationDevice: LocationDevice;
}

/// Response models
Expand All @@ -68,29 +68,29 @@ model LocationVerifyResponse {
model LocationDevice {
@doc("External identifier or network access identifier of the device")
networkAccessIdentifier?: string;

...PhoneNumberModel;

@doc ("IPv4 address and port of the device")
@doc("IPv4 address and port of the device")
ipv4Address?: Ipv4Address;

@doc ("IPv6 address and port of the device")
@doc("IPv6 address and port of the device")
ipv6Address?: Ipv6Address;
}

@doc ("IPv4 device indicator")
@doc("IPv4 device indicator")
model Ipv4Address {
/** IPv4 address may be specified in form <address/mask> as:
- address - an IPv4 number in dotted-quad form 1.2.3.4. Only this exact IP number will match the flow control rule.
- address/mask - an IP number as above with a mask width of the form 1.2.3.4/24.
In this case, all IP numbers from 1.2.3.0 to 1.2.3.255 will match. The bit width MUST be valid for the IP version. */
ipv4: string;

@doc ("User equipment port.")
@doc("User equipment port.")
port: int32;
}

@doc ("IPv6 device indicator")
@doc("IPv6 device indicator")
model Ipv6Address {
/** IPv6 address, following IETF 5952 format, may be specified in form <address/mask> as:
- address - The /128 subnet is optional for single addresses:
Expand All @@ -101,6 +101,6 @@ model Ipv6Address {
- 2001:db8:85a3:8d3::/64 */
ipv6: string;

@doc ("User equipment port.")
@doc("User equipment port.")
port: int32;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,21 @@ interface Networks {

/// Endpoints

@resource("Network")
@resource("Apis")
@doc("Static endpoint to access Network API")
model NetworkRetrieveEndpoint {
@key("action")
@key
@doc("Static endpoint")
@visibility("read")
action: "";
network: "Network";
}

/// Common models
@doc("The device for which to find the network.")
model DeviceNetworkIdentifier {
@doc("The type of device identifier given: 'IPv4' or 'IPv6'.")
identifierType: string;

/** The device identifier in a format matching the type above:
- IPv4 in dotted-quad format.
- IPV6 in IETF 5952 format.*/
Expand All @@ -46,4 +47,4 @@ model Network {
@pattern("[a-z0-9-]+$")
@doc("The identifier for the network. This can be used as the networkIdentifier for the service APIs.")
networkCode: string;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ namespace Azure.ProgrammableConnectivity;
of the entire flow (the 200 response) is included in this document.
""")
interface NumberInterface {

@doc("Verifies the phone number (MSISDN) associated with a device.")
verify is Operations.ResourceAction<
NumberEndpoint,
Expand All @@ -41,13 +40,13 @@ interface NumberInterface {

/// Endpoints

@resource("Number")
@resource("Apis")
@doc("Static endpoint to access Number API")
model NumberEndpoint {
@key("action")
@key
@doc("Static endpoint")
@visibility("read")
action: "";
number: "Number";
}

/// Request models
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ interface SimSwapInterface {

/// Endpoints

@resource("SimSwap")
@doc("Static endpoint to access SimSwap API")
@resource("device")
@doc("Static endpoint to access Location API")
model SimSwapEndpoint {
@key("action")
@key
@doc("Static endpoint")
@visibility("read")
action: "";
simSwap: "SimSwap";
}

/// Request models
Expand Down Expand Up @@ -80,4 +80,3 @@ model SimSwapDevice {
@pattern("^\\+?[0-9]{5,15}$")
phoneNumber: string;
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"operationId": "LocationInterface_Verify",
"parameters": {
"api-version": "2023-11-14-preview",
"x-ms-client-request-id": "peoejiqirqp",
"x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000",
"apc-gateway-id": "zdgrzzaxlodrvewbksn",
"body": {
"networkIdentifier": {
Expand Down Expand Up @@ -32,28 +32,6 @@
"body": {
"verified": true
}
},
"403": {
"body": {
"status": 403,
"message": "There user has not consented",
"code": "CONSENT_URL_ERROR",
"consentUrl": "https://operator.consent_url.com"
}
},
"404":{
"body":{
"status": 404,
"message": "There is no Operator configured for this network.",
"code": "OPERATOR_NOT_FOUND"
}
},
"500":{
"body":{
"status": 500,
"message": "INTERNAL_ERROR",
"code": "Internal error occurred"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"operationId": "Networks_Retrieve",
"parameters": {
"api-version": "2023-11-14-preview",
"x-ms-client-request-id": "peoejiqirqp",
"x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000",
"apc-gateway-id": "zdgrzzaxlodrvewbksn",
"body": {
"identifierType": "ipv6",
Expand All @@ -15,11 +15,6 @@
"body": {
"networkCode": "Example_Network"
}
},
"404": {
"status": 404,
"message": "There is no Operator configured for this IP address.",
"code": "OPERATOR_NOT_FOUND"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,18 @@
"operationId": "NumberInterface_Retrieve",
"parameters": {
"api-version": "2023-11-14-preview",
"x-ms-client-request-id": "peoejiqirqp",
"x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000",
"apc-gateway-id": "zdgrzzaxlodrvewbksn",
"body": {
"identifierType": "ipv6",
"deviceIdentifier": "3001:0da8:75a3:0000:0000:8a2e:0370:7334"
"identifier": "3001:0da8:75a3:0000:0000:8a2e:0370:7334"
}
},
"responses": {
"200": {
"body": {
"phoneNumber": "7570575566"
}
},
"404":{
"body":{
"status": 404,
"message": "There is no Operator configured for this network.",
"code": "OPERATOR_NOT_FOUND"
}
},
"500":{
"body":{
"status": 500,
"message": "INTERNAL_ERROR",
"code": "Internal error occurred"
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"operationId": "NumberInterface_Verify",
"parameters": {
"api-version": "2023-11-14-preview",
"x-ms-client-request-id": "peoejiqirqp",
"x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000",
"apc-gateway-id": "zdgrzzaxlodrvewbksn",
"body": {
"networkIdentifier": {
Expand All @@ -19,20 +19,6 @@
"body": {
"verified": true
}
},
"404":{
"body":{
"status": 404,
"message": "There is no Operator configured for this network.",
"code": "OPERATOR_NOT_FOUND"
}
},
"500":{
"body":{
"status": 500,
"message": "INTERNAL_ERROR",
"code": "Internal error occurred"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"operationId": "SimSwapInterface_Retrieve",
"parameters": {
"api-version": "2023-11-14-preview",
"x-ms-client-request-id": "peoejiqirqp",
"x-ms-client-request-id": "123e4567-e89b-12d3-a456-426614174000",
"apc-gateway-id": "zdgrzzaxlodrvewbksn",
"body": {
"phoneNumber": "+61215310263792",
Expand All @@ -18,20 +18,6 @@
"body": {
"date": "2023-12-12T09:01:33.333Z"
}
},
"404":{
"body":{
"status": 404,
"message": "There is no Operator configured for this network.",
"code": "OPERATOR_NOT_FOUND"
}
},
"500":{
"body":{
"status": 500,
"message": "INTERNAL_ERROR",
"code": "Internal error occurred"
}
}
}
}
}
Loading

0 comments on commit 8e8f84a

Please sign in to comment.