Skip to content

Commit

Permalink
test: add $ref variant to oneOf property test
Browse files Browse the repository at this point in the history
  • Loading branch information
giovanniberti committed Aug 9, 2023
1 parent 6881631 commit 6dc873c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions __mocks__/openapi_v3/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ components:
properties:
bar:
type: string
- $ref: "#/components/schemas/Person"
AllOfWithOneElementTest:
description: test if we can use allOf with just one element inside
allOf:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2275,6 +2275,7 @@ exports[`Openapi V3 |> gen-api-models should generate an object with a union pro
/* eslint-disable */

import * as t from \\"io-ts\\";
import { Person } from \\"./Person\\";

/**
* test if we can use \`oneOf\` as an object property
Expand Down Expand Up @@ -2311,7 +2312,7 @@ export const OneOfPropertyTestField2 = t.intersection(
export type OneOfPropertyTestField2 = t.TypeOf<typeof OneOfPropertyTestField2>;

export const OneOfPropertyTestField = t.union(
[OneOfPropertyTestField1, OneOfPropertyTestField2],
[OneOfPropertyTestField1, OneOfPropertyTestField2, Person],
\\"OneOfPropertyTestField\\"
);

Expand Down

0 comments on commit 6dc873c

Please sign in to comment.