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

Simplify and openapi-ify /api/program #180

Merged
4 commits merged into from
Nov 16, 2021
Merged

Simplify and openapi-ify /api/program #180

4 commits merged into from
Nov 16, 2021

Commits on Nov 16, 2021

  1. [primer] api: remove error wrapper on 'getProgram'

    This never fails. Let's expose that fact in the API.
    brprice committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    058b266 View commit details
    Browse the repository at this point in the history
  2. First iteration of tree api

    brprice committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    a4f6e74 View commit details
    Browse the repository at this point in the history
  3. Change API to serialize IDs and Names plainly

    i.e. we now have '1' and '"foo"' instead of
    '{unID:1}' and '{unName:"foo"}'
    
    Almost all of this commit is testcase churn because of this change.`
    
    The change to ToJSONKey enables us to output 'Map ID _' from our API
    (whilst having correct OpenAPI3 documentation), since the map will be
    serialized as an object, where the keys are 'show' of the IDs. However,
    we decide to keep our list-based representation, as documented in a
    comment. Note that this only applies to the "new api", and not to the
    serialization test fixtures.
    brprice committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    af584b0 View commit details
    Browse the repository at this point in the history
  4. fix: make viewTree* injective

    We also add regression tests.
    
    [Historical note: this patch series was authored before Gen.Core.Raw
    obtained better coverage. This is the reason the non-injectivity was not
    discovered earlier, and the reason for the reliance on unit tests here.]
    brprice committed Nov 16, 2021
    Configuration menu
    Copy the full SHA
    837f037 View commit details
    Browse the repository at this point in the history