Commit 145e887
authored
Recursive type aliases [are
broken](https://discord.com/channels/1119368998161752075/1359498024790917231)
in OpenAPI. Use the [Any
Type](https://swagger.io/docs/specification/v3_0/data-models/data-types/#any-type)
to fix them.
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Replaces `anyOf` with `AnyValue` in OpenAPI to fix recursive type
alias handling, updating both code generation and integration tests.
>
> - **Behavior**:
> - Replaces `anyOf: []` with `AnyValue: {}` in `openapi.rs` and
`openapi.yaml` to handle recursive type aliases in OpenAPI.
> - Updates `TypeSpec::AnyValue` in `openapi.rs` to use `HashMap` for
`any_value`.
> - **Code Changes**:
> - Modifies `ToTypeReferenceInTypeDefinition` for
`FieldType::RecursiveTypeAlias` in `openapi.rs` to use `AnyValue`.
> - Updates `TypeSpec` enum in `openapi.rs` to include `AnyValue` with
`HashMap`.
> - **Tests**:
> - Updates `openapi.yaml` in `baml_client` integration tests to reflect
changes from `anyOf` to `AnyValue` for various paths.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup>
for 8da98aa. It will automatically
update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->
1 parent bd449f0 commit 145e887
2 files changed
Lines changed: 21 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
561 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
562 | 564 | | |
563 | 565 | | |
564 | 566 | | |
| |||
682 | 684 | | |
683 | 685 | | |
684 | 686 | | |
685 | | - | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
686 | 690 | | |
687 | 691 | | |
688 | 692 | | |
| |||
732 | 736 | | |
733 | 737 | | |
734 | 738 | | |
| 739 | + | |
| 740 | + | |
735 | 741 | | |
736 | | - | |
737 | | - | |
| 742 | + | |
| 743 | + | |
738 | 744 | | |
739 | 745 | | |
740 | 746 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments