Skip to content

Commit

Permalink
Add regular expression patterns to method and property identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-r-thorpe committed Apr 26, 2024
1 parent 7b36beb commit abb886a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
10 changes: 8 additions & 2 deletions APIs/ConfigurationAPI.raml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ documentation:
example: !include ../examples/methods-base-get-200.json
type: !include schemas/methods-base.json
/{methodId}:
displayName: 'Invoke Method.'
uriParameters:
methodId:
type: string
pattern: "^[0-9]+m[0-9]+$"
patch:
description: 'Invoke method.'
body:
Expand Down Expand Up @@ -135,7 +138,10 @@ documentation:
example: !include ../examples/properties-base-get-200.json
type: !include schemas/properties-base.json
/{propertyId}:
displayName: 'Attributes of a Property'
uriParameters:
methodId:
type: string
pattern: "^[0-9]+p[0-9]+$"
get:
description: 'Get attributes of a Property'
responses:
Expand Down
3 changes: 2 additions & 1 deletion APIs/schemas/methods-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Describes the Configuration API /rolePaths/{rolePath}/methods base",
"title": "Configuration API /rolePaths/{rolePath}/methods base",
"items": {
"type": "string"
"type": "string",
"pattern": "^[0-9]+m[0-9]+$"
},
"uniqueItems": true
}
3 changes: 2 additions & 1 deletion APIs/schemas/properties-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Describes the Configuration API /rolePaths/{rolePath}/properties base",
"title": "Configuration API /rolePaths/{rolePath}/properties base",
"items": {
"type": "string"
"type": "string",
"pattern": "^[0-9]+p[0-9]+$"
},
"uniqueItems": true
}

0 comments on commit abb886a

Please sign in to comment.