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

Describe query parameters in OpenAPI schema #166

Commits on Feb 6, 2020

  1. Describe query parameters in OpenAPI schema

    Remove PEP8 E251/E252 (unexpected spaces around keyword / parameter
    equals) from lint warnings.
    
    Update `page_page` to `page_number` according to
    Materials-Consortia/OPTIMADE#187.
    
    Due to pydantic:
    https://pydantic-docs.helpmanual.io/usage/schema/#unenforced-field-constraints
    the `ge` parameter cannot be used together with a non-standard type,
    e.g. NonnegativeInt. Instead the OpenAPI parameter is set directly, here
    `minimum`.
    
    Regular expressions are added for `response_fields` and `sort` based on
    the regular expressions provided for an `identifier` in the OPTiMaDe
    spec.
    CasperWA committed Feb 6, 2020
    Configuration menu
    Copy the full SHA
    5770c8d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3809927 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9e06105 View commit details
    Browse the repository at this point in the history
  4. Fix minor spelling mistake

    CasperWA committed Feb 6, 2020
    Configuration menu
    Copy the full SHA
    b11623c View commit details
    Browse the repository at this point in the history
  5. Minor fixes and pleasing linting

    Remove unused `_` in validator
    CasperWA committed Feb 6, 2020
    Configuration menu
    Copy the full SHA
    7f8c485 View commit details
    Browse the repository at this point in the history
  6. Update dimension_types schema/model

    Using `IntEnum` and pydantic's `Field` parameters to perform validation
    of the property, `dimension_types` is now represented correctly in the
    OpenAPI schema as well.
    CasperWA committed Feb 6, 2020
    Configuration menu
    Copy the full SHA
    2f41f09 View commit details
    Browse the repository at this point in the history
  7. Use List and Tuple for list of lists - no conlist

    Remove and replace `conlist` with List of Tuples containing the exact
    number of components needed, i.e., List[Tuple[Union[float, None]]] means
    the value MUST be [ [ null ], [ 1.0 ], [ 0 ], ... ].
    The internal "lists" MUST be of length 1, if more types are added in
    Tuple _that_ is the exact allowed length of the internal "lists".
    
    For `lattice_vectors` the outer list has also been constrained via
    pydantic's `Field` using `min_items` and `max_items`.
    
    Some "bad" and "good" test structures have been added to be tested in
    `test_models.py`.
    CasperWA committed Feb 6, 2020
    Configuration menu
    Copy the full SHA
    1693e1b View commit details
    Browse the repository at this point in the history
  8. More descriptive enum names

    shyamd authored and CasperWA committed Feb 6, 2020
    Configuration menu
    Copy the full SHA
    0e7f275 View commit details
    Browse the repository at this point in the history
  9. Use Tuple over List for constrained lists

    Co-authored-by: Shyam Dwaraknath <shyamd@lbl.gov>
    CasperWA and shyamd committed Feb 6, 2020
    Configuration menu
    Copy the full SHA
    d09595b View commit details
    Browse the repository at this point in the history