From d8b470347c26e610a792bf1a99928d28cd879167 Mon Sep 17 00:00:00 2001 From: dsinghvi Date: Mon, 21 Oct 2024 00:53:38 -0400 Subject: [PATCH] bug fix for undiscriminated union and optional implying nullable --- packages/cli/cli/versions.yml | 9 + .../any-auth/type_auth:TokenResponse.json | 9 +- .../type_folder-a/service:Response.json | 18 +- .../audiences/type_folder-b/common:Foo.json | 9 +- .../audiences/type_foo:FilteredType.json | 9 +- .../audiences/type_foo:OptionalString.json | 9 +- .../type_:ImportingA.json | 9 +- .../type_ast:ContainerValue.json | 18 +- .../type_ast:FieldValue.json | 9 +- .../type_ast:ObjectFieldValue.json | 9 +- .../circular-references/type_:ImportingA.json | 9 +- .../type_ast:ContainerValue.json | 18 +- .../type_ast:FieldValue.json | 9 +- .../type_ast:JsonLike.json | 4 +- .../type_folder-a/service:Response.json | 18 +- .../type_folder-b/common:Foo.json | 9 +- .../type_folder-d/service:Response.json | 18 +- .../type_foo:OptionalString.json | 9 +- .../enum/type_:ColorOrOperand.json | 2 +- .../examples/type_:Identifier.json | 2 +- .../__snapshots__/examples/type_:Type.json | 2 +- .../type_commons/types:EventInfo.json | 24 ++- .../examples/type_commons/types:Metadata.json | 24 ++- .../examples/type_types:CastMember.json | 2 +- .../examples/type_types:Directory.json | 60 ++++-- .../examples/type_types:Entity.json | 2 +- .../examples/type_types:ExtendedMovie.json | 18 +- .../examples/type_types:Movie.json | 18 +- .../examples/type_types:Node.json | 75 ++++++-- .../examples/type_types:Response.json | 2 +- .../examples/type_types:ResponseType.json | 2 +- .../examples/type_types:Tree.json | 60 ++++-- .../type_types/object:DoubleOptional.json | 18 +- .../object:NestedObjectWithOptionalField.json | 165 ++++++++++++++--- .../object:NestedObjectWithRequiredField.json | 147 ++++++++++++--- .../object:ObjectWithOptionalField.json | 147 ++++++++++++--- .../type_types/object:OptionalAlias.json | 9 +- .../grpc-proto-exhaustive/type_:Column.json | 22 ++- .../type_:DescribeResponse.json | 57 ++++-- .../type_:FetchResponse.json | 66 +++++-- .../type_:ListElement.json | 9 +- .../type_:ListResponse.json | 71 ++++++-- .../grpc-proto-exhaustive/type_:Metadata.json | 4 +- .../type_:MetadataValue.json | 2 +- .../type_:NamespaceSummary.json | 11 +- .../type_:Pagination.json | 9 +- .../type_:QueryColumn.json | 42 ++++- .../type_:QueryResponse.json | 129 ++++++++++--- .../type_:QueryResult.json | 70 +++++-- .../type_:ScoredColumn.json | 46 ++++- .../type_:UploadResponse.json | 11 +- .../grpc-proto-exhaustive/type_:Usage.json | 11 +- .../grpc-proto/type_:CreateResponse.json | 60 +++++- .../grpc-proto/type_:Metadata.json | 4 +- .../grpc-proto/type_:MetadataValue.json | 2 +- .../grpc-proto/type_:UserModel.json | 51 +++++- .../literal/type_reference:SendRequest.json | 9 +- .../multi-line-docs/type_user:User.json | 9 +- .../type_auth:TokenResponse.json | 9 +- .../type_auth:TokenResponse.json | 9 +- .../type_auth:TokenResponse.json | 9 +- .../__snapshots__/object/type_:Type.json | 20 +- .../objects-with-imports/type_:Node.json | 33 +++- .../objects-with-imports/type_:Tree.json | 48 ++++- .../type_commons/metadata:Metadata.json | 15 +- .../type_file/directory:Directory.json | 60 ++++-- .../pagination/type_:UsernameCursor.json | 9 +- .../pagination/type_:UsernamePage.json | 9 +- ...ListUsersExtendedOptionalListResponse.json | 26 ++- .../type_users:ListUsersExtendedResponse.json | 11 +- ...ype_users:ListUsersPaginationResponse.json | 27 ++- .../pagination/type_users:Page.json | 9 +- .../type_users:UserOptionalListContainer.json | 15 +- .../type_users:UserOptionalListPage.json | 26 ++- .../pagination/type_users:UserPage.json | 11 +- .../pagination/type_users:WithCursor.json | 9 +- .../pagination/type_users:WithPage.json | 9 +- .../type_:OptionalStringResponse.json | 9 +- .../type_service:OptionalWithDocs.json | 9 +- .../type_completions:StreamedCompletion.json | 9 +- .../type_completions:StreamedCompletion.json | 9 +- .../simple-fhir/type_:Account.json | 47 ++++- .../simple-fhir/type_:BaseResource.json | 29 ++- .../__snapshots__/simple-fhir/type_:Memo.json | 38 +++- .../simple-fhir/type_:Patient.json | 29 ++- .../simple-fhir/type_:Practitioner.json | 29 ++- .../simple-fhir/type_:ResourceList.json | 31 +++- .../simple-fhir/type_:Script.json | 29 ++- .../type_dummy:RegularResponse.json | 9 +- .../type_dummy:StreamResponse.json | 9 +- .../streaming/type_dummy:StreamResponse.json | 9 +- ...pe_commons:BinaryTreeNodeAndTreeValue.json | 27 ++- .../type_commons:BinaryTreeNodeValue.json | 18 +- .../trace/type_commons:BinaryTreeValue.json | 27 ++- .../type_commons:DebugKeyValuePairs.json | 81 ++++++++- .../trace/type_commons:DebugMapValue.json | 81 ++++++++- .../type_commons:DebugVariableValue.json | 90 ++++++++- ...mons:DoublyLinkedListNodeAndListValue.json | 27 ++- ...ype_commons:DoublyLinkedListNodeValue.json | 18 +- .../type_commons:DoublyLinkedListValue.json | 27 ++- .../trace/type_commons:GenericValue.json | 9 +- .../trace/type_commons:KeyValuePair.json | 72 +++++++- .../trace/type_commons:ListType.json | 18 +- .../trace/type_commons:MapType.json | 9 +- .../trace/type_commons:MapValue.json | 72 +++++++- ...mons:SinglyLinkedListNodeAndListValue.json | 18 +- ...ype_commons:SinglyLinkedListNodeValue.json | 9 +- .../type_commons:SinglyLinkedListValue.json | 18 +- .../trace/type_commons:TestCase.json | 72 +++++++- ...pe_commons:TestCaseWithExpectedResult.json | 72 +++++++- .../trace/type_commons:VariableType.json | 18 +- .../trace/type_commons:VariableValue.json | 99 ++++++++-- .../type_problem:CreateProblemRequest.json | 81 ++++++++- .../type_problem:ProblemDescription.json | 72 +++++++- .../type_problem:ProblemDescriptionBoard.json | 72 +++++++- .../trace/type_problem:ProblemInfo.json | 81 ++++++++- .../type_problem:VariableTypeAndName.json | 9 +- .../trace/type_submission:ActualResult.json | 72 +++++++- .../type_submission:CodeExecutionUpdate.json | 171 ++++++++++++++++-- ...e_submission:ExecutionSessionResponse.json | 9 +- ...type_submission:ExecutionSessionState.json | 18 +- ...sion:GetExecutionSessionStateResponse.json | 27 ++- ...submission:GetSubmissionStateResponse.json | 137 ++++++++++++-- ...bmission:GetTraceResponsesPageRequest.json | 9 +- .../trace/type_submission:GradedResponse.json | 72 +++++++- .../type_submission:GradedResponseV2.json | 90 ++++++++- .../type_submission:GradedTestCaseUpdate.json | 90 ++++++++- ...e_submission:InitializeProblemRequest.json | 9 +- ...ype_submission:InvalidRequestResponse.json | 36 +++- ...bmission:RecordedResponseNotification.json | 9 +- ...mission:RecordingResponseNotification.json | 18 +- .../trace/type_submission:Scope.json | 81 ++++++++- .../trace/type_submission:StackFrame.json | 81 ++++++++- .../type_submission:StackInformation.json | 90 ++++++++- .../type_submission:SubmissionRequest.json | 36 +++- .../type_submission:SubmissionResponse.json | 171 ++++++++++++++++-- ...ubmission:SubmissionStatusForTestCase.json | 90 ++++++++- .../type_submission:SubmissionStatusV2.json | 144 +++++++++++++-- .../type_submission:SubmissionTypeState.json | 126 +++++++++++-- .../type_submission:SubmitRequestV2.json | 18 +- .../trace/type_submission:TestCaseGrade.json | 90 ++++++++- ...ype_submission:TestCaseNonHiddenGrade.json | 90 ++++++++- .../trace/type_submission:TestCaseResult.json | 72 +++++++- ...e_submission:TestCaseResultWithStdout.json | 72 +++++++- .../type_submission:TestSubmissionState.json | 90 ++++++++- .../type_submission:TestSubmissionStatus.json | 90 ++++++++- ...ype_submission:TestSubmissionStatusV2.json | 126 +++++++++++-- .../type_submission:TestSubmissionUpdate.json | 90 ++++++++- ...e_submission:TestSubmissionUpdateInfo.json | 90 ++++++++- .../trace/type_submission:TraceResponse.json | 117 ++++++++++-- .../type_submission:TraceResponseV2.json | 117 ++++++++++-- .../type_submission:TraceResponsesPage.json | 126 +++++++++++-- .../type_submission:TraceResponsesPageV2.json | 126 +++++++++++-- .../trace/type_submission:TracedTestCase.json | 72 +++++++- .../type_submission:WorkspaceRanResponse.json | 18 +- .../type_submission:WorkspaceRunDetails.json | 18 +- ...e_submission:WorkspaceSubmissionState.json | 36 +++- ..._submission:WorkspaceSubmissionStatus.json | 36 +++- ...ubmission:WorkspaceSubmissionStatusV2.json | 18 +- ..._submission:WorkspaceSubmissionUpdate.json | 18 +- ...mission:WorkspaceSubmissionUpdateInfo.json | 18 +- ...ype_submission:WorkspaceSubmitRequest.json | 9 +- .../problem:AssertCorrectnessCheck.json | 18 +- .../type_v2/problem:BasicCustomFiles.json | 9 +- .../problem:CreateProblemRequestV2.json | 108 +++++++++-- .../trace/type_v2/problem:CustomFiles.json | 9 +- .../type_v2/problem:DefaultProvidedFile.json | 9 +- .../problem:FunctionImplementation.json | 9 +- ...ionImplementationForMultipleLanguages.json | 9 +- .../type_v2/problem:FunctionSignature.json | 9 +- .../problem:GetBasicSolutionFileRequest.json | 9 +- .../problem:GetFunctionSignatureRequest.json | 9 +- ...oblem:GetGeneratedTestCaseFileRequest.json | 117 ++++++++++-- ...tGeneratedTestCaseTemplateFileRequest.json | 18 +- .../problem:LightweightProblemInfoV2.json | 9 +- .../problem:NonVoidFunctionDefinition.json | 18 +- .../problem:NonVoidFunctionSignature.json | 9 +- .../trace/type_v2/problem:Parameter.json | 9 +- .../trace/type_v2/problem:ProblemInfoV2.json | 108 +++++++++-- .../type_v2/problem:TestCaseExpects.json | 9 +- .../type_v2/problem:TestCaseFunction.json | 18 +- .../problem:TestCaseImplementation.json | 18 +- ...oblem:TestCaseImplementationReference.json | 18 +- .../type_v2/problem:TestCaseTemplate.json | 18 +- .../trace/type_v2/problem:TestCaseV2.json | 108 +++++++++-- ...estCaseWithActualResultImplementation.json | 18 +- .../problem:VoidFunctionDefinition.json | 18 +- ...nctionDefinitionThatTakesActualResult.json | 18 +- .../problem:VoidFunctionSignature.json | 9 +- ...unctionSignatureThatTakesActualResult.json | 9 +- .../v3/problem:AssertCorrectnessCheck.json | 18 +- .../type_v2/v3/problem:BasicCustomFiles.json | 9 +- .../v3/problem:CreateProblemRequestV2.json | 108 +++++++++-- .../trace/type_v2/v3/problem:CustomFiles.json | 9 +- .../v3/problem:DefaultProvidedFile.json | 9 +- .../v3/problem:FunctionImplementation.json | 9 +- ...ionImplementationForMultipleLanguages.json | 9 +- .../type_v2/v3/problem:FunctionSignature.json | 9 +- .../problem:GetBasicSolutionFileRequest.json | 9 +- .../problem:GetFunctionSignatureRequest.json | 9 +- ...oblem:GetGeneratedTestCaseFileRequest.json | 117 ++++++++++-- ...tGeneratedTestCaseTemplateFileRequest.json | 18 +- .../v3/problem:LightweightProblemInfoV2.json | 9 +- .../v3/problem:NonVoidFunctionDefinition.json | 18 +- .../v3/problem:NonVoidFunctionSignature.json | 9 +- .../trace/type_v2/v3/problem:Parameter.json | 9 +- .../type_v2/v3/problem:ProblemInfoV2.json | 108 +++++++++-- .../type_v2/v3/problem:TestCaseExpects.json | 9 +- .../type_v2/v3/problem:TestCaseFunction.json | 18 +- .../v3/problem:TestCaseImplementation.json | 18 +- ...oblem:TestCaseImplementationReference.json | 18 +- .../type_v2/v3/problem:TestCaseTemplate.json | 18 +- .../trace/type_v2/v3/problem:TestCaseV2.json | 108 +++++++++-- ...estCaseWithActualResultImplementation.json | 18 +- .../v3/problem:VoidFunctionDefinition.json | 18 +- ...nctionDefinitionThatTakesActualResult.json | 18 +- .../v3/problem:VoidFunctionSignature.json | 9 +- ...unctionSignatureThatTakesActualResult.json | 9 +- .../type_union:Key.json | 2 +- .../type_union:MyUnion.json | 2 +- .../type_union:TypeWithOptionalUnion.json | 11 +- .../type_types:UnionWithOptionalTime.json | 22 ++- .../src/converters/containerToJsonSchema.ts | 7 +- .../undiscriminatedUnionToJsonSchema.ts | 2 +- 224 files changed, 7135 insertions(+), 1080 deletions(-) diff --git a/packages/cli/cli/versions.yml b/packages/cli/cli/versions.yml index ae5c9a78298..f74a0813a7a 100644 --- a/packages/cli/cli/versions.yml +++ b/packages/cli/cli/versions.yml @@ -1,3 +1,12 @@ +- changelogEntry: +- changelogEntry: + - summary: | + Undiscriminated unions are now represented using `anyOf` in the generated JSON Schema + Nullable properties are now correctly propagated to the JSON Schema + type: fix + irVersion: 53 + version: 0.45.0-rc12 + - changelogEntry: - summary: | Improved JSON Schema generation for object inheritance: diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/any-auth/type_auth:TokenResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/any-auth/type_auth:TokenResponse.json index ef23d34e26b..93c36010791 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/any-auth/type_auth:TokenResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/any-auth/type_auth:TokenResponse.json @@ -8,7 +8,14 @@ "type": "integer" }, "refresh_token": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_folder-a/service:Response.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_folder-a/service:Response.json index f2029f9531c..d5af2d1b3e9 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_folder-a/service:Response.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_folder-a/service:Response.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "foo": { - "$ref": "#/definitions/folder-b.common.Foo" + "oneOf": [ + { + "$ref": "#/definitions/folder-b.common.Foo" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, @@ -24,7 +31,14 @@ "type": "object", "properties": { "foo": { - "$ref": "#/definitions/folder-c.common.FolderCFoo" + "oneOf": [ + { + "$ref": "#/definitions/folder-c.common.FolderCFoo" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_folder-b/common:Foo.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_folder-b/common:Foo.json index 0acc5706e37..6184b39a113 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_folder-b/common:Foo.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_folder-b/common:Foo.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "foo": { - "$ref": "#/definitions/folder-c.common.FolderCFoo" + "oneOf": [ + { + "$ref": "#/definitions/folder-c.common.FolderCFoo" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_foo:FilteredType.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_foo:FilteredType.json index 3b9d2ad38aa..ea4d461c3b1 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_foo:FilteredType.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_foo:FilteredType.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "public_property": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "private_property": { "type": "integer" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_foo:OptionalString.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_foo:OptionalString.json index cdb8c887b62..97db51f9b40 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_foo:OptionalString.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/audiences/type_foo:OptionalString.json @@ -1,4 +1,11 @@ { - "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "definitions": {} } \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_:ImportingA.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_:ImportingA.json index 210a6b9e1b2..e5a084609a8 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_:ImportingA.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_:ImportingA.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "a": { - "$ref": "#/definitions/a.A" + "oneOf": [ + { + "$ref": "#/definitions/a.A" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_ast:ContainerValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_ast:ContainerValue.json index 2ab62d83fcc..b0a1ccf3fb1 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_ast:ContainerValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_ast:ContainerValue.json @@ -35,7 +35,14 @@ "const": "optional" }, "value": { - "$ref": "#/definitions/ast.FieldValue" + "oneOf": [ + { + "$ref": "#/definitions/ast.FieldValue" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -88,7 +95,14 @@ "const": "optional" }, "value": { - "$ref": "#/definitions/ast.FieldValue" + "oneOf": [ + { + "$ref": "#/definitions/ast.FieldValue" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_ast:FieldValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_ast:FieldValue.json index c1a14fff5d0..8e2c3ab66b9 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_ast:FieldValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_ast:FieldValue.json @@ -150,7 +150,14 @@ "const": "optional" }, "value": { - "$ref": "#/definitions/ast.FieldValue" + "oneOf": [ + { + "$ref": "#/definitions/ast.FieldValue" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_ast:ObjectFieldValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_ast:ObjectFieldValue.json index da2eac6d187..60a8dc3bcde 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_ast:ObjectFieldValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references-advanced/type_ast:ObjectFieldValue.json @@ -61,7 +61,14 @@ "const": "optional" }, "value": { - "$ref": "#/definitions/ast.FieldValue" + "oneOf": [ + { + "$ref": "#/definitions/ast.FieldValue" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_:ImportingA.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_:ImportingA.json index 210a6b9e1b2..e5a084609a8 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_:ImportingA.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_:ImportingA.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "a": { - "$ref": "#/definitions/a.A" + "oneOf": [ + { + "$ref": "#/definitions/a.A" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_ast:ContainerValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_ast:ContainerValue.json index 2ab62d83fcc..b0a1ccf3fb1 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_ast:ContainerValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_ast:ContainerValue.json @@ -35,7 +35,14 @@ "const": "optional" }, "value": { - "$ref": "#/definitions/ast.FieldValue" + "oneOf": [ + { + "$ref": "#/definitions/ast.FieldValue" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -88,7 +95,14 @@ "const": "optional" }, "value": { - "$ref": "#/definitions/ast.FieldValue" + "oneOf": [ + { + "$ref": "#/definitions/ast.FieldValue" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_ast:FieldValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_ast:FieldValue.json index c1a14fff5d0..8e2c3ab66b9 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_ast:FieldValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_ast:FieldValue.json @@ -150,7 +150,14 @@ "const": "optional" }, "value": { - "$ref": "#/definitions/ast.FieldValue" + "oneOf": [ + { + "$ref": "#/definitions/ast.FieldValue" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_ast:JsonLike.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_ast:JsonLike.json index 41217908e03..657971ea9fc 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_ast:JsonLike.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/circular-references/type_ast:JsonLike.json @@ -1,5 +1,5 @@ { - "oneOf": [ + "anyOf": [ { "type": "array", "items": { @@ -24,7 +24,7 @@ ], "definitions": { "ast.JsonLike": { - "oneOf": [ + "anyOf": [ { "type": "array", "items": { diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_folder-a/service:Response.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_folder-a/service:Response.json index 921b979d4b7..badefa5b085 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_folder-a/service:Response.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_folder-a/service:Response.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "foo": { - "$ref": "#/definitions/folder-b.common.Foo" + "oneOf": [ + { + "$ref": "#/definitions/folder-b.common.Foo" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, @@ -24,7 +31,14 @@ "type": "object", "properties": { "foo": { - "$ref": "#/definitions/folder-c.common.Foo" + "oneOf": [ + { + "$ref": "#/definitions/folder-c.common.Foo" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_folder-b/common:Foo.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_folder-b/common:Foo.json index 74c85a53e49..3531b3c6c12 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_folder-b/common:Foo.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_folder-b/common:Foo.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "foo": { - "$ref": "#/definitions/folder-c.common.Foo" + "oneOf": [ + { + "$ref": "#/definitions/folder-c.common.Foo" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_folder-d/service:Response.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_folder-d/service:Response.json index 921b979d4b7..badefa5b085 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_folder-d/service:Response.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_folder-d/service:Response.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "foo": { - "$ref": "#/definitions/folder-b.common.Foo" + "oneOf": [ + { + "$ref": "#/definitions/folder-b.common.Foo" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, @@ -24,7 +31,14 @@ "type": "object", "properties": { "foo": { - "$ref": "#/definitions/folder-c.common.Foo" + "oneOf": [ + { + "$ref": "#/definitions/folder-c.common.Foo" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_foo:OptionalString.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_foo:OptionalString.json index cdb8c887b62..97db51f9b40 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_foo:OptionalString.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/cross-package-type-names/type_foo:OptionalString.json @@ -1,4 +1,11 @@ { - "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "definitions": {} } \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/enum/type_:ColorOrOperand.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/enum/type_:ColorOrOperand.json index 8e1aa438a18..c4fad775236 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/enum/type_:ColorOrOperand.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/enum/type_:ColorOrOperand.json @@ -1,5 +1,5 @@ { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/Color" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_:Identifier.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_:Identifier.json index 8f7a937faee..7d265d41ede 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_:Identifier.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_:Identifier.json @@ -34,7 +34,7 @@ ] }, "Type": { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/BasicType" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_:Type.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_:Type.json index 6d4ff2ff4a2..c6897f0b7d4 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_:Type.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_:Type.json @@ -1,5 +1,5 @@ { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/BasicType" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_commons/types:EventInfo.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_commons/types:EventInfo.json index cb67ded23c0..6f508319e02 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_commons/types:EventInfo.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_commons/types:EventInfo.json @@ -22,13 +22,27 @@ "type": "string" }, "data": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, "jsonString": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_commons/types:Metadata.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_commons/types:Metadata.json index 030adff7764..88625618eb6 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_commons/types:Metadata.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_commons/types:Metadata.json @@ -5,13 +5,27 @@ "type": "string" }, "data": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, "jsonString": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:CastMember.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:CastMember.json index b346e4fe732..f5161911edf 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:CastMember.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:CastMember.json @@ -1,5 +1,5 @@ { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/types.Actor" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Directory.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Directory.json index 8f96a4dd5ef..7a400aceb83 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Directory.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Directory.json @@ -5,16 +5,30 @@ "type": "string" }, "files": { - "type": "array", - "items": { - "$ref": "#/definitions/types.File" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/types.File" + } + }, + { + "type": "null" + } + ] }, "directories": { - "type": "array", - "items": { - "$ref": "#/definitions/types.Directory" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/types.Directory" + } + }, + { + "type": "null" + } + ] } }, "required": [ @@ -45,16 +59,30 @@ "type": "string" }, "files": { - "type": "array", - "items": { - "$ref": "#/definitions/types.File" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/types.File" + } + }, + { + "type": "null" + } + ] }, "directories": { - "type": "array", - "items": { - "$ref": "#/definitions/types.Directory" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/types.Directory" + } + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Entity.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Entity.json index 5c6720a348c..b3e0b1a10bf 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Entity.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Entity.json @@ -30,7 +30,7 @@ ] }, "Type": { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/BasicType" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:ExtendedMovie.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:ExtendedMovie.json index a40a84f1ed6..f89c577a9b6 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:ExtendedMovie.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:ExtendedMovie.json @@ -5,7 +5,14 @@ "$ref": "#/definitions/types.MovieId" }, "prequel": { - "$ref": "#/definitions/types.MovieId" + "oneOf": [ + { + "$ref": "#/definitions/types.MovieId" + }, + { + "type": "null" + } + ] }, "title": { "type": "string" @@ -23,7 +30,14 @@ "$ref": "#/definitions/commons.types.Tag" }, "book": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "metadata": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Movie.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Movie.json index 42b77cb7df3..efe96043a3e 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Movie.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Movie.json @@ -5,7 +5,14 @@ "$ref": "#/definitions/types.MovieId" }, "prequel": { - "$ref": "#/definitions/types.MovieId" + "oneOf": [ + { + "$ref": "#/definitions/types.MovieId" + }, + { + "type": "null" + } + ] }, "title": { "type": "string" @@ -23,7 +30,14 @@ "$ref": "#/definitions/commons.types.Tag" }, "book": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "metadata": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Node.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Node.json index dacda9a5498..4c6426db3e3 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Node.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Node.json @@ -5,16 +5,30 @@ "type": "string" }, "nodes": { - "type": "array", - "items": { - "$ref": "#/definitions/types.Node" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/types.Node" + } + }, + { + "type": "null" + } + ] }, "trees": { - "type": "array", - "items": { - "$ref": "#/definitions/types.Tree" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/types.Tree" + } + }, + { + "type": "null" + } + ] } }, "required": [ @@ -26,10 +40,17 @@ "type": "object", "properties": { "nodes": { - "type": "array", - "items": { - "$ref": "#/definitions/types.Node" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/types.Node" + } + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -41,16 +62,30 @@ "type": "string" }, "nodes": { - "type": "array", - "items": { - "$ref": "#/definitions/types.Node" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/types.Node" + } + }, + { + "type": "null" + } + ] }, "trees": { - "type": "array", - "items": { - "$ref": "#/definitions/types.Tree" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/types.Tree" + } + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Response.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Response.json index a31d2292b2c..1a04e6b481e 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Response.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Response.json @@ -40,7 +40,7 @@ ] }, "Type": { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/BasicType" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:ResponseType.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:ResponseType.json index 714ddaa942b..befa8658ee3 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:ResponseType.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:ResponseType.json @@ -26,7 +26,7 @@ ] }, "Type": { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/BasicType" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Tree.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Tree.json index 098eb0781fc..b899e85321e 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Tree.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/examples/type_types:Tree.json @@ -2,10 +2,17 @@ "type": "object", "properties": { "nodes": { - "type": "array", - "items": { - "$ref": "#/definitions/types.Node" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/types.Node" + } + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, @@ -14,10 +21,17 @@ "type": "object", "properties": { "nodes": { - "type": "array", - "items": { - "$ref": "#/definitions/types.Node" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/types.Node" + } + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -29,16 +43,30 @@ "type": "string" }, "nodes": { - "type": "array", - "items": { - "$ref": "#/definitions/types.Node" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/types.Node" + } + }, + { + "type": "null" + } + ] }, "trees": { - "type": "array", - "items": { - "$ref": "#/definitions/types.Tree" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/types.Tree" + } + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:DoubleOptional.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:DoubleOptional.json index facc4fe0c9b..367401f9d36 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:DoubleOptional.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:DoubleOptional.json @@ -2,13 +2,27 @@ "type": "object", "properties": { "optionalAlias": { - "$ref": "#/definitions/types.object.OptionalAlias" + "oneOf": [ + { + "$ref": "#/definitions/types.object.OptionalAlias" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, "definitions": { "types.object.OptionalAlias": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } } } \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:NestedObjectWithOptionalField.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:NestedObjectWithOptionalField.json index 86ebb813e6f..84223507008 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:NestedObjectWithOptionalField.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:NestedObjectWithOptionalField.json @@ -2,10 +2,24 @@ "type": "object", "properties": { "string": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "NestedObject": { - "$ref": "#/definitions/types.object.ObjectWithOptionalField" + "oneOf": [ + { + "$ref": "#/definitions/types.object.ObjectWithOptionalField" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, @@ -14,58 +28,149 @@ "type": "object", "properties": { "string": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "integer": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "long": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "double": { - "type": "number" + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] }, "bool": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "datetime": { - "type": "string", - "format": "date-time" + "oneOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] }, "date": { - "type": "string", - "format": "date" + "oneOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "null" + } + ] }, "uuid": { - "type": "string", - "format": "uuid" + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] }, "base64": { - "type": "string", - "contentEncoding": "base64" + "oneOf": [ + { + "type": "string", + "contentEncoding": "base64" + }, + { + "type": "null" + } + ] }, "list": { - "type": "array", - "items": { - "type": "string" - } + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, "set": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + { + "type": "null" + } + ] }, "map": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, "bigint": { - "type": "string", - "pattern": "^-?[0-9]+$" + "oneOf": [ + { + "type": "string", + "pattern": "^-?[0-9]+$" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:NestedObjectWithRequiredField.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:NestedObjectWithRequiredField.json index 4122550fce3..395c9e39804 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:NestedObjectWithRequiredField.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:NestedObjectWithRequiredField.json @@ -18,58 +18,149 @@ "type": "object", "properties": { "string": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "integer": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "long": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "double": { - "type": "number" + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] }, "bool": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "datetime": { - "type": "string", - "format": "date-time" + "oneOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] }, "date": { - "type": "string", - "format": "date" + "oneOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "null" + } + ] }, "uuid": { - "type": "string", - "format": "uuid" + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] }, "base64": { - "type": "string", - "contentEncoding": "base64" + "oneOf": [ + { + "type": "string", + "contentEncoding": "base64" + }, + { + "type": "null" + } + ] }, "list": { - "type": "array", - "items": { - "type": "string" - } + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, "set": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + { + "type": "null" + } + ] }, "map": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, "bigint": { - "type": "string", - "pattern": "^-?[0-9]+$" + "oneOf": [ + { + "type": "string", + "pattern": "^-?[0-9]+$" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:ObjectWithOptionalField.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:ObjectWithOptionalField.json index 665a81f5d59..301139a3986 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:ObjectWithOptionalField.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:ObjectWithOptionalField.json @@ -2,58 +2,149 @@ "type": "object", "properties": { "string": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "integer": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "long": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "double": { - "type": "number" + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] }, "bool": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "datetime": { - "type": "string", - "format": "date-time" + "oneOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] }, "date": { - "type": "string", - "format": "date" + "oneOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "null" + } + ] }, "uuid": { - "type": "string", - "format": "uuid" + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] }, "base64": { - "type": "string", - "contentEncoding": "base64" + "oneOf": [ + { + "type": "string", + "contentEncoding": "base64" + }, + { + "type": "null" + } + ] }, "list": { - "type": "array", - "items": { - "type": "string" - } + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, "set": { - "type": "array", - "items": { - "type": "string" - }, - "uniqueItems": true + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "uniqueItems": true + }, + { + "type": "null" + } + ] }, "map": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ] }, "bigint": { - "type": "string", - "pattern": "^-?[0-9]+$" + "oneOf": [ + { + "type": "string", + "pattern": "^-?[0-9]+$" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:OptionalAlias.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:OptionalAlias.json index cdb8c887b62..97db51f9b40 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:OptionalAlias.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/exhaustive/type_types/object:OptionalAlias.json @@ -1,4 +1,11 @@ { - "type": "string", + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], "definitions": {} } \ No newline at end of file diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Column.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Column.json index dc124144e1d..2e037c2df9c 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Column.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Column.json @@ -11,10 +11,24 @@ } }, "metadata": { - "$ref": "#/definitions/Metadata" + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] }, "indexedData": { - "$ref": "#/definitions/IndexedData" + "oneOf": [ + { + "$ref": "#/definitions/IndexedData" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -24,7 +38,7 @@ "additionalProperties": false, "definitions": { "MetadataValue": { - "oneOf": [ + "anyOf": [ { "type": "number" }, @@ -37,7 +51,7 @@ ] }, "Metadata": { - "oneOf": [ + "anyOf": [ { "type": "object", "additionalProperties": { diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:DescribeResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:DescribeResponse.json index 1254fc840bf..ff833e2184b 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:DescribeResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:DescribeResponse.json @@ -2,21 +2,49 @@ "type": "object", "properties": { "namespaces": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/NamespaceSummary" - } + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/NamespaceSummary" + } + }, + { + "type": "null" + } + ] }, "dimension": { - "type": "integer", - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] }, "fullness": { - "type": "number" + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] }, "totalCount": { - "type": "integer", - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, @@ -25,8 +53,15 @@ "type": "object", "properties": { "count": { - "type": "integer", - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:FetchResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:FetchResponse.json index 37c3361b61b..c08d8b8b3b8 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:FetchResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:FetchResponse.json @@ -2,22 +2,43 @@ "type": "object", "properties": { "columns": { - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Column" - } + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Column" + } + }, + { + "type": "null" + } + ] }, "namespace": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "usage": { - "$ref": "#/definitions/Usage" + "oneOf": [ + { + "$ref": "#/definitions/Usage" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, "definitions": { "MetadataValue": { - "oneOf": [ + "anyOf": [ { "type": "number" }, @@ -30,7 +51,7 @@ ] }, "Metadata": { - "oneOf": [ + "anyOf": [ { "type": "object", "additionalProperties": { @@ -88,10 +109,24 @@ } }, "metadata": { - "$ref": "#/definitions/Metadata" + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] }, "indexedData": { - "$ref": "#/definitions/IndexedData" + "oneOf": [ + { + "$ref": "#/definitions/IndexedData" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -104,8 +139,15 @@ "type": "object", "properties": { "units": { - "type": "integer", - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:ListElement.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:ListElement.json index 17a74371f89..05f2b9661f6 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:ListElement.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:ListElement.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "id": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:ListResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:ListResponse.json index f9b11787a4a..d88fde68362 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:ListResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:ListResponse.json @@ -2,19 +2,47 @@ "type": "object", "properties": { "columns": { - "type": "array", - "items": { - "$ref": "#/definitions/ListElement" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ListElement" + } + }, + { + "type": "null" + } + ] }, "pagination": { - "$ref": "#/definitions/Pagination" + "oneOf": [ + { + "$ref": "#/definitions/Pagination" + }, + { + "type": "null" + } + ] }, "namespace": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "usage": { - "$ref": "#/definitions/Usage" + "oneOf": [ + { + "$ref": "#/definitions/Usage" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, @@ -23,7 +51,14 @@ "type": "object", "properties": { "id": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -32,7 +67,14 @@ "type": "object", "properties": { "next": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -41,8 +83,15 @@ "type": "object", "properties": { "units": { - "type": "integer", - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Metadata.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Metadata.json index b3f4dc684ab..cb86dba2f66 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Metadata.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Metadata.json @@ -1,5 +1,5 @@ { - "oneOf": [ + "anyOf": [ { "type": "object", "additionalProperties": { @@ -22,7 +22,7 @@ ], "definitions": { "MetadataValue": { - "oneOf": [ + "anyOf": [ { "type": "number" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:MetadataValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:MetadataValue.json index 2a08ce82749..8eadd5b7552 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:MetadataValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:MetadataValue.json @@ -1,5 +1,5 @@ { - "oneOf": [ + "anyOf": [ { "type": "number" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:NamespaceSummary.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:NamespaceSummary.json index 3483a598999..8643c2cec21 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:NamespaceSummary.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:NamespaceSummary.json @@ -2,8 +2,15 @@ "type": "object", "properties": { "count": { - "type": "integer", - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Pagination.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Pagination.json index 796e653bc4d..2ab3ed4b018 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Pagination.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Pagination.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "next": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:QueryColumn.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:QueryColumn.json index 0d5a4d683b6..e8b51935264 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:QueryColumn.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:QueryColumn.json @@ -8,17 +8,45 @@ } }, "topK": { - "type": "integer", - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] }, "namespace": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "filter": { - "$ref": "#/definitions/Metadata" + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] }, "indexedData": { - "$ref": "#/definitions/IndexedData" + "oneOf": [ + { + "$ref": "#/definitions/IndexedData" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -27,7 +55,7 @@ "additionalProperties": false, "definitions": { "MetadataValue": { - "oneOf": [ + "anyOf": [ { "type": "number" }, @@ -40,7 +68,7 @@ ] }, "Metadata": { - "oneOf": [ + "anyOf": [ { "type": "object", "additionalProperties": { diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:QueryResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:QueryResponse.json index 1fa97e49a15..10daf0c5fd8 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:QueryResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:QueryResponse.json @@ -2,28 +2,56 @@ "type": "object", "properties": { "results": { - "type": "array", - "items": { - "$ref": "#/definitions/QueryResult" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/QueryResult" + } + }, + { + "type": "null" + } + ] }, "matches": { - "type": "array", - "items": { - "$ref": "#/definitions/ScoredColumn" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ScoredColumn" + } + }, + { + "type": "null" + } + ] }, "namespace": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "usage": { - "$ref": "#/definitions/Usage" + "oneOf": [ + { + "$ref": "#/definitions/Usage" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, "definitions": { "MetadataValue": { - "oneOf": [ + "anyOf": [ { "type": "number" }, @@ -36,7 +64,7 @@ ] }, "Metadata": { - "oneOf": [ + "anyOf": [ { "type": "object", "additionalProperties": { @@ -88,19 +116,47 @@ "type": "string" }, "score": { - "type": "number" + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] }, "values": { - "type": "array", - "items": { - "type": "number" - } + "oneOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] }, "metadata": { - "$ref": "#/definitions/Metadata" + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] }, "indexedData": { - "$ref": "#/definitions/IndexedData" + "oneOf": [ + { + "$ref": "#/definitions/IndexedData" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -112,13 +168,27 @@ "type": "object", "properties": { "matches": { - "type": "array", - "items": { - "$ref": "#/definitions/ScoredColumn" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ScoredColumn" + } + }, + { + "type": "null" + } + ] }, "namespace": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -127,8 +197,15 @@ "type": "object", "properties": { "units": { - "type": "integer", - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:QueryResult.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:QueryResult.json index 46f479ed972..7e4ebc95350 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:QueryResult.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:QueryResult.json @@ -2,19 +2,33 @@ "type": "object", "properties": { "matches": { - "type": "array", - "items": { - "$ref": "#/definitions/ScoredColumn" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/ScoredColumn" + } + }, + { + "type": "null" + } + ] }, "namespace": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, "definitions": { "MetadataValue": { - "oneOf": [ + "anyOf": [ { "type": "number" }, @@ -27,7 +41,7 @@ ] }, "Metadata": { - "oneOf": [ + "anyOf": [ { "type": "object", "additionalProperties": { @@ -79,19 +93,47 @@ "type": "string" }, "score": { - "type": "number" + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] }, "values": { - "type": "array", - "items": { - "type": "number" - } + "oneOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] }, "metadata": { - "$ref": "#/definitions/Metadata" + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] }, "indexedData": { - "$ref": "#/definitions/IndexedData" + "oneOf": [ + { + "$ref": "#/definitions/IndexedData" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:ScoredColumn.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:ScoredColumn.json index 14a6519e351..4667e397cdc 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:ScoredColumn.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:ScoredColumn.json @@ -5,19 +5,47 @@ "type": "string" }, "score": { - "type": "number" + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] }, "values": { - "type": "array", - "items": { - "type": "number" - } + "oneOf": [ + { + "type": "array", + "items": { + "type": "number" + } + }, + { + "type": "null" + } + ] }, "metadata": { - "$ref": "#/definitions/Metadata" + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] }, "indexedData": { - "$ref": "#/definitions/IndexedData" + "oneOf": [ + { + "$ref": "#/definitions/IndexedData" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -26,7 +54,7 @@ "additionalProperties": false, "definitions": { "MetadataValue": { - "oneOf": [ + "anyOf": [ { "type": "number" }, @@ -39,7 +67,7 @@ ] }, "Metadata": { - "oneOf": [ + "anyOf": [ { "type": "object", "additionalProperties": { diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:UploadResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:UploadResponse.json index 3483a598999..8643c2cec21 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:UploadResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:UploadResponse.json @@ -2,8 +2,15 @@ "type": "object", "properties": { "count": { - "type": "integer", - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Usage.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Usage.json index 942a17d501a..654daa628c2 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Usage.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto-exhaustive/type_:Usage.json @@ -2,8 +2,15 @@ "type": "object", "properties": { "units": { - "type": "integer", - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:CreateResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:CreateResponse.json index 7aec325b6f6..e0ed89188b9 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:CreateResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:CreateResponse.json @@ -2,13 +2,20 @@ "type": "object", "properties": { "user": { - "$ref": "#/definitions/UserModel" + "oneOf": [ + { + "$ref": "#/definitions/UserModel" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, "definitions": { "MetadataValue": { - "oneOf": [ + "anyOf": [ { "type": "number" }, @@ -21,7 +28,7 @@ ] }, "Metadata": { - "oneOf": [ + "anyOf": [ { "type": "object", "additionalProperties": { @@ -47,20 +54,55 @@ "type": "object", "properties": { "username": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "email": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "age": { - "type": "integer", - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] }, "weight": { - "type": "number" + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] }, "metadata": { - "$ref": "#/definitions/Metadata" + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:Metadata.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:Metadata.json index b3f4dc684ab..cb86dba2f66 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:Metadata.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:Metadata.json @@ -1,5 +1,5 @@ { - "oneOf": [ + "anyOf": [ { "type": "object", "additionalProperties": { @@ -22,7 +22,7 @@ ], "definitions": { "MetadataValue": { - "oneOf": [ + "anyOf": [ { "type": "number" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:MetadataValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:MetadataValue.json index 2a08ce82749..8eadd5b7552 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:MetadataValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:MetadataValue.json @@ -1,5 +1,5 @@ { - "oneOf": [ + "anyOf": [ { "type": "number" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:UserModel.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:UserModel.json index c074d22adc7..8dc0dd513eb 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:UserModel.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/grpc-proto/type_:UserModel.json @@ -2,26 +2,61 @@ "type": "object", "properties": { "username": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "email": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "age": { - "type": "integer", - "minimum": 0 + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "null" + } + ] }, "weight": { - "type": "number" + "oneOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] }, "metadata": { - "$ref": "#/definitions/Metadata" + "oneOf": [ + { + "$ref": "#/definitions/Metadata" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, "definitions": { "MetadataValue": { - "oneOf": [ + "anyOf": [ { "type": "number" }, @@ -34,7 +69,7 @@ ] }, "Metadata": { - "oneOf": [ + "anyOf": [ { "type": "object", "additionalProperties": { diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/literal/type_reference:SendRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/literal/type_reference:SendRequest.json index 07dc89cd4ea..8f3ae38bc82 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/literal/type_reference:SendRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/literal/type_reference:SendRequest.json @@ -14,7 +14,14 @@ "$ref": "#/definitions/reference.SomeLiteral" }, "maybeContext": { - "$ref": "#/definitions/reference.SomeLiteral" + "oneOf": [ + { + "$ref": "#/definitions/reference.SomeLiteral" + }, + { + "type": "null" + } + ] }, "containerObject": { "$ref": "#/definitions/reference.ContainerObject" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/multi-line-docs/type_user:User.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/multi-line-docs/type_user:User.json index b0950365025..cfbcde19d3d 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/multi-line-docs/type_user:User.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/multi-line-docs/type_user:User.json @@ -8,7 +8,14 @@ "type": "string" }, "age": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/oauth-client-credentials-environment-variables/type_auth:TokenResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/oauth-client-credentials-environment-variables/type_auth:TokenResponse.json index ef23d34e26b..93c36010791 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/oauth-client-credentials-environment-variables/type_auth:TokenResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/oauth-client-credentials-environment-variables/type_auth:TokenResponse.json @@ -8,7 +8,14 @@ "type": "integer" }, "refresh_token": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/oauth-client-credentials-nested-root/type_auth:TokenResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/oauth-client-credentials-nested-root/type_auth:TokenResponse.json index ef23d34e26b..93c36010791 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/oauth-client-credentials-nested-root/type_auth:TokenResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/oauth-client-credentials-nested-root/type_auth:TokenResponse.json @@ -8,7 +8,14 @@ "type": "integer" }, "refresh_token": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/oauth-client-credentials/type_auth:TokenResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/oauth-client-credentials/type_auth:TokenResponse.json index ef23d34e26b..93c36010791 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/oauth-client-credentials/type_auth:TokenResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/oauth-client-credentials/type_auth:TokenResponse.json @@ -8,7 +8,14 @@ "type": "integer" }, "refresh_token": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/object/type_:Type.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/object/type_:Type.json index 4451ecbbffe..4e07ce4ce83 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/object/type_:Type.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/object/type_:Type.json @@ -52,7 +52,14 @@ } }, "thirteen": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "fourteen": { "type": [ @@ -85,8 +92,15 @@ "seventeen": { "type": "array", "items": { - "type": "string", - "format": "uuid" + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] } }, "eighteen": { diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_:Node.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_:Node.json index 2fda2a3ba87..fb1cf6e43fc 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_:Node.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_:Node.json @@ -5,10 +5,24 @@ "type": "string" }, "label": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "metadata": { - "$ref": "#/definitions/commons.metadata.Metadata" + "oneOf": [ + { + "$ref": "#/definitions/commons.metadata.Metadata" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -23,10 +37,17 @@ "type": "string" }, "data": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_:Tree.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_:Tree.json index 1983530afe6..02e171e0a36 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_:Tree.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_:Tree.json @@ -2,10 +2,17 @@ "type": "object", "properties": { "nodes": { - "type": "array", - "items": { - "$ref": "#/definitions/Node" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/Node" + } + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, @@ -17,10 +24,17 @@ "type": "string" }, "data": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ] } }, "required": [ @@ -35,10 +49,24 @@ "type": "string" }, "label": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "metadata": { - "$ref": "#/definitions/commons.metadata.Metadata" + "oneOf": [ + { + "$ref": "#/definitions/commons.metadata.Metadata" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_commons/metadata:Metadata.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_commons/metadata:Metadata.json index 9c26ebf841c..808cce4d9ad 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_commons/metadata:Metadata.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_commons/metadata:Metadata.json @@ -5,10 +5,17 @@ "type": "string" }, "data": { - "type": "object", - "additionalProperties": { - "type": "string" - } + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_file/directory:Directory.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_file/directory:Directory.json index 6c5ee728635..6108135cc84 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_file/directory:Directory.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/objects-with-imports/type_file/directory:Directory.json @@ -5,16 +5,30 @@ "type": "string" }, "files": { - "type": "array", - "items": { - "$ref": "#/definitions/file.File" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/file.File" + } + }, + { + "type": "null" + } + ] }, "directories": { - "type": "array", - "items": { - "$ref": "#/definitions/file.directory.Directory" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/file.directory.Directory" + } + }, + { + "type": "null" + } + ] } }, "required": [ @@ -56,16 +70,30 @@ "type": "string" }, "files": { - "type": "array", - "items": { - "$ref": "#/definitions/file.File" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/file.File" + } + }, + { + "type": "null" + } + ] }, "directories": { - "type": "array", - "items": { - "$ref": "#/definitions/file.directory.Directory" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/file.directory.Directory" + } + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_:UsernameCursor.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_:UsernameCursor.json index 67b0e51d31e..f270aa01acd 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_:UsernameCursor.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_:UsernameCursor.json @@ -14,7 +14,14 @@ "type": "object", "properties": { "after": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "data": { "type": "array", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_:UsernamePage.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_:UsernamePage.json index 56f3e1edf0f..ca5b95042ba 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_:UsernamePage.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_:UsernamePage.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "after": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "data": { "type": "array", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:ListUsersExtendedOptionalListResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:ListUsersExtendedOptionalListResponse.json index 728c1a4bae1..aa1cf5eb6ec 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:ListUsersExtendedOptionalListResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:ListUsersExtendedOptionalListResponse.json @@ -5,8 +5,15 @@ "$ref": "#/definitions/users.UserOptionalListContainer" }, "next": { - "type": "string", - "format": "uuid" + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] }, "total_count": { "type": "integer" @@ -38,10 +45,17 @@ "type": "object", "properties": { "users": { - "type": "array", - "items": { - "$ref": "#/definitions/users.User" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/users.User" + } + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:ListUsersExtendedResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:ListUsersExtendedResponse.json index fc279f58328..9d847a0b474 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:ListUsersExtendedResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:ListUsersExtendedResponse.json @@ -5,8 +5,15 @@ "$ref": "#/definitions/users.UserListContainer" }, "next": { - "type": "string", - "format": "uuid" + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] }, "total_count": { "type": "integer" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:ListUsersPaginationResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:ListUsersPaginationResponse.json index 9c8bd51ff4d..f066841f584 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:ListUsersPaginationResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:ListUsersPaginationResponse.json @@ -2,10 +2,24 @@ "type": "object", "properties": { "hasNextPage": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] }, "page": { - "$ref": "#/definitions/users.Page" + "oneOf": [ + { + "$ref": "#/definitions/users.Page" + }, + { + "type": "null" + } + ] }, "total_count": { "type": "integer" @@ -46,7 +60,14 @@ "type": "integer" }, "next": { - "$ref": "#/definitions/users.NextPage" + "oneOf": [ + { + "$ref": "#/definitions/users.NextPage" + }, + { + "type": "null" + } + ] }, "per_page": { "type": "integer" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:Page.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:Page.json index 14aa22c8418..ca6827be43f 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:Page.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:Page.json @@ -5,7 +5,14 @@ "type": "integer" }, "next": { - "$ref": "#/definitions/users.NextPage" + "oneOf": [ + { + "$ref": "#/definitions/users.NextPage" + }, + { + "type": "null" + } + ] }, "per_page": { "type": "integer" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:UserOptionalListContainer.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:UserOptionalListContainer.json index 38e656f61d3..bba07264f00 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:UserOptionalListContainer.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:UserOptionalListContainer.json @@ -2,10 +2,17 @@ "type": "object", "properties": { "users": { - "type": "array", - "items": { - "$ref": "#/definitions/users.User" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/users.User" + } + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:UserOptionalListPage.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:UserOptionalListPage.json index b1906e7f3a0..871dfeb5a4d 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:UserOptionalListPage.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:UserOptionalListPage.json @@ -5,8 +5,15 @@ "$ref": "#/definitions/users.UserOptionalListContainer" }, "next": { - "type": "string", - "format": "uuid" + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -34,10 +41,17 @@ "type": "object", "properties": { "users": { - "type": "array", - "items": { - "$ref": "#/definitions/users.User" - } + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/users.User" + } + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:UserPage.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:UserPage.json index 13a00183878..a5e3d224afd 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:UserPage.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:UserPage.json @@ -5,8 +5,15 @@ "$ref": "#/definitions/users.UserListContainer" }, "next": { - "type": "string", - "format": "uuid" + "oneOf": [ + { + "type": "string", + "format": "uuid" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:WithCursor.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:WithCursor.json index 5e5e254ce5a..3c9680461cc 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:WithCursor.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:WithCursor.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "cursor": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:WithPage.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:WithPage.json index 11ae05fc8f5..1f91e9aa5b0 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:WithPage.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/pagination/type_users:WithPage.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "page": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/response-property/type_:OptionalStringResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/response-property/type_:OptionalStringResponse.json index 5eaa8b85018..36563edb5fb 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/response-property/type_:OptionalStringResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/response-property/type_:OptionalStringResponse.json @@ -1,5 +1,12 @@ { - "$ref": "#/definitions/StringResponse", + "oneOf": [ + { + "$ref": "#/definitions/StringResponse" + }, + { + "type": "null" + } + ], "definitions": { "StringResponse": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/response-property/type_service:OptionalWithDocs.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/response-property/type_service:OptionalWithDocs.json index 67c24e0ebbe..d289f190145 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/response-property/type_service:OptionalWithDocs.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/response-property/type_service:OptionalWithDocs.json @@ -1,5 +1,12 @@ { - "$ref": "#/definitions/service.WithDocs", + "oneOf": [ + { + "$ref": "#/definitions/service.WithDocs" + }, + { + "type": "null" + } + ], "definitions": { "service.WithDocs": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/server-sent-event-examples/type_completions:StreamedCompletion.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/server-sent-event-examples/type_completions:StreamedCompletion.json index 739e4108f5b..1a38226fd25 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/server-sent-event-examples/type_completions:StreamedCompletion.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/server-sent-event-examples/type_completions:StreamedCompletion.json @@ -5,7 +5,14 @@ "type": "string" }, "tokens": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/server-sent-events/type_completions:StreamedCompletion.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/server-sent-events/type_completions:StreamedCompletion.json index 739e4108f5b..1a38226fd25 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/server-sent-events/type_completions:StreamedCompletion.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/server-sent-events/type_completions:StreamedCompletion.json @@ -5,7 +5,14 @@ "type": "string" }, "tokens": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Account.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Account.json index 9cde8cdb332..d2584331d98 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Account.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Account.json @@ -20,10 +20,24 @@ "type": "string" }, "patient": { - "$ref": "#/definitions/Patient" + "oneOf": [ + { + "$ref": "#/definitions/Patient" + }, + { + "type": "null" + } + ] }, "practitioner": { - "$ref": "#/definitions/Practitioner" + "oneOf": [ + { + "$ref": "#/definitions/Practitioner" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -42,7 +56,14 @@ "type": "string" }, "account": { - "$ref": "#/definitions/Account" + "oneOf": [ + { + "$ref": "#/definitions/Account" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -172,10 +193,24 @@ "type": "string" }, "patient": { - "$ref": "#/definitions/Patient" + "oneOf": [ + { + "$ref": "#/definitions/Patient" + }, + { + "type": "null" + } + ] }, "practitioner": { - "$ref": "#/definitions/Practitioner" + "oneOf": [ + { + "$ref": "#/definitions/Practitioner" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -188,7 +223,7 @@ "additionalProperties": false }, "ResourceList": { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/Account" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:BaseResource.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:BaseResource.json index 7356172cba0..6e8cfc1d764 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:BaseResource.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:BaseResource.json @@ -28,7 +28,14 @@ "type": "string" }, "account": { - "$ref": "#/definitions/Account" + "oneOf": [ + { + "$ref": "#/definitions/Account" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -158,10 +165,24 @@ "type": "string" }, "patient": { - "$ref": "#/definitions/Patient" + "oneOf": [ + { + "$ref": "#/definitions/Patient" + }, + { + "type": "null" + } + ] }, "practitioner": { - "$ref": "#/definitions/Practitioner" + "oneOf": [ + { + "$ref": "#/definitions/Practitioner" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -174,7 +195,7 @@ "additionalProperties": false }, "ResourceList": { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/Account" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Memo.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Memo.json index bf940c27252..9a5c5ca11ec 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Memo.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Memo.json @@ -5,7 +5,14 @@ "type": "string" }, "account": { - "$ref": "#/definitions/Account" + "oneOf": [ + { + "$ref": "#/definitions/Account" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -20,7 +27,14 @@ "type": "string" }, "account": { - "$ref": "#/definitions/Account" + "oneOf": [ + { + "$ref": "#/definitions/Account" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -129,7 +143,7 @@ "additionalProperties": false }, "ResourceList": { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/Account" }, @@ -166,10 +180,24 @@ "type": "string" }, "patient": { - "$ref": "#/definitions/Patient" + "oneOf": [ + { + "$ref": "#/definitions/Patient" + }, + { + "type": "null" + } + ] }, "practitioner": { - "$ref": "#/definitions/Practitioner" + "oneOf": [ + { + "$ref": "#/definitions/Practitioner" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Patient.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Patient.json index 92cacacedec..d4ab7c5a2f9 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Patient.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Patient.json @@ -43,7 +43,14 @@ "type": "string" }, "account": { - "$ref": "#/definitions/Account" + "oneOf": [ + { + "$ref": "#/definitions/Account" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -173,10 +180,24 @@ "type": "string" }, "patient": { - "$ref": "#/definitions/Patient" + "oneOf": [ + { + "$ref": "#/definitions/Patient" + }, + { + "type": "null" + } + ] }, "practitioner": { - "$ref": "#/definitions/Practitioner" + "oneOf": [ + { + "$ref": "#/definitions/Practitioner" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -189,7 +210,7 @@ "additionalProperties": false }, "ResourceList": { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/Account" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Practitioner.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Practitioner.json index ffd4653a1f6..da72e210c36 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Practitioner.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Practitioner.json @@ -36,7 +36,14 @@ "type": "string" }, "account": { - "$ref": "#/definitions/Account" + "oneOf": [ + { + "$ref": "#/definitions/Account" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -166,10 +173,24 @@ "type": "string" }, "patient": { - "$ref": "#/definitions/Patient" + "oneOf": [ + { + "$ref": "#/definitions/Patient" + }, + { + "type": "null" + } + ] }, "practitioner": { - "$ref": "#/definitions/Practitioner" + "oneOf": [ + { + "$ref": "#/definitions/Practitioner" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -182,7 +203,7 @@ "additionalProperties": false }, "ResourceList": { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/Account" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:ResourceList.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:ResourceList.json index bd4d013248a..7dd07301e71 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:ResourceList.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:ResourceList.json @@ -1,5 +1,5 @@ { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/Account" }, @@ -21,7 +21,14 @@ "type": "string" }, "account": { - "$ref": "#/definitions/Account" + "oneOf": [ + { + "$ref": "#/definitions/Account" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -130,7 +137,7 @@ "additionalProperties": false }, "ResourceList": { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/Account" }, @@ -167,10 +174,24 @@ "type": "string" }, "patient": { - "$ref": "#/definitions/Patient" + "oneOf": [ + { + "$ref": "#/definitions/Patient" + }, + { + "type": "null" + } + ] }, "practitioner": { - "$ref": "#/definitions/Practitioner" + "oneOf": [ + { + "$ref": "#/definitions/Practitioner" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Script.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Script.json index 63697f9b197..efc3d155a52 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Script.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/simple-fhir/type_:Script.json @@ -36,7 +36,14 @@ "type": "string" }, "account": { - "$ref": "#/definitions/Account" + "oneOf": [ + { + "$ref": "#/definitions/Account" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -166,10 +173,24 @@ "type": "string" }, "patient": { - "$ref": "#/definitions/Patient" + "oneOf": [ + { + "$ref": "#/definitions/Patient" + }, + { + "type": "null" + } + ] }, "practitioner": { - "$ref": "#/definitions/Practitioner" + "oneOf": [ + { + "$ref": "#/definitions/Practitioner" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -182,7 +203,7 @@ "additionalProperties": false }, "ResourceList": { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/Account" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/streaming-parameter/type_dummy:RegularResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/streaming-parameter/type_dummy:RegularResponse.json index cc460e77910..2cb8231306b 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/streaming-parameter/type_dummy:RegularResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/streaming-parameter/type_dummy:RegularResponse.json @@ -5,7 +5,14 @@ "type": "string" }, "name": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/streaming-parameter/type_dummy:StreamResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/streaming-parameter/type_dummy:StreamResponse.json index cc460e77910..2cb8231306b 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/streaming-parameter/type_dummy:StreamResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/streaming-parameter/type_dummy:StreamResponse.json @@ -5,7 +5,14 @@ "type": "string" }, "name": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/streaming/type_dummy:StreamResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/streaming/type_dummy:StreamResponse.json index cc460e77910..2cb8231306b 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/streaming/type_dummy:StreamResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/streaming/type_dummy:StreamResponse.json @@ -5,7 +5,14 @@ "type": "string" }, "name": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:BinaryTreeNodeAndTreeValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:BinaryTreeNodeAndTreeValue.json index 5ca008699c2..2634f25feba 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:BinaryTreeNodeAndTreeValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:BinaryTreeNodeAndTreeValue.json @@ -27,10 +27,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -43,7 +57,14 @@ "type": "object", "properties": { "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:BinaryTreeNodeValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:BinaryTreeNodeValue.json index 7d569926960..36c95785d97 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:BinaryTreeNodeValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:BinaryTreeNodeValue.json @@ -8,10 +8,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:BinaryTreeValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:BinaryTreeValue.json index 911f9f994e8..12006095961 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:BinaryTreeValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:BinaryTreeValue.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -29,10 +36,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DebugKeyValuePairs.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DebugKeyValuePairs.json index 5b674e17106..898c68ff5a0 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DebugKeyValuePairs.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DebugKeyValuePairs.json @@ -43,10 +43,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -59,7 +73,14 @@ "type": "object", "properties": { "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -83,7 +104,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -96,7 +124,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -120,10 +155,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -136,7 +185,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -354,7 +410,14 @@ "const": "genericValue" }, "stringifiedType": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "stringifiedValue": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DebugMapValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DebugMapValue.json index ba1c10df343..614819a8f0e 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DebugMapValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DebugMapValue.json @@ -26,10 +26,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -42,7 +56,14 @@ "type": "object", "properties": { "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -66,7 +87,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -79,7 +107,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -103,10 +138,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -119,7 +168,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -337,7 +393,14 @@ "const": "genericValue" }, "stringifiedType": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "stringifiedValue": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DebugVariableValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DebugVariableValue.json index d450ebe484d..11e686d6848 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DebugVariableValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DebugVariableValue.json @@ -202,7 +202,14 @@ "const": "genericValue" }, "stringifiedType": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "stringifiedValue": { "type": "string" @@ -228,10 +235,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -244,7 +265,14 @@ "type": "object", "properties": { "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -268,7 +296,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -281,7 +316,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -305,10 +347,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -321,7 +377,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -539,7 +602,14 @@ "const": "genericValue" }, "stringifiedType": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "stringifiedValue": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DoublyLinkedListNodeAndListValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DoublyLinkedListNodeAndListValue.json index 1f0656fa4ff..75e42694534 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DoublyLinkedListNodeAndListValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DoublyLinkedListNodeAndListValue.json @@ -27,10 +27,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -43,7 +57,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DoublyLinkedListNodeValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DoublyLinkedListNodeValue.json index acbb81696f5..696bd8378ec 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DoublyLinkedListNodeValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DoublyLinkedListNodeValue.json @@ -8,10 +8,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DoublyLinkedListValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DoublyLinkedListValue.json index 5052c1f1152..e156b02ed3b 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DoublyLinkedListValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:DoublyLinkedListValue.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -29,10 +36,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:GenericValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:GenericValue.json index 1307af31818..3cd3f516108 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:GenericValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:GenericValue.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "stringifiedType": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "stringifiedValue": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:KeyValuePair.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:KeyValuePair.json index 0fe9e6426a3..661baef3820 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:KeyValuePair.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:KeyValuePair.json @@ -43,10 +43,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -65,7 +79,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -84,10 +105,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -224,7 +259,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -244,7 +286,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -264,7 +313,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:ListType.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:ListType.json index 12b4296bda2..cbb1b46c7cc 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:ListType.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:ListType.json @@ -5,7 +5,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -95,7 +102,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:MapType.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:MapType.json index 7aebeae7042..474d9a93ec4 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:MapType.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:MapType.json @@ -96,7 +96,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:MapValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:MapValue.json index 490de0e215e..137f672da37 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:MapValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:MapValue.json @@ -26,10 +26,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -48,7 +62,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -67,10 +88,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -207,7 +242,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -227,7 +269,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -247,7 +296,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:SinglyLinkedListNodeAndListValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:SinglyLinkedListNodeAndListValue.json index 8560024379f..26fe6b9bbc4 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:SinglyLinkedListNodeAndListValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:SinglyLinkedListNodeAndListValue.json @@ -27,7 +27,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -40,7 +47,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:SinglyLinkedListNodeValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:SinglyLinkedListNodeValue.json index 7c920deff7c..87e52863bc3 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:SinglyLinkedListNodeValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:SinglyLinkedListNodeValue.json @@ -8,7 +8,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:SinglyLinkedListValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:SinglyLinkedListValue.json index 1ae81d17738..c881d41061f 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:SinglyLinkedListValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:SinglyLinkedListValue.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -29,7 +36,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:TestCase.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:TestCase.json index 991a5a39be0..7165226bb3a 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:TestCase.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:TestCase.json @@ -46,10 +46,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -68,7 +82,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -87,10 +108,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -227,7 +262,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -247,7 +289,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -267,7 +316,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:TestCaseWithExpectedResult.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:TestCaseWithExpectedResult.json index 975edfba6d0..052a9bc218d 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:TestCaseWithExpectedResult.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:TestCaseWithExpectedResult.json @@ -43,10 +43,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -65,7 +79,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -84,10 +105,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -224,7 +259,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -244,7 +286,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -264,7 +313,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:VariableType.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:VariableType.json index ab2670172e3..e0a0ca43c4f 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:VariableType.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:VariableType.json @@ -80,7 +80,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -220,7 +227,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:VariableValue.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:VariableValue.json index 9dc187891aa..8e39c758e8e 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:VariableValue.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_commons:VariableValue.json @@ -126,7 +126,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -146,7 +153,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -166,7 +180,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -205,10 +226,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -227,7 +262,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -246,10 +288,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -386,7 +442,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -406,7 +469,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -426,7 +496,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:CreateProblemRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:CreateProblemRequest.json index 20ebf8766b5..569cb33028d 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:CreateProblemRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:CreateProblemRequest.json @@ -72,10 +72,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -94,7 +108,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -113,10 +134,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -253,7 +288,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -273,7 +315,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -293,7 +342,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -508,7 +564,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:ProblemDescription.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:ProblemDescription.json index b26428f7401..ec6521b728b 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:ProblemDescription.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:ProblemDescription.json @@ -42,10 +42,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -64,7 +78,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -83,10 +104,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -223,7 +258,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -243,7 +285,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -263,7 +312,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:ProblemDescriptionBoard.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:ProblemDescriptionBoard.json index 69e4b0dd331..41cfd56f342 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:ProblemDescriptionBoard.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:ProblemDescriptionBoard.json @@ -84,10 +84,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -106,7 +120,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -125,10 +146,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -265,7 +300,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -285,7 +327,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -305,7 +354,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:ProblemInfo.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:ProblemInfo.json index 38766b5207e..9bb544d9317 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:ProblemInfo.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:ProblemInfo.json @@ -87,10 +87,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -109,7 +123,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -128,10 +149,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -268,7 +303,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -288,7 +330,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -308,7 +357,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -523,7 +579,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:VariableTypeAndName.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:VariableTypeAndName.json index 33c8569a079..019bb9586e9 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:VariableTypeAndName.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_problem:VariableTypeAndName.json @@ -96,7 +96,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:ActualResult.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:ActualResult.json index c98f2abff33..3f520d8b1cd 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:ActualResult.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:ActualResult.json @@ -93,10 +93,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -115,7 +129,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -134,10 +155,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -274,7 +309,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -294,7 +336,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -314,7 +363,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:CodeExecutionUpdate.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:CodeExecutionUpdate.json index ecb1548ca95..7c50788f579 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:CodeExecutionUpdate.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:CodeExecutionUpdate.json @@ -159,7 +159,14 @@ "$ref": "#/definitions/submission.SubmissionId" }, "testCaseId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "lineNumber": { "type": "integer" @@ -168,7 +175,14 @@ "$ref": "#/definitions/submission.LightweightStackframeInformation" }, "tracedFile": { - "$ref": "#/definitions/submission.TracedFile" + "oneOf": [ + { + "$ref": "#/definitions/submission.TracedFile" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -190,7 +204,14 @@ "type": "integer" }, "testCaseId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -367,10 +388,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -389,7 +424,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -408,10 +450,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -548,7 +604,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -568,7 +631,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -588,7 +658,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -803,10 +880,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -824,10 +915,24 @@ "type": "object", "properties": { "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -928,7 +1033,14 @@ "$ref": "#/definitions/commons.ProblemId" }, "problemVersion": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -967,10 +1079,24 @@ "$ref": "#/definitions/commons.ProblemId" }, "problemVersion": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "userId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -999,7 +1125,14 @@ } }, "userId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:ExecutionSessionResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:ExecutionSessionResponse.json index 06ef533f996..c124a5f8b12 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:ExecutionSessionResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:ExecutionSessionResponse.json @@ -5,7 +5,14 @@ "type": "string" }, "executionSessionUrl": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "language": { "$ref": "#/definitions/commons.Language" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:ExecutionSessionState.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:ExecutionSessionState.json index 2dba829aef3..7bba1b72c17 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:ExecutionSessionState.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:ExecutionSessionState.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "lastTimeContacted": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "sessionId": { "type": "string" @@ -11,7 +18,14 @@ "type": "boolean" }, "awsTaskId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "language": { "$ref": "#/definitions/commons.Language" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GetExecutionSessionStateResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GetExecutionSessionStateResponse.json index 402f6585041..6103dc1e124 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GetExecutionSessionStateResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GetExecutionSessionStateResponse.json @@ -8,7 +8,14 @@ } }, "numWarmingInstances": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "warmingSessionIds": { "type": "array", @@ -46,7 +53,14 @@ "type": "object", "properties": { "lastTimeContacted": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "sessionId": { "type": "string" @@ -55,7 +69,14 @@ "type": "boolean" }, "awsTaskId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "language": { "$ref": "#/definitions/commons.Language" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GetSubmissionStateResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GetSubmissionStateResponse.json index b3eeb45c112..beb2ed3add4 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GetSubmissionStateResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GetSubmissionStateResponse.json @@ -2,8 +2,15 @@ "type": "object", "properties": { "timeSubmitted": { - "type": "string", - "format": "date-time" + "oneOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] }, "submission": { "type": "string" @@ -62,10 +69,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -84,7 +105,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -103,10 +131,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -243,7 +285,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -263,7 +312,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -283,7 +339,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -591,10 +654,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -822,10 +899,24 @@ "const": "ran" }, "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -842,10 +933,24 @@ "const": "traced" }, "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GetTraceResponsesPageRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GetTraceResponsesPageRequest.json index c7cf1fed4aa..f832ec3d37a 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GetTraceResponsesPageRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GetTraceResponsesPageRequest.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "offset": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GradedResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GradedResponse.json index 5286c0d8349..7e9dfecb220 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GradedResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GradedResponse.json @@ -50,10 +50,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -72,7 +86,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -91,10 +112,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -231,7 +266,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -251,7 +293,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -271,7 +320,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GradedResponseV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GradedResponseV2.json index eecad873a7d..d9b27ff5c86 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GradedResponseV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GradedResponseV2.json @@ -50,10 +50,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -72,7 +86,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -91,10 +112,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -231,7 +266,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -251,7 +293,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -271,7 +320,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -384,10 +440,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GradedTestCaseUpdate.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GradedTestCaseUpdate.json index c39492db745..cd5a4b92a85 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GradedTestCaseUpdate.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:GradedTestCaseUpdate.json @@ -46,10 +46,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -68,7 +82,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -87,10 +108,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -227,7 +262,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -247,7 +289,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -267,7 +316,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -380,10 +436,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:InitializeProblemRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:InitializeProblemRequest.json index af2f103305e..3668ad1f6fd 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:InitializeProblemRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:InitializeProblemRequest.json @@ -5,7 +5,14 @@ "$ref": "#/definitions/commons.ProblemId" }, "problemVersion": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:InvalidRequestResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:InvalidRequestResponse.json index c8f0d0df7ee..625d02c748c 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:InvalidRequestResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:InvalidRequestResponse.json @@ -76,7 +76,14 @@ "$ref": "#/definitions/commons.ProblemId" }, "problemVersion": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -115,10 +122,24 @@ "$ref": "#/definitions/commons.ProblemId" }, "problemVersion": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "userId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -147,7 +168,14 @@ } }, "userId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:RecordedResponseNotification.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:RecordedResponseNotification.json index 87c3856d2a5..45f3878f39d 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:RecordedResponseNotification.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:RecordedResponseNotification.json @@ -8,7 +8,14 @@ "type": "integer" }, "testCaseId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:RecordingResponseNotification.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:RecordingResponseNotification.json index 42debb4614a..0d2646f1de9 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:RecordingResponseNotification.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:RecordingResponseNotification.json @@ -5,7 +5,14 @@ "$ref": "#/definitions/submission.SubmissionId" }, "testCaseId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "lineNumber": { "type": "integer" @@ -14,7 +21,14 @@ "$ref": "#/definitions/submission.LightweightStackframeInformation" }, "tracedFile": { - "$ref": "#/definitions/submission.TracedFile" + "oneOf": [ + { + "$ref": "#/definitions/submission.TracedFile" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:Scope.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:Scope.json index ee2bc5b3602..cb8f241fc2a 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:Scope.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:Scope.json @@ -42,10 +42,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -58,7 +72,14 @@ "type": "object", "properties": { "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -82,7 +103,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -95,7 +123,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -119,10 +154,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -135,7 +184,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -353,7 +409,14 @@ "const": "genericValue" }, "stringifiedType": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "stringifiedValue": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:StackFrame.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:StackFrame.json index fc283483532..75f7f1d1b1f 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:StackFrame.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:StackFrame.json @@ -50,10 +50,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -66,7 +80,14 @@ "type": "object", "properties": { "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -90,7 +111,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -103,7 +131,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -127,10 +162,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -143,7 +192,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -361,7 +417,14 @@ "const": "genericValue" }, "stringifiedType": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "stringifiedValue": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:StackInformation.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:StackInformation.json index 82be92b0ec4..23faaf4294a 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:StackInformation.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:StackInformation.json @@ -5,7 +5,14 @@ "type": "integer" }, "topStackFrame": { - "$ref": "#/definitions/submission.StackFrame" + "oneOf": [ + { + "$ref": "#/definitions/submission.StackFrame" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -42,10 +49,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -58,7 +79,14 @@ "type": "object", "properties": { "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -82,7 +110,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -95,7 +130,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -119,10 +161,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -135,7 +191,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -353,7 +416,14 @@ "const": "genericValue" }, "stringifiedType": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "stringifiedValue": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionRequest.json index 381407c631c..a4c118b6c0f 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionRequest.json @@ -25,7 +25,14 @@ "$ref": "#/definitions/commons.ProblemId" }, "problemVersion": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -64,10 +71,24 @@ "$ref": "#/definitions/commons.ProblemId" }, "problemVersion": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "userId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -96,7 +117,14 @@ } }, "userId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionResponse.json index 7ec7792cc27..7f56ccb412f 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionResponse.json @@ -234,10 +234,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -256,7 +270,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -275,10 +296,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -415,7 +450,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -435,7 +477,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -455,7 +504,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -670,10 +726,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -691,10 +761,24 @@ "type": "object", "properties": { "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -792,7 +876,14 @@ "$ref": "#/definitions/commons.ProblemId" }, "problemVersion": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -831,10 +922,24 @@ "$ref": "#/definitions/commons.ProblemId" }, "problemVersion": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "userId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -863,7 +968,14 @@ } }, "userId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -1118,7 +1230,14 @@ "$ref": "#/definitions/submission.SubmissionId" }, "testCaseId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "lineNumber": { "type": "integer" @@ -1127,7 +1246,14 @@ "$ref": "#/definitions/submission.LightweightStackframeInformation" }, "tracedFile": { - "$ref": "#/definitions/submission.TracedFile" + "oneOf": [ + { + "$ref": "#/definitions/submission.TracedFile" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -1149,7 +1275,14 @@ "type": "integer" }, "testCaseId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionStatusForTestCase.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionStatusForTestCase.json index eac84292a6b..9c381816b68 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionStatusForTestCase.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionStatusForTestCase.json @@ -94,10 +94,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -116,7 +130,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -135,10 +156,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -275,7 +310,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -295,7 +337,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -315,7 +364,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -514,10 +570,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionStatusV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionStatusV2.json index bdf6c780d15..334cdf6915f 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionStatusV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionStatusV2.json @@ -183,10 +183,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -205,7 +219,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -224,10 +245,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -364,7 +399,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -384,7 +426,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -404,7 +453,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -517,10 +573,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -822,7 +892,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -1141,7 +1218,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -1396,7 +1480,14 @@ "type": "object", "properties": { "expectedStdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -1417,7 +1508,14 @@ } }, "expects": { - "$ref": "#/definitions/v2.problem.TestCaseExpects" + "oneOf": [ + { + "$ref": "#/definitions/v2.problem.TestCaseExpects" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -1524,10 +1622,24 @@ "const": "ran" }, "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionTypeState.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionTypeState.json index 5c74680b8df..66448620bc2 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionTypeState.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmissionTypeState.json @@ -93,10 +93,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -115,7 +129,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -134,10 +155,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -274,7 +309,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -294,7 +336,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -314,7 +363,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -622,10 +678,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -853,10 +923,24 @@ "const": "ran" }, "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -873,10 +957,24 @@ "const": "traced" }, "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmitRequestV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmitRequestV2.json index f60bae7b3e9..bc9d34d989d 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmitRequestV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:SubmitRequestV2.json @@ -17,10 +17,24 @@ "$ref": "#/definitions/commons.ProblemId" }, "problemVersion": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "userId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseGrade.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseGrade.json index d5ba990d2d9..7205dad5d54 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseGrade.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseGrade.json @@ -36,10 +36,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -82,10 +96,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -104,7 +132,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -123,10 +158,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -263,7 +312,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -283,7 +339,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -303,7 +366,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseNonHiddenGrade.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseNonHiddenGrade.json index 79a52032133..66d0c9fafd9 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseNonHiddenGrade.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseNonHiddenGrade.json @@ -5,10 +5,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -49,10 +63,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -71,7 +99,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -90,10 +125,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -230,7 +279,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -250,7 +306,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -270,7 +333,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseResult.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseResult.json index ec35e3c33fc..f945f80ec79 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseResult.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseResult.json @@ -47,10 +47,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -69,7 +83,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -88,10 +109,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -228,7 +263,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -248,7 +290,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -268,7 +317,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseResultWithStdout.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseResultWithStdout.json index ce9354a001a..9505d7b90ae 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseResultWithStdout.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestCaseResultWithStdout.json @@ -43,10 +43,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -65,7 +79,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -84,10 +105,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -224,7 +259,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -244,7 +286,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -264,7 +313,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionState.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionState.json index f0c80f33949..2a94b5b1236 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionState.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionState.json @@ -60,10 +60,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -82,7 +96,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -101,10 +122,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -241,7 +276,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -261,7 +303,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -281,7 +330,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -589,10 +645,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionStatus.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionStatus.json index 7befafbb5c0..7c0c10523f0 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionStatus.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionStatus.json @@ -188,10 +188,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -210,7 +224,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -229,10 +250,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -369,7 +404,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -389,7 +431,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -409,7 +458,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -608,10 +664,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionStatusV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionStatusV2.json index 5c675e654b2..d709c135841 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionStatusV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionStatusV2.json @@ -147,10 +147,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -169,7 +183,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -188,10 +209,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -328,7 +363,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -348,7 +390,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -368,7 +417,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -481,10 +537,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -786,7 +856,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -1105,7 +1182,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -1360,7 +1444,14 @@ "type": "object", "properties": { "expectedStdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -1381,7 +1472,14 @@ } }, "expects": { - "$ref": "#/definitions/v2.problem.TestCaseExpects" + "oneOf": [ + { + "$ref": "#/definitions/v2.problem.TestCaseExpects" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionUpdate.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionUpdate.json index f0fb244322d..887f6f01d23 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionUpdate.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionUpdate.json @@ -137,10 +137,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -159,7 +173,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -178,10 +199,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -318,7 +353,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -338,7 +380,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -358,7 +407,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -471,10 +527,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionUpdateInfo.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionUpdateInfo.json index ee7b12bd017..9ed23058eb7 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionUpdateInfo.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TestSubmissionUpdateInfo.json @@ -223,10 +223,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -245,7 +259,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -264,10 +285,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -404,7 +439,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -424,7 +466,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -444,7 +493,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -557,10 +613,24 @@ "type": "boolean" }, "actualResult": { - "$ref": "#/definitions/commons.VariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.VariableValue" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponse.json index 77c1d68ef28..c43395dbe16 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponse.json @@ -8,16 +8,37 @@ "type": "integer" }, "returnValue": { - "$ref": "#/definitions/commons.DebugVariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.DebugVariableValue" + }, + { + "type": "null" + } + ] }, "expressionLocation": { - "$ref": "#/definitions/submission.ExpressionLocation" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExpressionLocation" + }, + { + "type": "null" + } + ] }, "stack": { "$ref": "#/definitions/submission.StackInformation" }, "stdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -60,10 +81,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -76,7 +111,14 @@ "type": "object", "properties": { "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -100,7 +142,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -113,7 +162,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -137,10 +193,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -153,7 +223,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -371,7 +448,14 @@ "const": "genericValue" }, "stringifiedType": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "stringifiedValue": { "type": "string" @@ -445,7 +529,14 @@ "type": "integer" }, "topStackFrame": { - "$ref": "#/definitions/submission.StackFrame" + "oneOf": [ + { + "$ref": "#/definitions/submission.StackFrame" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponseV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponseV2.json index 38dd37d33d6..c99cd4a3573 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponseV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponseV2.json @@ -11,16 +11,37 @@ "$ref": "#/definitions/submission.TracedFile" }, "returnValue": { - "$ref": "#/definitions/commons.DebugVariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.DebugVariableValue" + }, + { + "type": "null" + } + ] }, "expressionLocation": { - "$ref": "#/definitions/submission.ExpressionLocation" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExpressionLocation" + }, + { + "type": "null" + } + ] }, "stack": { "$ref": "#/definitions/submission.StackInformation" }, "stdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -80,10 +101,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -96,7 +131,14 @@ "type": "object", "properties": { "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -120,7 +162,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -133,7 +182,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -157,10 +213,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -173,7 +243,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -391,7 +468,14 @@ "const": "genericValue" }, "stringifiedType": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "stringifiedValue": { "type": "string" @@ -465,7 +549,14 @@ "type": "integer" }, "topStackFrame": { - "$ref": "#/definitions/submission.StackFrame" + "oneOf": [ + { + "$ref": "#/definitions/submission.StackFrame" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponsesPage.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponsesPage.json index f53dc8215c2..bfa0f1eb6a3 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponsesPage.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponsesPage.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "offset": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "traceResponses": { "type": "array", @@ -49,10 +56,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -65,7 +86,14 @@ "type": "object", "properties": { "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -89,7 +117,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -102,7 +137,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -126,10 +168,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -142,7 +198,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -360,7 +423,14 @@ "const": "genericValue" }, "stringifiedType": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "stringifiedValue": { "type": "string" @@ -434,7 +504,14 @@ "type": "integer" }, "topStackFrame": { - "$ref": "#/definitions/submission.StackFrame" + "oneOf": [ + { + "$ref": "#/definitions/submission.StackFrame" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -452,16 +529,37 @@ "type": "integer" }, "returnValue": { - "$ref": "#/definitions/commons.DebugVariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.DebugVariableValue" + }, + { + "type": "null" + } + ] }, "expressionLocation": { - "$ref": "#/definitions/submission.ExpressionLocation" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExpressionLocation" + }, + { + "type": "null" + } + ] }, "stack": { "$ref": "#/definitions/submission.StackInformation" }, "stdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponsesPageV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponsesPageV2.json index b3a7460fe41..92090a304aa 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponsesPageV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TraceResponsesPageV2.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "offset": { - "type": "integer" + "oneOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] }, "traceResponses": { "type": "array", @@ -65,10 +72,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -81,7 +102,14 @@ "type": "object", "properties": { "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -105,7 +133,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -118,7 +153,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -142,10 +184,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -158,7 +214,14 @@ "type": "object", "properties": { "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -376,7 +439,14 @@ "const": "genericValue" }, "stringifiedType": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] }, "stringifiedValue": { "type": "string" @@ -450,7 +520,14 @@ "type": "integer" }, "topStackFrame": { - "$ref": "#/definitions/submission.StackFrame" + "oneOf": [ + { + "$ref": "#/definitions/submission.StackFrame" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -471,16 +548,37 @@ "$ref": "#/definitions/submission.TracedFile" }, "returnValue": { - "$ref": "#/definitions/commons.DebugVariableValue" + "oneOf": [ + { + "$ref": "#/definitions/commons.DebugVariableValue" + }, + { + "type": "null" + } + ] }, "expressionLocation": { - "$ref": "#/definitions/submission.ExpressionLocation" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExpressionLocation" + }, + { + "type": "null" + } + ] }, "stack": { "$ref": "#/definitions/submission.StackInformation" }, "stdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TracedTestCase.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TracedTestCase.json index ad9c9b4ffd7..e5b10dd955e 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TracedTestCase.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:TracedTestCase.json @@ -43,10 +43,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -65,7 +79,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -84,10 +105,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -224,7 +259,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -244,7 +286,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -264,7 +313,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceRanResponse.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceRanResponse.json index c7c26b7a9dc..c1c3dde0f8e 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceRanResponse.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceRanResponse.json @@ -91,10 +91,24 @@ "type": "object", "properties": { "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceRunDetails.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceRunDetails.json index 2a6520f7819..a0f53dd0ffd 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceRunDetails.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceRunDetails.json @@ -2,10 +2,24 @@ "type": "object", "properties": { "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionState.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionState.json index 943d4b09c45..e62e84e10e0 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionState.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionState.json @@ -209,10 +209,24 @@ "const": "ran" }, "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -229,10 +243,24 @@ "const": "traced" }, "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionStatus.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionStatus.json index c069a35bcbf..9b9d1749411 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionStatus.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionStatus.json @@ -58,10 +58,24 @@ "const": "ran" }, "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" @@ -78,10 +92,24 @@ "const": "traced" }, "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionStatusV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionStatusV2.json index 9944ba76c23..62b7ca32235 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionStatusV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionStatusV2.json @@ -191,10 +191,24 @@ "const": "ran" }, "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionUpdate.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionUpdate.json index 3e1fda428ac..9032cc1669a 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionUpdate.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionUpdate.json @@ -193,10 +193,24 @@ "const": "ran" }, "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionUpdateInfo.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionUpdateInfo.json index 90c2f3b7dbe..9645f9f1c6f 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionUpdateInfo.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmissionUpdateInfo.json @@ -37,10 +37,24 @@ "const": "ran" }, "exceptionV2": { - "$ref": "#/definitions/submission.ExceptionV2" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionV2" + }, + { + "type": "null" + } + ] }, "exception": { - "$ref": "#/definitions/submission.ExceptionInfo" + "oneOf": [ + { + "$ref": "#/definitions/submission.ExceptionInfo" + }, + { + "type": "null" + } + ] }, "stdout": { "type": "string" diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmitRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmitRequest.json index ad501697db1..f1dfe27e2de 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmitRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_submission:WorkspaceSubmitRequest.json @@ -14,7 +14,14 @@ } }, "userId": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:AssertCorrectnessCheck.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:AssertCorrectnessCheck.json index 10648fb27e8..28cfea89cb9 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:AssertCorrectnessCheck.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:AssertCorrectnessCheck.json @@ -135,7 +135,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -220,7 +227,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:BasicCustomFiles.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:BasicCustomFiles.json index c7e37a9414d..368cd8da8b6 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:BasicCustomFiles.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:BasicCustomFiles.json @@ -110,7 +110,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:CreateProblemRequestV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:CreateProblemRequestV2.json index 0221659f542..32e30267392 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:CreateProblemRequestV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:CreateProblemRequestV2.json @@ -73,10 +73,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -95,7 +109,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -114,10 +135,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -254,7 +289,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -274,7 +316,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -294,7 +343,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -477,7 +533,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -767,7 +830,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -1025,7 +1095,14 @@ "type": "object", "properties": { "expectedStdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -1046,7 +1123,14 @@ } }, "expects": { - "$ref": "#/definitions/v2.problem.TestCaseExpects" + "oneOf": [ + { + "$ref": "#/definitions/v2.problem.TestCaseExpects" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:CustomFiles.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:CustomFiles.json index 26086123f3e..f8b09e4773f 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:CustomFiles.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:CustomFiles.json @@ -145,7 +145,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:DefaultProvidedFile.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:DefaultProvidedFile.json index 3a5a1649d8c..6e375dc22be 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:DefaultProvidedFile.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:DefaultProvidedFile.json @@ -123,7 +123,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:FunctionImplementation.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:FunctionImplementation.json index 68da46a0f44..aee9e2dba37 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:FunctionImplementation.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:FunctionImplementation.json @@ -5,7 +5,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:FunctionImplementationForMultipleLanguages.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:FunctionImplementationForMultipleLanguages.json index 04fbe7e6a92..3f8d718d4d1 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:FunctionImplementationForMultipleLanguages.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:FunctionImplementationForMultipleLanguages.json @@ -20,7 +20,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:FunctionSignature.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:FunctionSignature.json index 8fe60c6b449..bb5ff15d405 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:FunctionSignature.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:FunctionSignature.json @@ -160,7 +160,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetBasicSolutionFileRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetBasicSolutionFileRequest.json index 2d537a6b4b1..ae8685494e1 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetBasicSolutionFileRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetBasicSolutionFileRequest.json @@ -99,7 +99,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetFunctionSignatureRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetFunctionSignatureRequest.json index f4222d58fb3..157862e81a2 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetFunctionSignatureRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetFunctionSignatureRequest.json @@ -95,7 +95,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetGeneratedTestCaseFileRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetGeneratedTestCaseFileRequest.json index f7e1322a743..e94d71abebb 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetGeneratedTestCaseFileRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetGeneratedTestCaseFileRequest.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "template": { - "$ref": "#/definitions/v2.problem.TestCaseTemplate" + "oneOf": [ + { + "$ref": "#/definitions/v2.problem.TestCaseTemplate" + }, + { + "type": "null" + } + ] }, "testCase": { "$ref": "#/definitions/v2.problem.TestCaseV2" @@ -159,7 +166,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -263,7 +277,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -546,10 +567,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -568,7 +603,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -587,10 +629,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -727,7 +783,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -747,7 +810,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -767,7 +837,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -797,7 +874,14 @@ "type": "object", "properties": { "expectedStdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -818,7 +902,14 @@ } }, "expects": { - "$ref": "#/definitions/v2.problem.TestCaseExpects" + "oneOf": [ + { + "$ref": "#/definitions/v2.problem.TestCaseExpects" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetGeneratedTestCaseTemplateFileRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetGeneratedTestCaseTemplateFileRequest.json index d6f88a848b6..af74b58d999 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetGeneratedTestCaseTemplateFileRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:GetGeneratedTestCaseTemplateFileRequest.json @@ -156,7 +156,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -260,7 +267,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:LightweightProblemInfoV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:LightweightProblemInfoV2.json index 0584a15414b..05f422addb2 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:LightweightProblemInfoV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:LightweightProblemInfoV2.json @@ -111,7 +111,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:NonVoidFunctionDefinition.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:NonVoidFunctionDefinition.json index bc48a8fe599..5fa7bab8214 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:NonVoidFunctionDefinition.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:NonVoidFunctionDefinition.json @@ -99,7 +99,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -203,7 +210,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:NonVoidFunctionSignature.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:NonVoidFunctionSignature.json index c5d12f5f5e0..cc53fc34005 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:NonVoidFunctionSignature.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:NonVoidFunctionSignature.json @@ -102,7 +102,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:Parameter.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:Parameter.json index 5932454a27e..cc5d1111d7d 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:Parameter.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:Parameter.json @@ -103,7 +103,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:ProblemInfoV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:ProblemInfoV2.json index 9c6c1d84b58..725d20ab912 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:ProblemInfoV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:ProblemInfoV2.json @@ -88,10 +88,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -110,7 +124,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -129,10 +150,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -269,7 +304,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -289,7 +331,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -309,7 +358,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -500,7 +556,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -819,7 +882,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -1077,7 +1147,14 @@ "type": "object", "properties": { "expectedStdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -1098,7 +1175,14 @@ } }, "expects": { - "$ref": "#/definitions/v2.problem.TestCaseExpects" + "oneOf": [ + { + "$ref": "#/definitions/v2.problem.TestCaseExpects" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseExpects.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseExpects.json index 9bf49540881..5d5874e533b 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseExpects.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseExpects.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "expectedStdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseFunction.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseFunction.json index cbc1ae71160..0c5dd9b73a0 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseFunction.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseFunction.json @@ -139,7 +139,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -243,7 +250,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseImplementation.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseImplementation.json index 0c25b7982d2..9ff021f77c6 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseImplementation.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseImplementation.json @@ -157,7 +157,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -261,7 +268,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseImplementationReference.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseImplementationReference.json index b4f26727831..07dfea1f00e 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseImplementationReference.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseImplementationReference.json @@ -192,7 +192,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -296,7 +303,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseTemplate.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseTemplate.json index 7d8eb1b5669..065c4131f41 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseTemplate.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseTemplate.json @@ -164,7 +164,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -268,7 +275,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseV2.json index 3718f2c1da6..19410861cde 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseV2.json @@ -14,7 +14,14 @@ } }, "expects": { - "$ref": "#/definitions/v2.problem.TestCaseExpects" + "oneOf": [ + { + "$ref": "#/definitions/v2.problem.TestCaseExpects" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -193,7 +200,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -297,7 +311,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -521,10 +542,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -543,7 +578,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -562,10 +604,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -702,7 +758,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -722,7 +785,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -742,7 +812,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -772,7 +849,14 @@ "type": "object", "properties": { "expectedStdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseWithActualResultImplementation.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseWithActualResultImplementation.json index 7b3f05103be..dc80826f9a3 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseWithActualResultImplementation.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:TestCaseWithActualResultImplementation.json @@ -99,7 +99,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -203,7 +210,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionDefinition.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionDefinition.json index 42c7fead397..f02ee71d4b9 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionDefinition.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionDefinition.json @@ -102,7 +102,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -187,7 +194,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionDefinitionThatTakesActualResult.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionDefinitionThatTakesActualResult.json index 438a9e23265..bf58c00bad4 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionDefinitionThatTakesActualResult.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionDefinitionThatTakesActualResult.json @@ -102,7 +102,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -187,7 +194,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionSignature.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionSignature.json index 75e08f02f46..3610ddca6d2 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionSignature.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionSignature.json @@ -98,7 +98,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionSignatureThatTakesActualResult.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionSignatureThatTakesActualResult.json index dd1d56c29d7..a4246c9cee6 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionSignatureThatTakesActualResult.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/problem:VoidFunctionSignatureThatTakesActualResult.json @@ -102,7 +102,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:AssertCorrectnessCheck.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:AssertCorrectnessCheck.json index a26436e34d2..a6fc0ec0cc7 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:AssertCorrectnessCheck.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:AssertCorrectnessCheck.json @@ -135,7 +135,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -220,7 +227,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:BasicCustomFiles.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:BasicCustomFiles.json index 01baa083606..7f301ce8fdf 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:BasicCustomFiles.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:BasicCustomFiles.json @@ -110,7 +110,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:CreateProblemRequestV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:CreateProblemRequestV2.json index 5817b5b2f7d..7517c826a19 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:CreateProblemRequestV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:CreateProblemRequestV2.json @@ -73,10 +73,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -95,7 +109,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -114,10 +135,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -254,7 +289,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -274,7 +316,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -294,7 +343,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -477,7 +533,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -767,7 +830,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -1025,7 +1095,14 @@ "type": "object", "properties": { "expectedStdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -1046,7 +1123,14 @@ } }, "expects": { - "$ref": "#/definitions/v2.v3.problem.TestCaseExpects" + "oneOf": [ + { + "$ref": "#/definitions/v2.v3.problem.TestCaseExpects" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:CustomFiles.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:CustomFiles.json index 6a13c4d1713..149f14f1bfa 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:CustomFiles.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:CustomFiles.json @@ -145,7 +145,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:DefaultProvidedFile.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:DefaultProvidedFile.json index 252e4cfcf9e..9be106fa7f6 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:DefaultProvidedFile.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:DefaultProvidedFile.json @@ -123,7 +123,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:FunctionImplementation.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:FunctionImplementation.json index 68da46a0f44..aee9e2dba37 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:FunctionImplementation.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:FunctionImplementation.json @@ -5,7 +5,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:FunctionImplementationForMultipleLanguages.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:FunctionImplementationForMultipleLanguages.json index 5c1c4b892f6..584d5695c05 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:FunctionImplementationForMultipleLanguages.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:FunctionImplementationForMultipleLanguages.json @@ -20,7 +20,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:FunctionSignature.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:FunctionSignature.json index a227b74e2c5..abe0cbdb2f3 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:FunctionSignature.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:FunctionSignature.json @@ -160,7 +160,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetBasicSolutionFileRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetBasicSolutionFileRequest.json index 0470b0dbefa..ff2dcd9ce63 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetBasicSolutionFileRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetBasicSolutionFileRequest.json @@ -99,7 +99,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetFunctionSignatureRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetFunctionSignatureRequest.json index 3d405356f56..4e8ade7b3f0 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetFunctionSignatureRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetFunctionSignatureRequest.json @@ -95,7 +95,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetGeneratedTestCaseFileRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetGeneratedTestCaseFileRequest.json index 288446c912c..97211f91712 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetGeneratedTestCaseFileRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetGeneratedTestCaseFileRequest.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "template": { - "$ref": "#/definitions/v2.v3.problem.TestCaseTemplate" + "oneOf": [ + { + "$ref": "#/definitions/v2.v3.problem.TestCaseTemplate" + }, + { + "type": "null" + } + ] }, "testCase": { "$ref": "#/definitions/v2.v3.problem.TestCaseV2" @@ -159,7 +166,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -263,7 +277,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -546,10 +567,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -568,7 +603,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -587,10 +629,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -727,7 +783,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -747,7 +810,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -767,7 +837,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -797,7 +874,14 @@ "type": "object", "properties": { "expectedStdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -818,7 +902,14 @@ } }, "expects": { - "$ref": "#/definitions/v2.v3.problem.TestCaseExpects" + "oneOf": [ + { + "$ref": "#/definitions/v2.v3.problem.TestCaseExpects" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetGeneratedTestCaseTemplateFileRequest.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetGeneratedTestCaseTemplateFileRequest.json index a61f5375de9..52b76329a3f 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetGeneratedTestCaseTemplateFileRequest.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:GetGeneratedTestCaseTemplateFileRequest.json @@ -156,7 +156,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -260,7 +267,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:LightweightProblemInfoV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:LightweightProblemInfoV2.json index 0584a15414b..05f422addb2 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:LightweightProblemInfoV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:LightweightProblemInfoV2.json @@ -111,7 +111,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:NonVoidFunctionDefinition.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:NonVoidFunctionDefinition.json index 9b4286b791f..65ca975681e 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:NonVoidFunctionDefinition.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:NonVoidFunctionDefinition.json @@ -99,7 +99,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -203,7 +210,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:NonVoidFunctionSignature.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:NonVoidFunctionSignature.json index 5f7e5ca4814..a432bd2b15e 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:NonVoidFunctionSignature.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:NonVoidFunctionSignature.json @@ -102,7 +102,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:Parameter.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:Parameter.json index 94cb7bc3590..6af4dd2d752 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:Parameter.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:Parameter.json @@ -103,7 +103,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:ProblemInfoV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:ProblemInfoV2.json index 3627992938f..2b0d4aaa775 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:ProblemInfoV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:ProblemInfoV2.json @@ -88,10 +88,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -110,7 +124,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -129,10 +150,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -269,7 +304,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -289,7 +331,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -309,7 +358,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -500,7 +556,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -819,7 +882,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -1077,7 +1147,14 @@ "type": "object", "properties": { "expectedStdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -1098,7 +1175,14 @@ } }, "expects": { - "$ref": "#/definitions/v2.v3.problem.TestCaseExpects" + "oneOf": [ + { + "$ref": "#/definitions/v2.v3.problem.TestCaseExpects" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseExpects.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseExpects.json index 9bf49540881..5d5874e533b 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseExpects.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseExpects.json @@ -2,7 +2,14 @@ "type": "object", "properties": { "expectedStdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseFunction.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseFunction.json index a3db3a01a4a..c2c5cb96e33 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseFunction.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseFunction.json @@ -139,7 +139,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -243,7 +250,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseImplementation.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseImplementation.json index 15db4db7871..4fe976a2cdc 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseImplementation.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseImplementation.json @@ -157,7 +157,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -261,7 +268,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseImplementationReference.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseImplementationReference.json index 77a67a2c24e..39889b47fc8 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseImplementationReference.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseImplementationReference.json @@ -192,7 +192,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -296,7 +303,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseTemplate.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseTemplate.json index bbd70448a00..d5de70da228 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseTemplate.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseTemplate.json @@ -164,7 +164,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -268,7 +275,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseV2.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseV2.json index 560537eca1a..3ec680a85cc 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseV2.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseV2.json @@ -14,7 +14,14 @@ } }, "expects": { - "$ref": "#/definitions/v2.v3.problem.TestCaseExpects" + "oneOf": [ + { + "$ref": "#/definitions/v2.v3.problem.TestCaseExpects" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -193,7 +200,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -297,7 +311,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -521,10 +542,24 @@ "type": "number" }, "right": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "left": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -543,7 +578,14 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -562,10 +604,24 @@ "type": "number" }, "next": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "prev": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -702,7 +758,14 @@ "const": "binaryTreeValue" }, "root": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -722,7 +785,14 @@ "const": "singlyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -742,7 +812,14 @@ "const": "doublyLinkedListValue" }, "head": { - "$ref": "#/definitions/commons.NodeId" + "oneOf": [ + { + "$ref": "#/definitions/commons.NodeId" + }, + { + "type": "null" + } + ] }, "nodes": { "type": "object", @@ -772,7 +849,14 @@ "type": "object", "properties": { "expectedStdout": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseWithActualResultImplementation.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseWithActualResultImplementation.json index a6bcc7746f9..9bcb59010d1 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseWithActualResultImplementation.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:TestCaseWithActualResultImplementation.json @@ -99,7 +99,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -203,7 +210,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionDefinition.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionDefinition.json index 7129c6c0b00..6a44b1a88b9 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionDefinition.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionDefinition.json @@ -102,7 +102,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -187,7 +194,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionDefinitionThatTakesActualResult.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionDefinitionThatTakesActualResult.json index 3a8828a1dbb..99c915c31b2 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionDefinitionThatTakesActualResult.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionDefinitionThatTakesActualResult.json @@ -102,7 +102,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -187,7 +194,14 @@ "type": "string" }, "imports": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionSignature.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionSignature.json index 9802a0dbfe3..f92c95abe3c 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionSignature.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionSignature.json @@ -98,7 +98,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionSignatureThatTakesActualResult.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionSignatureThatTakesActualResult.json index d9c19b330c2..3d9defb6405 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionSignatureThatTakesActualResult.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/trace/type_v2/v3/problem:VoidFunctionSignatureThatTakesActualResult.json @@ -102,7 +102,14 @@ "$ref": "#/definitions/commons.VariableType" }, "isFixedLength": { - "type": "boolean" + "oneOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/undiscriminated-unions/type_union:Key.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/undiscriminated-unions/type_union:Key.json index 059197dec3f..09bc591b42c 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/undiscriminated-unions/type_union:Key.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/undiscriminated-unions/type_union:Key.json @@ -1,5 +1,5 @@ { - "oneOf": [ + "anyOf": [ { "$ref": "#/definitions/union.KeyType" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/undiscriminated-unions/type_union:MyUnion.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/undiscriminated-unions/type_union:MyUnion.json index 622195bbe69..a4e39d94fe0 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/undiscriminated-unions/type_union:MyUnion.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/undiscriminated-unions/type_union:MyUnion.json @@ -1,5 +1,5 @@ { - "oneOf": [ + "anyOf": [ { "type": "string" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/undiscriminated-unions/type_union:TypeWithOptionalUnion.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/undiscriminated-unions/type_union:TypeWithOptionalUnion.json index b43ecc17c3c..dbde05a5dd0 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/undiscriminated-unions/type_union:TypeWithOptionalUnion.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/undiscriminated-unions/type_union:TypeWithOptionalUnion.json @@ -2,13 +2,20 @@ "type": "object", "properties": { "myUnion": { - "$ref": "#/definitions/union.MyUnion" + "oneOf": [ + { + "$ref": "#/definitions/union.MyUnion" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false, "definitions": { "union.MyUnion": { - "oneOf": [ + "anyOf": [ { "type": "string" }, diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/unions/type_types:UnionWithOptionalTime.json b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/unions/type_types:UnionWithOptionalTime.json index 37b82efd6d3..b826b4b5dbe 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/unions/type_types:UnionWithOptionalTime.json +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/__test__/__snapshots__/unions/type_types:UnionWithOptionalTime.json @@ -19,8 +19,15 @@ "const": "date" }, "value": { - "type": "string", - "format": "date" + "oneOf": [ + { + "type": "string", + "format": "date" + }, + { + "type": "null" + } + ] } }, "required": [ @@ -33,8 +40,15 @@ "const": "dateimte" }, "value": { - "type": "string", - "format": "date-time" + "oneOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] } }, "required": [ diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/converters/containerToJsonSchema.ts b/packages/cli/fern-definition/ir-to-jsonschema/src/converters/containerToJsonSchema.ts index 8bbf7bdfe21..4b125d669ee 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/converters/containerToJsonSchema.ts +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/converters/containerToJsonSchema.ts @@ -23,7 +23,12 @@ export function convertContainerToJsonSchema({ additionalProperties: convertTypeReferenceToJsonSchema({ typeReference: container.valueType, context }) }; case "optional": - return convertTypeReferenceToJsonSchema({ typeReference: container.optional, context }); + return { + oneOf: [ + convertTypeReferenceToJsonSchema({ typeReference: container.optional, context }), + { type: "null" } + ] + }; case "set": return { type: "array", diff --git a/packages/cli/fern-definition/ir-to-jsonschema/src/converters/undiscriminatedUnionToJsonSchema.ts b/packages/cli/fern-definition/ir-to-jsonschema/src/converters/undiscriminatedUnionToJsonSchema.ts index 64d61dc31dd..325f2bcf886 100644 --- a/packages/cli/fern-definition/ir-to-jsonschema/src/converters/undiscriminatedUnionToJsonSchema.ts +++ b/packages/cli/fern-definition/ir-to-jsonschema/src/converters/undiscriminatedUnionToJsonSchema.ts @@ -15,7 +15,7 @@ export function convertUndiscriminatedUnionToJsonSchema({ context }: convertUndiscriminatedUnionToJsonSchema.Args): JSONSchema4 { return { - oneOf: undiscriminatedUnion.members.map((member) => { + anyOf: undiscriminatedUnion.members.map((member) => { const jsonSchemaMember = convertTypeReferenceToJsonSchema({ typeReference: member.type, context