Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Azure Search] Add Search API to data plane Swagger spec #5315

Merged
merged 6 commits into from
Mar 4, 2019

Commits on Mar 1, 2019

  1. [Azure Search] Updating some Swagger descriptions to be more doc-frie…

    …ndly
    
    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.
    brjohnstmsft committed Mar 1, 2019
    Configuration menu
    Copy the full SHA
    96893b9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0b6409f View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2019

  1. Configuration menu
    Copy the full SHA
    8527433 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2019

  1. [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.
    brjohnstmsft committed Mar 4, 2019
    Configuration menu
    Copy the full SHA
    def5742 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3ebff68 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    33bd23c View commit details
    Browse the repository at this point in the history