feat(samples): add support for proper schema merging (#8910)

This change is specific to JSON Schema 2020-12
and OpenAPI 3.1.0.

Refs #8577
This commit is contained in:
Vladimír Gorej
2023-06-11 15:35:05 +02:00
committed by GitHub
parent ce417d59d2
commit 7bf0dd921b
3 changed files with 87 additions and 118 deletions

View File

@@ -1154,7 +1154,7 @@ describe("sampleFromSchema", () => {
expect(sampleFromSchema(definition)).toEqual(expected)
})
it("should lift items with anyOf", () => {
it("should merge items with anyOf", () => {
const definition = {
type: "array",
anyOf: [
@@ -1172,7 +1172,7 @@ describe("sampleFromSchema", () => {
expect(sampleFromSchema(definition)).toEqual(expected)
})
it("should lift items with oneOf", () => {
it("should merge items with oneOf", () => {
const definition = {
type: "array",
oneOf: [