Skip to content

Commit

Permalink
api: Drop owner_token validation for parse gateway qr response
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlad Vitan committed Sep 10, 2024
1 parent 76ed694 commit 0e6a9fc
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 86 deletions.
3 changes: 1 addition & 2 deletions api/ttn/lorawan/v3/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10563,7 +10563,7 @@ The Pba service allows clients to manage peering through Packet Broker.

| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| `format_id` | [`string`](#string) | | Identifier of the format used to successfully parse the QR code data. |
| `format_id` | [`string`](#string) | | Identifier of the format used to parse the QR code data. |
| `gateway_eui` | [`bytes`](#bytes) | | |
| `owner_token` | [`string`](#string) | | |

Expand All @@ -10572,7 +10572,6 @@ The Pba service allows clients to manage peering through Packet Broker.
| Field | Validations |
| ----- | ----------- |
| `gateway_eui` | <p>`bytes.len`: `8`</p> |
| `owner_token` | <p>`string.pattern`: `^[A-Z0-9]{1,32}$`</p> |

### <a name="ttn.lorawan.v3.QRCodeFormat">Message `QRCodeFormat`</a>

Expand Down
2 changes: 1 addition & 1 deletion api/ttn/lorawan/v3/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -28058,7 +28058,7 @@
"properties": {
"format_id": {
"type": "string",
"description": "Identifier of the format used to successfully parse the QR code data."
"description": "Identifier of the format used to parse the QR code data."
},
"gateway_eui": {
"type": "string",
Expand Down
4 changes: 2 additions & 2 deletions api/ttn/lorawan/v3/qrcodegenerator.proto
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ message ParseGatewayQRCodeRequest {
}

message ParseGatewayQRCodeResponse {
// Identifier of the format used to successfully parse the QR code data.
// Identifier of the format used to parse the QR code data.
string format_id = 1;
bytes gateway_eui = 2 [
(validate.rules).bytes = {
Expand All @@ -164,7 +164,7 @@ message ParseGatewayQRCodeResponse {
example: "\"70B3D57ED000ABCD\""
}
];
string owner_token = 3 [(validate.rules).string.pattern = "^[A-Z0-9]{1,32}$"];
string owner_token = 3;
}

// The GatewayQRCodeGenerator service provides functionality to generate and parse QR codes for gateways.
Expand Down
121 changes: 60 additions & 61 deletions pkg/ttnpb/qrcodegenerator.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 1 addition & 10 deletions pkg/ttnpb/qrcodegenerator.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 2 additions & 10 deletions sdk/js/generated/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -48326,7 +48326,7 @@
"fields": [
{
"name": "format_id",
"description": "Identifier of the format used to successfully parse the QR code data.",
"description": "Identifier of the format used to parse the QR code data.",
"label": "",
"type": "string",
"longType": "string",
Expand Down Expand Up @@ -48366,15 +48366,7 @@
"ismap": false,
"isoneof": false,
"oneofdecl": "",
"defaultValue": "",
"options": {
"validate.rules": [
{
"name": "string.pattern",
"value": "^[A-Z0-9]{1,32}$"
}
]
}
"defaultValue": ""
}
]
},
Expand Down

0 comments on commit 0e6a9fc

Please sign in to comment.