From e121d634fabaee0373b4c00e029789c8b94ed9f5 Mon Sep 17 00:00:00 2001 From: Zach Kirsch Date: Thu, 29 Sep 2022 17:57:19 -0700 Subject: [PATCH] Add ResponseErrorsV2 to IR (#765) --- .pnp.cjs | 16 ++--- ...del-npm-0.0.220-f0aa23de2b-34bfbfd1a3.zip} | Bin 107007 -> 113804 bytes fern/ir-types/definition/services/commons.yml | 20 ++++++ fern/ir-types/definition/services/http.yml | 5 +- packages/cli/cli/package.json | 2 +- .../tests/ir/__snapshots__/ir.test.ts.snap | 40 ++++++++++- .../cli/generation/ir-generator/package.json | 2 +- .../ir-generator/src/FernConstants.ts | 7 ++ .../src/__test__/mocks/MockTypeResolver.ts | 2 +- .../src/converters/convertErrorDeclaration.ts | 2 +- .../ir-generator/src/converters/convertId.ts | 2 +- .../converters/services/convertHttpService.ts | 5 ++ .../services/convertResponseErrorsV2.ts | 65 ++++++++++++++++++ .../convertAliasTypeDeclaration.ts | 2 +- .../convertTypeDeclaration.ts | 2 +- .../convertUnionTypeDeclaration.ts | 2 +- .../getReferencedTypesFromRawDeclaration.ts | 2 +- .../src/generateIntermediateRepresentation.ts | 13 ++-- .../cli/generation/ir-generator/src/index.ts | 4 +- .../src/resolvers/ErrorResolver.ts | 34 +++++++++ .../ResolvedType.ts | 0 .../TypeResolver.ts | 0 .../local-workspace-runner/package.json | 2 +- .../remote-workspace-runner/package.json | 2 +- packages/cli/yaml/yaml-schema/package.json | 2 +- yarn.lock | 18 ++--- 26 files changed, 210 insertions(+), 41 deletions(-) rename .yarn/cache/{@fern-fern-ir-model-npm-0.0.212-fba163d6dc-d4753f0308.zip => @fern-fern-ir-model-npm-0.0.220-f0aa23de2b-34bfbfd1a3.zip} (74%) create mode 100644 packages/cli/generation/ir-generator/src/FernConstants.ts create mode 100644 packages/cli/generation/ir-generator/src/converters/services/convertResponseErrorsV2.ts create mode 100644 packages/cli/generation/ir-generator/src/resolvers/ErrorResolver.ts rename packages/cli/generation/ir-generator/src/{type-resolver => resolvers}/ResolvedType.ts (100%) rename packages/cli/generation/ir-generator/src/{type-resolver => resolvers}/TypeResolver.ts (100%) diff --git a/.pnp.cjs b/.pnp.cjs index d1944477f79..67f92c3482d 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -7770,7 +7770,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@fern-api/task-context", "workspace:packages/cli/task-context"],\ ["@fern-api/validator", "workspace:packages/cli/yaml/validator"],\ ["@fern-api/workspace-loader", "workspace:packages/cli/workspace-loader"],\ - ["@fern-fern/ir-model", "npm:0.0.212"],\ + ["@fern-fern/ir-model", "npm:0.0.220"],\ ["@types/boxen", "npm:3.0.1"],\ ["@types/inquirer", "npm:9.0.1"],\ ["@types/is-ci", "npm:3.0.0"],\ @@ -8030,7 +8030,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@fern-api/core-utils", "workspace:packages/commons/core-utils"],\ ["@fern-api/workspace-loader", "workspace:packages/cli/workspace-loader"],\ ["@fern-api/yaml-schema", "workspace:packages/cli/yaml/yaml-schema"],\ - ["@fern-fern/ir-model", "npm:0.0.212"],\ + ["@fern-fern/ir-model", "npm:0.0.220"],\ ["@types/jest", "npm:29.0.3"],\ ["@types/lodash-es", "npm:4.17.6"],\ ["@types/node", "npm:18.7.18"],\ @@ -8103,7 +8103,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@fern-api/generators-configuration", "workspace:packages/cli/config-management/generators-configuration"],\ ["@fern-api/workspace-loader", "workspace:packages/cli/workspace-loader"],\ ["@fern-fern/generator-exec-client", "npm:0.0.5"],\ - ["@fern-fern/ir-model", "npm:0.0.212"],\ + ["@fern-fern/ir-model", "npm:0.0.220"],\ ["@types/jest", "npm:29.0.3"],\ ["@types/node", "npm:18.7.18"],\ ["@types/tmp", "npm:0.2.3"],\ @@ -8309,7 +8309,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@fern-api/task-context", "workspace:packages/cli/task-context"],\ ["@fern-api/workspace-loader", "workspace:packages/cli/workspace-loader"],\ ["@fern-fern/fiddle-client-v2", "npm:0.0.18"],\ - ["@fern-fern/ir-model", "npm:0.0.212"],\ + ["@fern-fern/ir-model", "npm:0.0.220"],\ ["@types/jest", "npm:29.0.3"],\ ["@types/lodash-es", "npm:4.17.6"],\ ["@types/node", "npm:18.7.18"],\ @@ -8464,7 +8464,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@babel/preset-env", "virtual:f8e21c9fa0a798b21a87ac455600e39198fef65848556a3a2cd5c956b0460181f9e618173dcff6d9d4fb96fb870055dfe1a3ec3db5db0700e71c0184e4711659#npm:7.19.1"],\ ["@babel/preset-typescript", "virtual:f8e21c9fa0a798b21a87ac455600e39198fef65848556a3a2cd5c956b0460181f9e618173dcff6d9d4fb96fb870055dfe1a3ec3db5db0700e71c0184e4711659#npm:7.18.6"],\ ["@fern-api/core-utils", "workspace:packages/commons/core-utils"],\ - ["@fern-fern/ir-model", "npm:0.0.212"],\ + ["@fern-fern/ir-model", "npm:0.0.220"],\ ["@types/jest", "npm:29.0.3"],\ ["@types/node", "npm:18.7.18"],\ ["depcheck", "npm:1.4.3"],\ @@ -8502,10 +8502,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["@fern-fern/ir-model", [\ - ["npm:0.0.212", {\ - "packageLocation": "./.yarn/cache/@fern-fern-ir-model-npm-0.0.212-fba163d6dc-d4753f0308.zip/node_modules/@fern-fern/ir-model/",\ + ["npm:0.0.220", {\ + "packageLocation": "./.yarn/cache/@fern-fern-ir-model-npm-0.0.220-f0aa23de2b-34bfbfd1a3.zip/node_modules/@fern-fern/ir-model/",\ "packageDependencies": [\ - ["@fern-fern/ir-model", "npm:0.0.212"]\ + ["@fern-fern/ir-model", "npm:0.0.220"]\ ],\ "linkType": "HARD"\ }]\ diff --git a/.yarn/cache/@fern-fern-ir-model-npm-0.0.212-fba163d6dc-d4753f0308.zip b/.yarn/cache/@fern-fern-ir-model-npm-0.0.220-f0aa23de2b-34bfbfd1a3.zip similarity index 74% rename from .yarn/cache/@fern-fern-ir-model-npm-0.0.212-fba163d6dc-d4753f0308.zip rename to .yarn/cache/@fern-fern-ir-model-npm-0.0.220-f0aa23de2b-34bfbfd1a3.zip index 6293413a376cd7cedb13655a9b4064b0b1c08b41..5b28114040d5e4772a6496ab5e485c74305f4b53 100644 GIT binary patch delta 10285 zcmeHsc|6tM^Z$Ka`*OKt$xc%CH6(kHQ1)oEWyzB4J6*CSvb^ME3!#!IyGSTR5{WjF zybIa2SR(z-z2211@ALTm{`&s+t%rwu=giERnKSd8bH?w-l<~`y_X2ci(Jz+RMFfK> zq5v`i$Zn7uglq>{?g%xZ#O#RsOAUO(n8o3Ev$rXq4{>v)(@j$t$8io{NUE|-Jjot> zCfzbd%Xv+?e)2>$&7nh|k~*KQWYm~nf6l+Xv#Rn%P#G(|w(;p7$+`y^Y8DNJ-9{;^ z_NyPLUO^VZ78Y)PeJQrbODoYkaY4DXN=WTjEtDaY2Wa-d9}Osf$@`>--X$&T?ei$iDEFvHAV_WBpWovC?XN zVFn*D&!?D2Jiy}eMB9f!Lf38ALO;&^Bd28MkuwpG8*kKFVzpvbkdw!ay{oFfjD4ztD5CeJ1qfF9ed_j~ z{dVF?ZRfSauV@>VD2(*U$XU=G`&cU)b+Mv2UY0MshFA<{lmde>K<96$0M#G_M=*7= z^>C1M@eYM~G9XP4^F*50=uKGO(6#_@4%k}8uqjh$=kD|Q=T#cLt^sGk@~q(J?v_pl zrPz>=ki>#*eQeG9(3_ISp8NGS1vNBJ)x2QcIXCw;x@a3qJF6Fcg0jy&3m?Yd))($h zFA>!ijxHtC!XVT6z0~pR4d&x0!LrNzoq~LmSbnx&3~g%?&*bAoJuaQ49^C_jGVRx6 z`Il**aA@4XMbew~QF(nvSz>H4p*#mp@5QRJ#h>&XR-!cXy?F2;OD*P%OQdOKR(9Q5 zQ7OY=y9RQe1CBnr+I%ABT6KBN-(9}a?>Bhdg}W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)Y+1)in z(NLbHKsFDNp_(GZH;-6R)Npn{-*)F7WR$k=YzScJxW9Hx_i&~yGjJP+7tRg&Sm#?U zk*m)$K0M6Fz)wetOz_%kMcvkBX3gOA1}u<0#P9mZ;r2P4yS1Qe&y?xameF-7khp-U_L+$g z0TqY-emI9eF1S~8?K>LvakiY;s rRw9l1P)6)1j ResponseError: extends: commons.WithDocs properties: error: errors.DeclaredErrorName + + ResponseErrorsV2: + properties: + discriminant: commons.WireStringWithAllCasings + types: list + ResponseErrorV2: + extends: commons.WithDocs + properties: + discriminantValue: commons.WireStringWithAllCasings + shape: ResponseErrorShape + ResponseErrorShape: + union: + singleProperty: SingleResponseErrorProperty + noProperties: {} + + SingleResponseErrorProperty: + properties: + name: commons.WireStringWithAllCasings + error: errors.DeclaredErrorName diff --git a/fern/ir-types/definition/services/http.yml b/fern/ir-types/definition/services/http.yml index d465360d79f..932f1f44ecb 100644 --- a/fern/ir-types/definition/services/http.yml +++ b/fern/ir-types/definition/services/http.yml @@ -29,7 +29,10 @@ types: queryParameters: list request: HttpRequest response: HttpResponse - errors: serviceCommons.ResponseErrors + errors: + docs: this is deprecated. Use errorsV2 instead. + type: serviceCommons.ResponseErrors + errorsV2: serviceCommons.ResponseErrorsV2 auth: boolean HttpPath: properties: diff --git a/packages/cli/cli/package.json b/packages/cli/cli/package.json index 31ed9799ccc..b394953c35e 100644 --- a/packages/cli/cli/package.json +++ b/packages/cli/cli/package.json @@ -51,7 +51,7 @@ "@fern-api/task-context": "workspace:*", "@fern-api/validator": "workspace:*", "@fern-api/workspace-loader": "workspace:*", - "@fern-fern/ir-model": "0.0.212", + "@fern-fern/ir-model": "0.0.220", "ansi-escapes": "^5.0.0", "boxen": "^7.0.0", "chalk": "^5.0.1", diff --git a/packages/cli/ete-tests/src/tests/ir/__snapshots__/ir.test.ts.snap b/packages/cli/ete-tests/src/tests/ir/__snapshots__/ir.test.ts.snap index aa9c76e8c66..7819c489479 100644 --- a/packages/cli/ete-tests/src/tests/ir/__snapshots__/ir.test.ts.snap +++ b/packages/cli/ete-tests/src/tests/ir/__snapshots__/ir.test.ts.snap @@ -684,7 +684,18 @@ exports[`ir simple 1`] = ` "_type": "named" } }, - "errors": [] + "errors": [], + "errorsV2": { + "discriminant": { + "originalValue": "errorName", + "camelCase": "errorName", + "snakeCase": "error_name", + "pascalCase": "ErrorName", + "screamingSnakeCase": "ERROR_NAME", + "wireValue": "errorName" + }, + "types": [] + } }, { "id": "getMovie", @@ -780,7 +791,32 @@ exports[`ir simple 1`] = ` ] } } - ] + ], + "errorsV2": { + "discriminant": { + "originalValue": "errorName", + "camelCase": "errorName", + "snakeCase": "error_name", + "pascalCase": "ErrorName", + "screamingSnakeCase": "ERROR_NAME", + "wireValue": "errorName" + }, + "types": [ + { + "discriminantValue": { + "originalValue": "NotFoundError", + "camelCase": "notFoundError", + "snakeCase": "not_found_error", + "pascalCase": "NotFoundError", + "screamingSnakeCase": "NOT_FOUND_ERROR", + "wireValue": "NotFoundError" + }, + "shape": { + "type": "noProperties" + } + } + ] + } } ] } diff --git a/packages/cli/generation/ir-generator/package.json b/packages/cli/generation/ir-generator/package.json index b16aaea8bf7..f6db396a17a 100644 --- a/packages/cli/generation/ir-generator/package.json +++ b/packages/cli/generation/ir-generator/package.json @@ -28,7 +28,7 @@ "@fern-api/core-utils": "workspace:*", "@fern-api/workspace-loader": "workspace:*", "@fern-api/yaml-schema": "workspace:*", - "@fern-fern/ir-model": "0.0.212", + "@fern-fern/ir-model": "0.0.220", "lodash-es": "^4.17.21" }, "devDependencies": { diff --git a/packages/cli/generation/ir-generator/src/FernConstants.ts b/packages/cli/generation/ir-generator/src/FernConstants.ts new file mode 100644 index 00000000000..1ac847b59ec --- /dev/null +++ b/packages/cli/generation/ir-generator/src/FernConstants.ts @@ -0,0 +1,7 @@ +import { FernConstants } from "@fern-fern/ir-model/ir"; + +export const FERN_CONSTANTS: FernConstants = { + errorDiscriminant: "_error", + errorInstanceIdKey: "_errorInstanceId", + unknownErrorDiscriminantValue: "_unknown", +}; diff --git a/packages/cli/generation/ir-generator/src/__test__/mocks/MockTypeResolver.ts b/packages/cli/generation/ir-generator/src/__test__/mocks/MockTypeResolver.ts index 1fa96792179..9acc251263a 100644 --- a/packages/cli/generation/ir-generator/src/__test__/mocks/MockTypeResolver.ts +++ b/packages/cli/generation/ir-generator/src/__test__/mocks/MockTypeResolver.ts @@ -1,4 +1,4 @@ -import { TypeResolver } from "../../type-resolver/TypeResolver"; +import { TypeResolver } from "../../resolvers/TypeResolver"; export const MockTypeResolver: TypeResolver = { getDeclarationOfNamedType: () => { diff --git a/packages/cli/generation/ir-generator/src/converters/convertErrorDeclaration.ts b/packages/cli/generation/ir-generator/src/converters/convertErrorDeclaration.ts index 0211f29f60a..80b36194f75 100644 --- a/packages/cli/generation/ir-generator/src/converters/convertErrorDeclaration.ts +++ b/packages/cli/generation/ir-generator/src/converters/convertErrorDeclaration.ts @@ -1,7 +1,7 @@ import { RawPrimitiveType, RawSchemas } from "@fern-api/yaml-schema"; import { ErrorDeclaration } from "@fern-fern/ir-model/errors"; import { FernFileContext } from "../FernFileContext"; -import { TypeResolver } from "../type-resolver/TypeResolver"; +import { TypeResolver } from "../resolvers/TypeResolver"; import { generateWireStringWithAllCasings } from "../utils/generateCasings"; import { convertType } from "./type-declarations/convertTypeDeclaration"; diff --git a/packages/cli/generation/ir-generator/src/converters/convertId.ts b/packages/cli/generation/ir-generator/src/converters/convertId.ts index d2de13059a8..6b980cb877d 100644 --- a/packages/cli/generation/ir-generator/src/converters/convertId.ts +++ b/packages/cli/generation/ir-generator/src/converters/convertId.ts @@ -1,7 +1,7 @@ import { RawSchemas, RAW_DEFAULT_ID_TYPE } from "@fern-api/yaml-schema"; import { TypeDeclaration } from "@fern-fern/ir-model/types"; import { FernFileContext } from "../FernFileContext"; -import { TypeResolver } from "../type-resolver/TypeResolver"; +import { TypeResolver } from "../resolvers/TypeResolver"; import { getDocs } from "../utils/getDocs"; import { convertTypeDeclaration } from "./type-declarations/convertTypeDeclaration"; diff --git a/packages/cli/generation/ir-generator/src/converters/services/convertHttpService.ts b/packages/cli/generation/ir-generator/src/converters/services/convertHttpService.ts index 9ea5fbc23ca..94ce0b9cbdd 100644 --- a/packages/cli/generation/ir-generator/src/converters/services/convertHttpService.ts +++ b/packages/cli/generation/ir-generator/src/converters/services/convertHttpService.ts @@ -2,21 +2,25 @@ import { assertNever } from "@fern-api/core-utils"; import { RawSchemas } from "@fern-api/yaml-schema"; import { HttpEndpoint, HttpHeader, HttpMethod, HttpService, PathParameter } from "@fern-fern/ir-model/services/http"; import { FernFileContext } from "../../FernFileContext"; +import { ErrorResolver } from "../../resolvers/ErrorResolver"; import { generateStringWithAllCasings, generateWireStringWithAllCasings } from "../../utils/generateCasings"; import { getDocs } from "../../utils/getDocs"; import { constructHttpPath } from "./constructHttpPath"; import { convertHttpRequest } from "./convertHttpRequest"; import { convertHttpResponse } from "./convertHttpResponse"; import { convertResponseErrors } from "./convertResponseErrors"; +import { convertResponseErrorsV2 } from "./convertResponseErrorsV2"; export function convertHttpService({ serviceDefinition, serviceId, file, + errorResolver, }: { serviceDefinition: RawSchemas.HttpServiceSchema; serviceId: string; file: FernFileContext; + errorResolver: ErrorResolver; }): HttpService { return { docs: serviceDefinition.docs, @@ -86,6 +90,7 @@ export function convertHttpService({ request: convertHttpRequest({ request: endpoint.request, file }), response: convertHttpResponse({ response: endpoint.response, file }), errors: convertResponseErrors({ errors: endpoint.errors, file }), + errorsV2: convertResponseErrorsV2({ errors: endpoint.errors, file, errorResolver }), }) ), }; diff --git a/packages/cli/generation/ir-generator/src/converters/services/convertResponseErrorsV2.ts b/packages/cli/generation/ir-generator/src/converters/services/convertResponseErrorsV2.ts new file mode 100644 index 00000000000..45d0da8cf58 --- /dev/null +++ b/packages/cli/generation/ir-generator/src/converters/services/convertResponseErrorsV2.ts @@ -0,0 +1,65 @@ +import { RawPrimitiveType, RawSchemas } from "@fern-api/yaml-schema"; +import { ResponseErrorShape, ResponseErrorsV2, ResponseErrorV2 } from "@fern-fern/ir-model/services/commons"; +import { FernFileContext } from "../../FernFileContext"; +import { ErrorResolver } from "../../resolvers/ErrorResolver"; +import { generateWireStringWithAllCasings } from "../../utils/generateCasings"; +import { parseTypeName } from "../../utils/parseTypeName"; + +const ERROR_DISCRIMINANT = "errorName"; +const ERROR_CONTENT_PROPERTY_NAME = "content"; + +export function convertResponseErrorsV2({ + errors, + file, + errorResolver, +}: { + errors: RawSchemas.ResponseErrorsSchema | undefined; + file: FernFileContext; + errorResolver: ErrorResolver; +}): ResponseErrorsV2 { + const discriminant = generateWireStringWithAllCasings({ + wireValue: ERROR_DISCRIMINANT, + name: ERROR_DISCRIMINANT, + }); + + if (errors == null || errors.length === 0) { + return { + discriminant, + types: [], + }; + } + + return { + discriminant, + types: Object.values(errors).map((errorReference): ResponseErrorV2 => { + const referenceToError = typeof errorReference === "string" ? errorReference : errorReference.error; + + const declaration = errorResolver.getDeclaration(referenceToError, file); + if (declaration == null) { + throw new Error("Cannot locate declaration for error: " + referenceToError); + } + const rawErrorType = typeof declaration === "string" ? declaration : declaration.type; + + const parsedErrorName = parseTypeName({ typeName: referenceToError, file }); + const discriminantValue = parsedErrorName.name; + + return { + docs: typeof errorReference !== "string" ? errorReference.docs : undefined, + discriminantValue: generateWireStringWithAllCasings({ + wireValue: discriminantValue, + name: discriminantValue, + }), + shape: + rawErrorType != null && rawErrorType !== RawPrimitiveType.void + ? ResponseErrorShape.singleProperty({ + name: generateWireStringWithAllCasings({ + wireValue: ERROR_CONTENT_PROPERTY_NAME, + name: ERROR_CONTENT_PROPERTY_NAME, + }), + error: parsedErrorName, + }) + : ResponseErrorShape.noProperties(), + }; + }), + }; +} diff --git a/packages/cli/generation/ir-generator/src/converters/type-declarations/convertAliasTypeDeclaration.ts b/packages/cli/generation/ir-generator/src/converters/type-declarations/convertAliasTypeDeclaration.ts index 863ff1f1c36..e2d39548798 100644 --- a/packages/cli/generation/ir-generator/src/converters/type-declarations/convertAliasTypeDeclaration.ts +++ b/packages/cli/generation/ir-generator/src/converters/type-declarations/convertAliasTypeDeclaration.ts @@ -2,7 +2,7 @@ import { assertNever } from "@fern-api/core-utils"; import { isRawEnumDefinition, isRawObjectDefinition, isRawUnionDefinition, RawSchemas } from "@fern-api/yaml-schema"; import { ResolvedTypeReference, ShapeType, Type } from "@fern-fern/ir-model/types"; import { FernFileContext } from "../../FernFileContext"; -import { TypeResolver } from "../../type-resolver/TypeResolver"; +import { TypeResolver } from "../../resolvers/TypeResolver"; export function convertAliasTypeDeclaration({ alias, diff --git a/packages/cli/generation/ir-generator/src/converters/type-declarations/convertTypeDeclaration.ts b/packages/cli/generation/ir-generator/src/converters/type-declarations/convertTypeDeclaration.ts index 0f6e421b46f..ea62931272a 100644 --- a/packages/cli/generation/ir-generator/src/converters/type-declarations/convertTypeDeclaration.ts +++ b/packages/cli/generation/ir-generator/src/converters/type-declarations/convertTypeDeclaration.ts @@ -1,7 +1,7 @@ import { RawSchemas, visitRawTypeDeclaration } from "@fern-api/yaml-schema"; import { Type, TypeDeclaration } from "@fern-fern/ir-model/types"; import { FernFileContext } from "../../FernFileContext"; -import { TypeResolver } from "../../type-resolver/TypeResolver"; +import { TypeResolver } from "../../resolvers/TypeResolver"; import { getDocs } from "../../utils/getDocs"; import { convertAliasTypeDeclaration } from "./convertAliasTypeDeclaration"; import { convertEnumTypeDeclaration } from "./convertEnumTypeDeclaration"; diff --git a/packages/cli/generation/ir-generator/src/converters/type-declarations/convertUnionTypeDeclaration.ts b/packages/cli/generation/ir-generator/src/converters/type-declarations/convertUnionTypeDeclaration.ts index a5368c36e99..016f7d0cc10 100644 --- a/packages/cli/generation/ir-generator/src/converters/type-declarations/convertUnionTypeDeclaration.ts +++ b/packages/cli/generation/ir-generator/src/converters/type-declarations/convertUnionTypeDeclaration.ts @@ -1,7 +1,7 @@ import { isRawObjectDefinition, RawSchemas } from "@fern-api/yaml-schema"; import { SingleUnionTypeProperties, Type, TypeReference } from "@fern-fern/ir-model/types"; import { FernFileContext } from "../../FernFileContext"; -import { TypeResolver } from "../../type-resolver/TypeResolver"; +import { TypeResolver } from "../../resolvers/TypeResolver"; import { generateWireStringWithAllCasings } from "../../utils/generateCasings"; import { getDocs } from "../../utils/getDocs"; diff --git a/packages/cli/generation/ir-generator/src/converters/type-declarations/getReferencedTypesFromRawDeclaration.ts b/packages/cli/generation/ir-generator/src/converters/type-declarations/getReferencedTypesFromRawDeclaration.ts index 938747f20a8..ee7842eaee6 100644 --- a/packages/cli/generation/ir-generator/src/converters/type-declarations/getReferencedTypesFromRawDeclaration.ts +++ b/packages/cli/generation/ir-generator/src/converters/type-declarations/getReferencedTypesFromRawDeclaration.ts @@ -1,7 +1,7 @@ import { RawSchemas, visitRawTypeDeclaration, visitRawTypeReference } from "@fern-api/yaml-schema"; import { DeclaredTypeName } from "@fern-fern/ir-model/types"; import { FernFileContext } from "../../FernFileContext"; -import { TypeResolver } from "../../type-resolver/TypeResolver"; +import { TypeResolver } from "../../resolvers/TypeResolver"; import { parseTypeName } from "../../utils/parseTypeName"; interface SeenTypeNames { diff --git a/packages/cli/generation/ir-generator/src/generateIntermediateRepresentation.ts b/packages/cli/generation/ir-generator/src/generateIntermediateRepresentation.ts index 32922b6054b..8fa4da2c7a9 100644 --- a/packages/cli/generation/ir-generator/src/generateIntermediateRepresentation.ts +++ b/packages/cli/generation/ir-generator/src/generateIntermediateRepresentation.ts @@ -8,8 +8,10 @@ import { convertId } from "./converters/convertId"; import { convertHttpService } from "./converters/services/convertHttpService"; import { convertWebsocketChannel } from "./converters/services/convertWebsocketChannel"; import { convertTypeDeclaration } from "./converters/type-declarations/convertTypeDeclaration"; +import { FERN_CONSTANTS } from "./FernConstants"; import { constructFernFileContext, FernFileContext } from "./FernFileContext"; -import { TypeResolverImpl } from "./type-resolver/TypeResolver"; +import { ErrorResolverImpl } from "./resolvers/ErrorResolver"; +import { TypeResolverImpl } from "./resolvers/TypeResolver"; export async function generateIntermediateRepresentation(workspace: Workspace): Promise { const rootApiFile = constructFernFileContext({ @@ -29,14 +31,11 @@ export async function generateIntermediateRepresentation(workspace: Workspace): http: [], websocket: [], }, - constants: { - errorDiscriminant: "_error", - errorInstanceIdKey: "_errorInstanceId", - unknownErrorDiscriminantValue: "_unknown", - }, + constants: FERN_CONSTANTS, }; const typeResolver = new TypeResolverImpl(workspace); + const errorResolver = new ErrorResolverImpl(workspace); const visitServiceFile = async ({ file, schema }: { file: FernFileContext; schema: ServiceFileSchema }) => { await visitObject(schema, { @@ -94,7 +93,7 @@ export async function generateIntermediateRepresentation(workspace: Workspace): if (services.http != null) { for (const [serviceId, serviceDefinition] of Object.entries(services.http)) { intermediateRepresentation.services.http.push( - convertHttpService({ serviceDefinition, serviceId, file }) + convertHttpService({ serviceDefinition, serviceId, file, errorResolver }) ); } } diff --git a/packages/cli/generation/ir-generator/src/index.ts b/packages/cli/generation/ir-generator/src/index.ts index 7ec8af2d138..11fbcd5dd80 100644 --- a/packages/cli/generation/ir-generator/src/index.ts +++ b/packages/cli/generation/ir-generator/src/index.ts @@ -7,7 +7,7 @@ export { } from "./converters/type-declarations/convertUnionTypeDeclaration"; export { constructFernFileContext, type FernFileContext } from "./FernFileContext"; export { generateIntermediateRepresentation } from "./generateIntermediateRepresentation"; -export { type ResolvedType } from "./type-resolver/ResolvedType"; -export { TypeResolverImpl, type TypeResolver } from "./type-resolver/TypeResolver"; +export { type ResolvedType } from "./resolvers/ResolvedType"; +export { TypeResolverImpl, type TypeResolver } from "./resolvers/TypeResolver"; export { getResolvedPathOfImportedFile } from "./utils/getResolvedPathOfImportedFile"; export { parseReferenceToTypeName, type ReferenceToTypeName } from "./utils/parseReferenceToTypeName"; diff --git a/packages/cli/generation/ir-generator/src/resolvers/ErrorResolver.ts b/packages/cli/generation/ir-generator/src/resolvers/ErrorResolver.ts new file mode 100644 index 00000000000..1cf2ec7030a --- /dev/null +++ b/packages/cli/generation/ir-generator/src/resolvers/ErrorResolver.ts @@ -0,0 +1,34 @@ +import { Workspace } from "@fern-api/workspace-loader"; +import { RawSchemas } from "@fern-api/yaml-schema"; +import { FernFileContext } from "../FernFileContext"; +import { parseReferenceToTypeName } from "../utils/parseReferenceToTypeName"; + +export interface ErrorResolver { + getDeclaration(referenceToError: string, file: FernFileContext): RawSchemas.ErrorDeclarationSchema | undefined; +} + +export class ErrorResolverImpl implements ErrorResolver { + constructor(private readonly workspace: Workspace) {} + + public getDeclaration( + referenceToError: string, + file: FernFileContext + ): RawSchemas.ErrorDeclarationSchema | undefined { + const parsedReference = parseReferenceToTypeName({ + reference: referenceToError, + referencedIn: file.relativeFilepath, + imports: file.imports, + }); + + if (parsedReference == null) { + return undefined; + } + + const serviceFile = this.workspace.serviceFiles[parsedReference.relativeFilepath]; + if (serviceFile == null) { + return undefined; + } + + return serviceFile.errors?.[parsedReference.typeName]; + } +} diff --git a/packages/cli/generation/ir-generator/src/type-resolver/ResolvedType.ts b/packages/cli/generation/ir-generator/src/resolvers/ResolvedType.ts similarity index 100% rename from packages/cli/generation/ir-generator/src/type-resolver/ResolvedType.ts rename to packages/cli/generation/ir-generator/src/resolvers/ResolvedType.ts diff --git a/packages/cli/generation/ir-generator/src/type-resolver/TypeResolver.ts b/packages/cli/generation/ir-generator/src/resolvers/TypeResolver.ts similarity index 100% rename from packages/cli/generation/ir-generator/src/type-resolver/TypeResolver.ts rename to packages/cli/generation/ir-generator/src/resolvers/TypeResolver.ts diff --git a/packages/cli/generation/local-generation/local-workspace-runner/package.json b/packages/cli/generation/local-generation/local-workspace-runner/package.json index d1829c33f6f..ddfe19dc3f2 100644 --- a/packages/cli/generation/local-generation/local-workspace-runner/package.json +++ b/packages/cli/generation/local-generation/local-workspace-runner/package.json @@ -30,7 +30,7 @@ "@fern-api/generators-configuration": "workspace:*", "@fern-api/workspace-loader": "workspace:*", "@fern-fern/generator-exec-client": "0.0.5", - "@fern-fern/ir-model": "0.0.212", + "@fern-fern/ir-model": "0.0.220", "tmp-promise": "^3.0.3" }, "devDependencies": { diff --git a/packages/cli/generation/remote-generation/remote-workspace-runner/package.json b/packages/cli/generation/remote-generation/remote-workspace-runner/package.json index 64cd481e9ab..58fe1ff666c 100644 --- a/packages/cli/generation/remote-generation/remote-workspace-runner/package.json +++ b/packages/cli/generation/remote-generation/remote-workspace-runner/package.json @@ -31,7 +31,7 @@ "@fern-api/task-context": "workspace:*", "@fern-api/workspace-loader": "workspace:*", "@fern-fern/fiddle-client-v2": "^0.0.18", - "@fern-fern/ir-model": "0.0.212", + "@fern-fern/ir-model": "0.0.220", "axios": "^0.27.2", "chalk": "^5.0.1", "form-data": "^4.0.0", diff --git a/packages/cli/yaml/yaml-schema/package.json b/packages/cli/yaml/yaml-schema/package.json index 30d63754181..ac1de192605 100644 --- a/packages/cli/yaml/yaml-schema/package.json +++ b/packages/cli/yaml/yaml-schema/package.json @@ -26,7 +26,7 @@ }, "dependencies": { "@fern-api/core-utils": "workspace:*", - "@fern-fern/ir-model": "0.0.212", + "@fern-fern/ir-model": "0.0.220", "zod": "^3.14.3" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 8fd5a5c9b39..17213ed63bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3174,7 +3174,7 @@ __metadata: "@fern-api/task-context": "workspace:*" "@fern-api/validator": "workspace:*" "@fern-api/workspace-loader": "workspace:*" - "@fern-fern/ir-model": 0.0.212 + "@fern-fern/ir-model": 0.0.220 "@types/boxen": ^3.0.1 "@types/inquirer": ^9.0.1 "@types/is-ci": ^3.0.0 @@ -3419,7 +3419,7 @@ __metadata: "@fern-api/core-utils": "workspace:*" "@fern-api/workspace-loader": "workspace:*" "@fern-api/yaml-schema": "workspace:*" - "@fern-fern/ir-model": 0.0.212 + "@fern-fern/ir-model": 0.0.220 "@types/jest": ^29.0.3 "@types/lodash-es": ^4.17.6 "@types/node": ^18.7.18 @@ -3486,7 +3486,7 @@ __metadata: "@fern-api/generators-configuration": "workspace:*" "@fern-api/workspace-loader": "workspace:*" "@fern-fern/generator-exec-client": 0.0.5 - "@fern-fern/ir-model": 0.0.212 + "@fern-fern/ir-model": 0.0.220 "@types/jest": ^29.0.3 "@types/node": ^18.7.18 "@types/tmp": ^0.2.3 @@ -3676,7 +3676,7 @@ __metadata: "@fern-api/task-context": "workspace:*" "@fern-api/workspace-loader": "workspace:*" "@fern-fern/fiddle-client-v2": ^0.0.18 - "@fern-fern/ir-model": 0.0.212 + "@fern-fern/ir-model": 0.0.220 "@types/jest": ^29.0.3 "@types/lodash-es": ^4.17.6 "@types/node": ^18.7.18 @@ -3821,7 +3821,7 @@ __metadata: "@babel/preset-env": ^7.19.1 "@babel/preset-typescript": ^7.18.6 "@fern-api/core-utils": "workspace:*" - "@fern-fern/ir-model": 0.0.212 + "@fern-fern/ir-model": 0.0.220 "@types/jest": ^29.0.3 "@types/node": ^18.7.18 depcheck: ^1.4.3 @@ -3855,10 +3855,10 @@ __metadata: languageName: node linkType: hard -"@fern-fern/ir-model@npm:0.0.212": - version: 0.0.212 - resolution: "@fern-fern/ir-model@npm:0.0.212" - checksum: d4753f0308f9bd305106679efeb51891fd8c80de71c53f39eb45728b9af689828bec3af300c7830a1ef732658fa94f504c69d869fe4ca8ccfc287626579b21b5 +"@fern-fern/ir-model@npm:0.0.220": + version: 0.0.220 + resolution: "@fern-fern/ir-model@npm:0.0.220" + checksum: 34bfbfd1a395d78c05521787aa790b48ddd13465ac71ba3ea01f965d50c3e2f893d535a166f3ee74be8f4d68391cbd809955dd504fd9fd56acca3cfebc4c0e37 languageName: node linkType: hard