Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions search/2016-09-01/swagger/searchservice.json
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,9 @@
},
"name": {
"type": "string",
"externalDocs":{
"url": "https://docs.microsoft.com/rest/api/searchservice/custom-analyzers-in-azure-search#index-attribute-reference"
},
"description": "The name of the analyzer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters."
}
},
Expand Down Expand Up @@ -1285,7 +1288,11 @@
"type": "string"
},
"name": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also put regex rules here with min/max length

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anudeepsharma I have some (IMO) well-grounded objections to regex constraints. Rather than repeat them, I'll direct you to this discussion on an earlier PR.

Regarding min/max constraints, I believe they are valuable for documentation purposes where applicable. These limits are documented in the (hand written) REST API reference, which we now link to from the Swagger spec. However, I would still refrain from adding them to the Swagger until AutoRest supports disabling client-side validation.

"type": "string"
"type": "string",
"externalDocs":{
"url": "https://docs.microsoft.com/rest/api/searchservice/custom-analyzers-in-azure-search#index-attribute-reference"
},
"description": "The name of the tokenizer. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters."
}
},
"required": [
Expand Down Expand Up @@ -1803,7 +1810,11 @@
"type": "string"
},
"name": {
"type": "string"
"type": "string",
"externalDocs":{
"url": "https://docs.microsoft.com/rest/api/searchservice/custom-analyzers-in-azure-search#index-attribute-reference"
},
"description": "The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters."
}
},
"required": [
Expand Down Expand Up @@ -2760,7 +2771,11 @@
"type": "string"
},
"name": {
"type": "string"
"type": "string",
"externalDocs":{
"url": "https://docs.microsoft.com/rest/api/searchservice/custom-analyzers-in-azure-search#index-attribute-reference"
},
"description": "The name of the char filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters."
}
},
"required": [
Expand Down