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

fix: openapi stuff #6454

Merged
merged 9 commits into from
May 30, 2024
Merged

fix: openapi stuff #6454

merged 9 commits into from
May 30, 2024

Commits on May 30, 2024

  1. Configuration menu
    Copy the full SHA
    e257a72 View commit details
    Browse the repository at this point in the history
  2. fix(app): openapi schema generation

    Some tech debt related to dynamic pydantic schemas for invocations became problematic. Including the invocations and results in the event schemas was breaking pydantic's handling of ref schemas. I don't really understand why - I think it's a pydantic bug in a remote edge case that we are hitting.
    
    After many failed attempts I landed on this implementation, which is actually much tidier than what was in there before.
    
    - Create pydantic-enabled types for `AnyInvocation` and `AnyInvocationOutput` and use these in place of the janky dynamic unions. Actually, they are kinda the same, but better encapsulated. Use these in `Graph`, `GraphExecutionState`, `InvocationEventBase` and `InvocationCompleteEvent`.
    - Revise the custom openapi function to work with the new models.
    - Split out the custom openapi function to a separate file. Add a `post_transform` callback so consumers can customize the output schema.
    - Update makefile scripts.
    psychedelicious committed May 30, 2024
    Configuration menu
    Copy the full SHA
    2f9ebde View commit details
    Browse the repository at this point in the history
  3. chore(ui): typegen

    psychedelicious committed May 30, 2024
    Configuration menu
    Copy the full SHA
    7590f30 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5a4d104 View commit details
    Browse the repository at this point in the history
  5. feat(api): sort openapi schemas

    Reduces the constant changes to the frontend client types due to inconsistent ordering of pydantic models.
    psychedelicious committed May 30, 2024
    Configuration menu
    Copy the full SHA
    5beec82 View commit details
    Browse the repository at this point in the history
  6. feat(app): dynamic type adapters for invocations & outputs

    Keep track of whether or not the typeadapter needs to be updated. Allows for dynamic invocation and output unions.
    psychedelicious committed May 30, 2024
    Configuration menu
    Copy the full SHA
    50d3030 View commit details
    Browse the repository at this point in the history
  7. fix(app): add dynamic validator to AnyInvocation & AnyInvocationOutput

    This fixes the tests and slightly changes output types.
    psychedelicious committed May 30, 2024
    Configuration menu
    Copy the full SHA
    ac56ab7 View commit details
    Browse the repository at this point in the history
  8. chore(ui): typegen

    psychedelicious committed May 30, 2024
    Configuration menu
    Copy the full SHA
    7cb32d3 View commit details
    Browse the repository at this point in the history
  9. fix(ui): update types

    psychedelicious committed May 30, 2024
    Configuration menu
    Copy the full SHA
    a983f27 View commit details
    Browse the repository at this point in the history