Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Azure Search] Add Search API to data plane Swagger spec (#5315)
* [Azure Search] Updating some Swagger descriptions to be more doc-friendly Sometimes we over-describe things, especially "comma-separated lists" in query string parameters. These are modeled as arrays in Swagger, which are already understood to be comma-separated lists. They are modeled as collections in generated code, so they are decidedly not comma-separated lists in that context. So removing this phrase is a win-win. * [Azure Search] Adding some missing readOnly attributes * Adding Search API to the Azure Search data plane spec * [Azure Search] Use regexes to generate code for server-side paging This change introduces some very hacky regexes to customize the generated code for server-side paging of the GET and POST Search APIs. They work by splitting the generated SearchGet and SearchPost operations in two, so that the portion that operates on a URL and request body can be reused. This workaround is necessary because AutoRest lacks flexibility around paging. The current x-ms-pageable implementation doesn't work for us because it doesn't model additional top-level response properties or continuation POST requests (only nextLink/GET). The only other alternative to this approach besides custom code would have been to try to parse the nextLink URL query string to reconstitute parameters to pass to the generated SearchGet and SearchPost operations. This is unacceptable for Azure Search, since it would exclude custom parameters that can't be modeled in Swagger, like personalization IDs for custom ranking. Neither AutoRest nor apparently Open API support modeling arbitrary query string parameters. Ideally we'll find a pattern common to other data plane APIs so we don't have to hack this with regexes for every target language, but it's good enough for now. * [Azure Search] Rename some client properties for consistency * [Azure Search] Make AutocompleteMode non-nullable
- Loading branch information