Skip to content

Commit b70b907

Browse files
幾田純平claude
authored andcommitted
fix: add regex pattern validation to sn field to reject non-alphanumeric characters (Closes #3)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a61a3a4 commit b70b907

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

openapi.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7308,6 +7308,7 @@
73087308
"sn": {
73097309
"type": "string",
73107310
"nullable": true,
7311+
"pattern": "^[a-zA-Z0-9_-]+$",
73117312
"description": "Serial number of the device."
73127313
},
73137314
"display_name": {
@@ -7447,6 +7448,7 @@
74477448
},
74487449
"sn": {
74497450
"type": "string",
7451+
"pattern": "^[a-zA-Z0-9_-]+$",
74507452
"description": "Serial number of the device. This field is required when creating a device."
74517453
}
74527454
}
@@ -7469,7 +7471,8 @@
74697471
},
74707472
"sn": {
74717473
"type": "string",
7472-
"nullable": true
7474+
"nullable": true,
7475+
"pattern": "^[a-zA-Z0-9_-]+$"
74737476
},
74747477
"display_name": {
74757478
"type": "string",

openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5776,6 +5776,7 @@ components:
57765776
sn:
57775777
type: string
57785778
nullable: true
5779+
pattern: ^[a-zA-Z0-9_-]+$
57795780
description: Serial number of the device.
57805781
display_name:
57815782
type: string
@@ -5940,6 +5941,7 @@ components:
59405941
'
59415942
sn:
59425943
type: string
5944+
pattern: ^[a-zA-Z0-9_-]+$
59435945
description: Serial number of the device. This field is required when creating
59445946
a device.
59455947
DeviceUpdate:
@@ -5962,6 +5964,7 @@ components:
59625964
sn:
59635965
type: string
59645966
nullable: true
5967+
pattern: ^[a-zA-Z0-9_-]+$
59655968
display_name:
59665969
type: string
59675970
nullable: true

0 commit comments

Comments
 (0)