Repository: RobinTail/express-zod-api
Pull request #950 (2023-04-19 22:15:01)

Feat: Integration and Documentation.
Related to the discussion #931 


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 375c4ff2..1ad80cf7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,23 @@
 
 ## Version 10
 
+### v10.4.0
+
+- For the future features and improvements the following entities are renamed:
+  - ~~`Client`~~ class becomes the `Integration`.
+  - ~~`OpenAPI`~~ class becomes the `Documentation`.
+  - For backward compatibility the previously assigned names are still supported until the next major release.
+  - Developers are advised to adjust their implementation accordingly.
+
+```ts
+// before
+new Client(/*...*/);
+new OpenAPI(/*...*/);
+// after
+new Integration(/*...*/);
+new Documentation(/*...*/);
+```
+
 ### v10.3.2
 
 - Hotfix on fixing the previously mentioned issue #952.
diff --git a/README.md b/README.md
index 63ac17ec..6d5dc7d8 100644
--- a/README.md
+++ b/README.md
@@ -279,7 +279,7 @@ import { createMiddleware, createHttpError } from "express-zod-api";
 
 const authMiddleware = createMiddleware({
   security: {
-    // this information is optional and used for the generated documentation (OpenAPI)
+    // this information is optional and used for generating documentation
     and: [
       { type: "input", name: "key" },
       { type: "header", name: "token" },
@@ -809,11 +809,11 @@ Consuming the generated client requires Typescript version 4.1 or higher.
 ```typescript
 // example client-generator.ts
 import fs from "fs";
-import { Client } from "express-zod-api";
+import { Integration } from "express-zod-api";
 
 fs.writeFileSync(
   "./frontend/client.ts",
-  new Client({
+  new Integration({
     routing,
     optionalPropStyle: { withQuestionMark: true, withUndefined: true }, // optional
   }).print(),
@@ -845,9 +845,9 @@ client.provide("post", "/v1/user/:id", { id: "10" }); // it also substitues path
 You can generate the specification of your API and write it to a `.yaml` file, that can be used as the documentation:
 
 ```typescript
-import { OpenAPI } from "express-zod-api";
+import { Documentation } from "express-zod-api";
 
-const yamlString = new OpenAPI({
+const yamlString = new Documentation({
   routing, // the same routing and config that you use to start the server
   config,
   version: "1.2.3",
diff --git a/example/generate-client.ts b/example/generate-client.ts
index d78fa175..d9979f0d 100644
--- a/example/generate-client.ts
+++ b/example/generate-client.ts
@@ -1,4 +1,4 @@
-import { Client } from "../src";
+import { Integration } from "../src";
 import { routing } from "./routing";
 
-console.log(new Client({ routing }).print());
+console.log(new Integration({ routing }).print());
diff --git a/example/generate-open-api-schema.ts b/example/generate-open-api-schema.ts
index bb67e629..d3f9a141 100644
--- a/example/generate-open-api-schema.ts
+++ b/example/generate-open-api-schema.ts
@@ -1,10 +1,10 @@
-import { OpenAPI } from "../src";
+import { Documentation } from "../src";
 import { config } from "./config";
 import { routing } from "./routing";
 import manifest from "../package.json";
 
 console.log(
-  new OpenAPI({
+  new Documentation({
     routing,
     config,
     version: manifest.version,
diff --git a/src/open-api-helpers.ts b/src/documentation-helpers.ts
similarity index 100%
rename from src/open-api-helpers.ts
rename to src/documentation-helpers.ts
diff --git a/src/open-api.ts b/src/documentation.ts
similarity index 95%
rename from src/open-api.ts
rename to src/documentation.ts
index b06f5249..3018e50d 100644
--- a/src/open-api.ts
+++ b/src/documentation.ts
@@ -24,11 +24,11 @@ import {
   depictTags,
   ensureShortDescription,
   reformatParamsInPath,
-} from "./open-api-helpers";
+} from "./documentation-helpers";
 import { Routing } from "./routing";
 import { RoutingWalkerParams, walkRouting } from "./routing-walker";
 
-interface GeneratorParams {
+interface DocumentationParams {
   title: string;
   version: string;
   serverUrl: string;
@@ -49,7 +49,7 @@ interface GeneratorParams {
   serializer?: (schema: z.ZodTypeAny) => string;
 }
 
-export class OpenAPI extends OpenApiBuilder {
+export class Documentation extends OpenApiBuilder {
   protected lastSecuritySchemaIds: Partial<Record<SecuritySchemeType, number>> =
     {};
   protected lastOperationIdSuffixes: Record<string, number> = {};
@@ -106,7 +106,7 @@ export class OpenAPI extends OpenApiBuilder {
     hasSummaryFromDescription = true,
     composition = "inline",
     serializer = defaultSerializer,
-  }: GeneratorParams) {
+  }: DocumentationParams) {
     super();
     this.addInfo({ title, version }).addServer({ url: serverUrl });
     const onEndpoint: RoutingWalkerParams["onEndpoint"] = (
@@ -193,3 +193,9 @@ export class OpenAPI extends OpenApiBuilder {
     this.rootDoc.tags = config.tags ? depictTags(config.tags) : [];
   }
 }
+
+/**
+ * @deprecated Use Documentation instead.
+ * @todo remove in v11
+ * */
+export class OpenAPI extends Documentation {}
diff --git a/src/errors.ts b/src/errors.ts
index 5181a82b..5ef58129 100644
--- a/src/errors.ts
+++ b/src/errors.ts
@@ -11,7 +11,10 @@ export class DependsOnMethodError extends RoutingError {
   public override name = "DependsOnMethodError";
 }
 
-/** @desc An error related to the generating of the documentation */
+/**
+ * @desc An error related to the generating of the documentation
+ * @todo rename to DocumentationError in v11
+ * */
 export class OpenAPIError extends Error {
   public override name = "OpenAPIError";
 }
diff --git a/src/index.ts b/src/index.ts
index 5868ddb6..3700fc0e 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -15,7 +15,7 @@ export { DependsOnMethod } from "./depends-on-method";
 export { ServeStatic } from "./serve-static";
 export { Routing } from "./routing";
 export { createServer, attachRouting } from "./server";
-export { OpenAPI } from "./open-api";
+export { Documentation, OpenAPI } from "./documentation";
 export {
   OpenAPIError,
   DependsOnMethodError,
@@ -25,7 +25,7 @@ export {
 } from "./errors";
 export { withMeta } from "./metadata";
 export { testEndpoint } from "./mock";
-export { Client } from "./client";
+export { Integration, Client } from "./integration";
 
 export * as ez from "./proprietary-schemas";
 export type { ZodDateInDef } from "./date-in-schema";
diff --git a/src/client.ts b/src/integration.ts
similarity index 98%
rename from src/client.ts
rename to src/integration.ts
index e10258a9..4ee9ac83 100644
--- a/src/client.ts
+++ b/src/integration.ts
@@ -35,7 +35,7 @@ interface Registry {
   [METHOD_PATH: string]: Record<"in" | "out", string> & { isJson: boolean };
 }
 
-interface GeneratorParams {
+interface IntegrationParams {
   routing: Routing;
   /**
    * @desc Used for comparing schemas wrapped into z.lazy() to limit the recursion
@@ -60,7 +60,7 @@ interface GeneratorParams {
   };
 }
 
-export class Client {
+export class Integration {
   protected agg: ts.Node[] = [];
   protected registry: Registry = {};
   protected paths: string[] = [];
@@ -79,7 +79,7 @@ export class Client {
     routing,
     serializer = defaultSerializer,
     optionalPropStyle = { withQuestionMark: true, withUndefined: true },
-  }: GeneratorParams) {
+  }: IntegrationParams) {
     walkRouting({
       routing,
       onEndpoint: (endpoint, path, method) => {
@@ -322,3 +322,9 @@ export class Client {
     return this.agg.map((node) => printNode(node, printerOptions)).join("\n\n");
   }
 }
+
+/**
+ * @deprecated Use Integration instead
+ * @todo remove in v11
+ * */
+export class Client extends Integration {}


Test patch:
diff --git a/tests/unit/__snapshots__/open-api-helpers.spec.ts.snap b/tests/unit/__snapshots__/documentation-helpers.spec.ts.snap
similarity index 57%
rename from tests/unit/__snapshots__/open-api-helpers.spec.ts.snap
rename to tests/unit/__snapshots__/documentation-helpers.spec.ts.snap
index 07a2018b..854e5b5a 100644
--- a/tests/unit/__snapshots__/open-api-helpers.spec.ts.snap
+++ b/tests/unit/__snapshots__/documentation-helpers.spec.ts.snap
@@ -1,12 +1,12 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
-exports[`Open API helpers depictAny() should set format:any 1`] = `
+exports[`Documentation helpers depictAny() should set format:any 1`] = `
 {
   "format": "any",
 }
 `;
 
-exports[`Open API helpers depictArray() should set type:array and pass items depiction 1`] = `
+exports[`Documentation helpers depictArray() should set type:array and pass items depiction 1`] = `
 {
   "items": {
     "type": "boolean",
@@ -15,37 +15,37 @@ exports[`Open API helpers depictArray() should set type:array and pass items dep
 }
 `;
 
-exports[`Open API helpers depictBigInt() should set type:integer and format:bigint 1`] = `
+exports[`Documentation helpers depictBigInt() should set type:integer and format:bigint 1`] = `
 {
   "format": "bigint",
   "type": "integer",
 }
 `;
 
-exports[`Open API helpers depictBoolean() should set type:boolean 1`] = `
+exports[`Documentation helpers depictBoolean() should set type:boolean 1`] = `
 {
   "type": "boolean",
 }
 `;
 
-exports[`Open API helpers depictBranded should pass the next depicter 1`] = `
+exports[`Documentation helpers depictBranded should pass the next depicter 1`] = `
 {
   "minLength": 2,
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictCatch() should pass next depicter 1`] = `
+exports[`Documentation helpers depictCatch() should pass next depicter 1`] = `
 {
   "type": "boolean",
 }
 `;
 
-exports[`Open API helpers depictDate should throw clear error 0 1`] = `[OpenAPIError: Using z.date() within output schema is forbidden. Please use z.dateOut() instead. Check out the documentation for details.]`;
+exports[`Documentation helpers depictDate should throw clear error 0 1`] = `[OpenAPIError: Using z.date() within output schema is forbidden. Please use z.dateOut() instead. Check out the documentation for details.]`;
 
-exports[`Open API helpers depictDate should throw clear error 1 1`] = `[OpenAPIError: Using z.date() within input schema is forbidden. Please use z.dateIn() instead. Check out the documentation for details.]`;
+exports[`Documentation helpers depictDate should throw clear error 1 1`] = `[OpenAPIError: Using z.date() within input schema is forbidden. Please use z.dateIn() instead. Check out the documentation for details.]`;
 
-exports[`Open API helpers depictDateIn should set type:string, pattern and format 1`] = `
+exports[`Documentation helpers depictDateIn should set type:string, pattern and format 1`] = `
 {
   "description": "YYYY-MM-DDTHH:mm:ss.sssZ",
   "externalDocs": {
@@ -57,9 +57,9 @@ exports[`Open API helpers depictDateIn should set type:string, pattern and forma
 }
 `;
 
-exports[`Open API helpers depictDateIn should throw when ZodDateIn in response 1`] = `[OpenAPIError: Please use z.dateOut() for output.]`;
+exports[`Documentation helpers depictDateIn should throw when ZodDateIn in response 1`] = `[OpenAPIError: Please use z.dateOut() for output.]`;
 
-exports[`Open API helpers depictDateOut should set type:string, description and format 1`] = `
+exports[`Documentation helpers depictDateOut should set type:string, description and format 1`] = `
 {
   "description": "YYYY-MM-DDTHH:mm:ss.sssZ",
   "externalDocs": {
@@ -70,16 +70,16 @@ exports[`Open API helpers depictDateOut should set type:string, description and
 }
 `;
 
-exports[`Open API helpers depictDateOut should throw when ZodDateOut in request 1`] = `[OpenAPIError: Please use z.dateIn() for input.]`;
+exports[`Documentation helpers depictDateOut should throw when ZodDateOut in request 1`] = `[OpenAPIError: Please use z.dateIn() for input.]`;
 
-exports[`Open API helpers depictDefault() should set default property 1`] = `
+exports[`Documentation helpers depictDefault() should set default property 1`] = `
 {
   "default": true,
   "type": "boolean",
 }
 `;
 
-exports[`Open API helpers depictDiscriminatedUnion() should wrap next depicters in oneOf prop and set discriminator prop 1`] = `
+exports[`Documentation helpers depictDiscriminatedUnion() should wrap next depicters in oneOf prop and set discriminator prop 1`] = `
 {
   "discriminator": {
     "propertyName": "status",
@@ -132,13 +132,13 @@ exports[`Open API helpers depictDiscriminatedUnion() should wrap next depicters
 }
 `;
 
-exports[`Open API helpers depictEffect() should depict as number (out) 1`] = `
+exports[`Documentation helpers depictEffect() should depict as number (out) 1`] = `
 {
   "type": "number",
 }
 `;
 
-exports[`Open API helpers depictEffect() should depict as object (refinement) 1`] = `
+exports[`Documentation helpers depictEffect() should depict as object (refinement) 1`] = `
 {
   "properties": {
     "s": {
@@ -152,31 +152,31 @@ exports[`Open API helpers depictEffect() should depict as object (refinement) 1`
 }
 `;
 
-exports[`Open API helpers depictEffect() should depict as string (in) 1`] = `
+exports[`Documentation helpers depictEffect() should depict as string (in) 1`] = `
 {
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictEffect() should depict as string (preprocess) 1`] = `
+exports[`Documentation helpers depictEffect() should depict as string (preprocess) 1`] = `
 {
   "format": "string (preprocessed)",
 }
 `;
 
-exports[`Open API helpers depictEffect() should handle edge cases 1`] = `
+exports[`Documentation helpers depictEffect() should handle edge cases 1`] = `
 {
   "format": "any",
 }
 `;
 
-exports[`Open API helpers depictEffect() should handle edge cases 2`] = `
+exports[`Documentation helpers depictEffect() should handle edge cases 2`] = `
 {
   "format": "any",
 }
 `;
 
-exports[`Open API helpers depictEnum() should set type and enum properties 1`] = `
+exports[`Documentation helpers depictEnum() should set type and enum properties 1`] = `
 {
   "enum": [
     "one",
@@ -186,7 +186,7 @@ exports[`Open API helpers depictEnum() should set type and enum properties 1`] =
 }
 `;
 
-exports[`Open API helpers depictEnum() should set type and enum properties 2`] = `
+exports[`Documentation helpers depictEnum() should set type and enum properties 2`] = `
 {
   "enum": [
     "ONE",
@@ -196,7 +196,7 @@ exports[`Open API helpers depictEnum() should set type and enum properties 2`] =
 }
 `;
 
-exports[`Open API helpers depictExamples() should pass examples in case of request 1`] = `
+exports[`Documentation helpers depictExamples() should pass examples in case of request 1`] = `
 {
   "examples": {
     "example1": {
@@ -215,7 +215,7 @@ exports[`Open API helpers depictExamples() should pass examples in case of reque
 }
 `;
 
-exports[`Open API helpers depictExamples() should transform examples in case of response 1`] = `
+exports[`Documentation helpers depictExamples() should transform examples in case of response 1`] = `
 {
   "examples": {
     "example1": {
@@ -234,30 +234,30 @@ exports[`Open API helpers depictExamples() should transform examples in case of
 }
 `;
 
-exports[`Open API helpers depictFile() should set type:string and format accordingly 0 1`] = `
+exports[`Documentation helpers depictFile() should set type:string and format accordingly 0 1`] = `
 {
   "format": "file",
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictFile() should set type:string and format accordingly 1 1`] = `
+exports[`Documentation helpers depictFile() should set type:string and format accordingly 1 1`] = `
 {
   "format": "binary",
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictFile() should set type:string and format accordingly 2 1`] = `
+exports[`Documentation helpers depictFile() should set type:string and format accordingly 2 1`] = `
 {
   "format": "byte",
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictFile() should throw when using in input 1`] = `[OpenAPIError: Please use z.file() only within ResultHandler.]`;
+exports[`Documentation helpers depictFile() should throw when using in input 1`] = `[OpenAPIError: Please use z.file() only within ResultHandler.]`;
 
-exports[`Open API helpers depictIntersection() should wrap next depicters in allOf property 1`] = `
+exports[`Documentation helpers depictIntersection() should wrap next depicters in allOf property 1`] = `
 {
   "allOf": [
     {
@@ -296,13 +296,13 @@ exports[`Open API helpers depictIntersection() should wrap next depicters in all
 }
 `;
 
-exports[`Open API helpers depictLazy should handle circular references 0 1`] = `
+exports[`Documentation helpers depictLazy should handle circular references 0 1`] = `
 {
   "$ref": "#/components/schemas/6cbbd837811754902ea1e68d3e5c75e36250b880",
 }
 `;
 
-exports[`Open API helpers depictLazy should handle circular references 0 2`] = `
+exports[`Documentation helpers depictLazy should handle circular references 0 2`] = `
 {
   "items": {
     "$ref": "#/components/schemas/6cbbd837811754902ea1e68d3e5c75e36250b880",
@@ -311,25 +311,25 @@ exports[`Open API helpers depictLazy should handle circular references 0 2`] = `
 }
 `;
 
-exports[`Open API helpers depictLazy should handle circular references 1 1`] = `
+exports[`Documentation helpers depictLazy should handle circular references 1 1`] = `
 {
   "$ref": "#/components/schemas/7a225c55e65ab4a2fd3ce390265b255ee6747049",
 }
 `;
 
-exports[`Open API helpers depictLazy should handle circular references 1 2`] = `
+exports[`Documentation helpers depictLazy should handle circular references 1 2`] = `
 {
   "$ref": "#/components/schemas/7a225c55e65ab4a2fd3ce390265b255ee6747049",
 }
 `;
 
-exports[`Open API helpers depictLazy should handle circular references 2 1`] = `
+exports[`Documentation helpers depictLazy should handle circular references 2 1`] = `
 {
   "$ref": "#/components/schemas/118cb3b11b8a1f3b6b1e60a89f96a8be9da32a0f",
 }
 `;
 
-exports[`Open API helpers depictLazy should handle circular references 2 2`] = `
+exports[`Documentation helpers depictLazy should handle circular references 2 2`] = `
 {
   "properties": {
     "prop": {
@@ -343,7 +343,7 @@ exports[`Open API helpers depictLazy should handle circular references 2 2`] = `
 }
 `;
 
-exports[`Open API helpers depictLiteral() should set type and involve enum property 1`] = `
+exports[`Documentation helpers depictLiteral() should set type and involve enum property 1`] = `
 {
   "enum": [
     "testing",
@@ -352,7 +352,7 @@ exports[`Open API helpers depictLiteral() should set type and involve enum prope
 }
 `;
 
-exports[`Open API helpers depictNull() should set type:string format:null and nullable:true props 1`] = `
+exports[`Documentation helpers depictNull() should set type:string format:null and nullable:true props 1`] = `
 {
   "format": "null",
   "nullable": true,
@@ -360,21 +360,21 @@ exports[`Open API helpers depictNull() should set type:string format:null and nu
 }
 `;
 
-exports[`Open API helpers depictNullable() should set nullable:true 0 1`] = `
+exports[`Documentation helpers depictNullable() should set nullable:true 0 1`] = `
 {
   "nullable": true,
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictNullable() should set nullable:true 1 1`] = `
+exports[`Documentation helpers depictNullable() should set nullable:true 1 1`] = `
 {
   "nullable": true,
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictNumber() should type:number, min/max, format and exclusiveness props 1`] = `
+exports[`Documentation helpers depictNumber() should type:number, min/max, format and exclusiveness props 1`] = `
 {
   "exclusiveMaximum": false,
   "exclusiveMinimum": false,
@@ -385,7 +385,7 @@ exports[`Open API helpers depictNumber() should type:number, min/max, format and
 }
 `;
 
-exports[`Open API helpers depictNumber() should type:number, min/max, format and exclusiveness props 2`] = `
+exports[`Documentation helpers depictNumber() should type:number, min/max, format and exclusiveness props 2`] = `
 {
   "exclusiveMaximum": false,
   "exclusiveMinimum": false,
@@ -396,7 +396,7 @@ exports[`Open API helpers depictNumber() should type:number, min/max, format and
 }
 `;
 
-exports[`Open API helpers depictObject() Bug #758 1`] = `
+exports[`Documentation helpers depictObject() Bug #758 1`] = `
 {
   "properties": {
     "a": {
@@ -418,7 +418,7 @@ exports[`Open API helpers depictObject() Bug #758 1`] = `
 }
 `;
 
-exports[`Open API helpers depictObject() should type:object, properties and required props 0 1`] = `
+exports[`Documentation helpers depictObject() should type:object, properties and required props 0 1`] = `
 {
   "properties": {
     "a": {
@@ -441,7 +441,7 @@ exports[`Open API helpers depictObject() should type:object, properties and requ
 }
 `;
 
-exports[`Open API helpers depictObject() should type:object, properties and required props 1 1`] = `
+exports[`Documentation helpers depictObject() should type:object, properties and required props 1 1`] = `
 {
   "properties": {
     "a": {
@@ -464,7 +464,7 @@ exports[`Open API helpers depictObject() should type:object, properties and requ
 }
 `;
 
-exports[`Open API helpers depictObject() should type:object, properties and required props 2 1`] = `
+exports[`Documentation helpers depictObject() should type:object, properties and required props 2 1`] = `
 {
   "properties": {
     "a": {
@@ -487,7 +487,7 @@ exports[`Open API helpers depictObject() should type:object, properties and requ
 }
 `;
 
-exports[`Open API helpers depictObject() should type:object, properties and required props 3 1`] = `
+exports[`Documentation helpers depictObject() should type:object, properties and required props 3 1`] = `
 {
   "properties": {
     "a": {
@@ -509,7 +509,7 @@ exports[`Open API helpers depictObject() should type:object, properties and requ
 }
 `;
 
-exports[`Open API helpers depictObject() should type:object, properties and required props 4 1`] = `
+exports[`Documentation helpers depictObject() should type:object, properties and required props 4 1`] = `
 {
   "properties": {
     "a": {
@@ -529,7 +529,7 @@ exports[`Open API helpers depictObject() should type:object, properties and requ
 }
 `;
 
-exports[`Open API helpers depictObjectProperties() should wrap next depicters in a shape of object 1`] = `
+exports[`Documentation helpers depictObjectProperties() should wrap next depicters in a shape of object 1`] = `
 {
   "one": {
     "type": "string",
@@ -540,19 +540,19 @@ exports[`Open API helpers depictObjectProperties() should wrap next depicters in
 }
 `;
 
-exports[`Open API helpers depictOptional() should pass the next depicter 0 1`] = `
+exports[`Documentation helpers depictOptional() should pass the next depicter 0 1`] = `
 {
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictOptional() should pass the next depicter 1 1`] = `
+exports[`Documentation helpers depictOptional() should pass the next depicter 1 1`] = `
 {
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictParamExamples() should pass examples in case of request 1`] = `
+exports[`Documentation helpers depictParamExamples() should pass examples in case of request 1`] = `
 {
   "examples": {
     "example1": {
@@ -565,7 +565,7 @@ exports[`Open API helpers depictParamExamples() should pass examples in case of
 }
 `;
 
-exports[`Open API helpers depictParamExamples() should transform examples in case of response 1`] = `
+exports[`Documentation helpers depictParamExamples() should transform examples in case of response 1`] = `
 {
   "examples": {
     "example1": {
@@ -578,19 +578,19 @@ exports[`Open API helpers depictParamExamples() should transform examples in cas
 }
 `;
 
-exports[`Open API helpers depictPipeline should depict as boolean (out) 1`] = `
+exports[`Documentation helpers depictPipeline should depict as boolean (out) 1`] = `
 {
   "type": "boolean",
 }
 `;
 
-exports[`Open API helpers depictPipeline should depict as string (in) 1`] = `
+exports[`Documentation helpers depictPipeline should depict as string (in) 1`] = `
 {
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictRecord() should set properties+required or additionalProperties props 0 1`] = `
+exports[`Documentation helpers depictRecord() should set properties+required or additionalProperties props 0 1`] = `
 {
   "additionalProperties": {
     "type": "boolean",
@@ -599,7 +599,7 @@ exports[`Open API helpers depictRecord() should set properties+required or addit
 }
 `;
 
-exports[`Open API helpers depictRecord() should set properties+required or additionalProperties props 1 1`] = `
+exports[`Documentation helpers depictRecord() should set properties+required or additionalProperties props 1 1`] = `
 {
   "additionalProperties": {
     "type": "boolean",
@@ -608,7 +608,7 @@ exports[`Open API helpers depictRecord() should set properties+required or addit
 }
 `;
 
-exports[`Open API helpers depictRecord() should set properties+required or additionalProperties props 2 1`] = `
+exports[`Documentation helpers depictRecord() should set properties+required or additionalProperties props 2 1`] = `
 {
   "properties": {
     "one": {
@@ -626,7 +626,7 @@ exports[`Open API helpers depictRecord() should set properties+required or addit
 }
 `;
 
-exports[`Open API helpers depictRecord() should set properties+required or additionalProperties props 3 1`] = `
+exports[`Documentation helpers depictRecord() should set properties+required or additionalProperties props 3 1`] = `
 {
   "properties": {
     "testing": {
@@ -640,7 +640,7 @@ exports[`Open API helpers depictRecord() should set properties+required or addit
 }
 `;
 
-exports[`Open API helpers depictRecord() should set properties+required or additionalProperties props 4 1`] = `
+exports[`Documentation helpers depictRecord() should set properties+required or additionalProperties props 4 1`] = `
 {
   "properties": {
     "one": {
@@ -658,7 +658,7 @@ exports[`Open API helpers depictRecord() should set properties+required or addit
 }
 `;
 
-exports[`Open API helpers depictRecord() should set properties+required or additionalProperties props 5 1`] = `
+exports[`Documentation helpers depictRecord() should set properties+required or additionalProperties props 5 1`] = `
 {
   "additionalProperties": {
     "format": "any",
@@ -667,9 +667,9 @@ exports[`Open API helpers depictRecord() should set properties+required or addit
 }
 `;
 
-exports[`Open API helpers depictRequestParams() should depict none if both query and params are disabled 1`] = `[]`;
+exports[`Documentation helpers depictRequestParams() should depict none if both query and params are disabled 1`] = `[]`;
 
-exports[`Open API helpers depictRequestParams() should depict only path params if query is disabled 1`] = `
+exports[`Documentation helpers depictRequestParams() should depict only path params if query is disabled 1`] = `
 [
   {
     "description": "GET /v1/user/:id parameter",
@@ -683,7 +683,7 @@ exports[`Open API helpers depictRequestParams() should depict only path params i
 ]
 `;
 
-exports[`Open API helpers depictRequestParams() should depict query and path params 1`] = `
+exports[`Documentation helpers depictRequestParams() should depict query and path params 1`] = `
 [
   {
     "description": "GET /v1/user/:id parameter",
@@ -706,7 +706,7 @@ exports[`Open API helpers depictRequestParams() should depict query and path par
 ]
 `;
 
-exports[`Open API helpers depictSecurity() should depict OAuth2 Security with flows 1`] = `
+exports[`Documentation helpers depictSecurity() should depict OAuth2 Security with flows 1`] = `
 {
   "flows": {
     "authorizationCode": {
@@ -747,7 +747,7 @@ exports[`Open API helpers depictSecurity() should depict OAuth2 Security with fl
 }
 `;
 
-exports[`Open API helpers depictSecurity() should handle Basic, Bearer and CustomHeader Securities 1`] = `
+exports[`Documentation helpers depictSecurity() should handle Basic, Bearer and CustomHeader Securities 1`] = `
 {
   "or": [
     {
@@ -771,7 +771,7 @@ exports[`Open API helpers depictSecurity() should handle Basic, Bearer and Custo
 }
 `;
 
-exports[`Open API helpers depictSecurity() should handle Input and Cookie Securities 1`] = `
+exports[`Documentation helpers depictSecurity() should handle Input and Cookie Securities 1`] = `
 {
   "and": [
     {
@@ -792,7 +792,7 @@ exports[`Open API helpers depictSecurity() should handle Input and Cookie Securi
 }
 `;
 
-exports[`Open API helpers depictSecurity() should handle OpenID and OAuth2 Securities 1`] = `
+exports[`Documentation helpers depictSecurity() should handle OpenID and OAuth2 Securities 1`] = `
 {
   "or": [
     {
@@ -807,14 +807,14 @@ exports[`Open API helpers depictSecurity() should handle OpenID and OAuth2 Secur
 }
 `;
 
-exports[`Open API helpers depictSecurity() should handle undefined flows 1`] = `
+exports[`Documentation helpers depictSecurity() should handle undefined flows 1`] = `
 {
   "flows": {},
   "type": "oauth2",
 }
 `;
 
-exports[`Open API helpers depictSecurityRefs() should handle LogicalAnd 1`] = `
+exports[`Documentation helpers depictSecurityRefs() should handle LogicalAnd 1`] = `
 [
   {
     "A": [],
@@ -824,7 +824,7 @@ exports[`Open API helpers depictSecurityRefs() should handle LogicalAnd 1`] = `
 ]
 `;
 
-exports[`Open API helpers depictSecurityRefs() should handle LogicalAnd 2`] = `
+exports[`Documentation helpers depictSecurityRefs() should handle LogicalAnd 2`] = `
 [
   {
     "A": [],
@@ -837,7 +837,7 @@ exports[`Open API helpers depictSecurityRefs() should handle LogicalAnd 2`] = `
 ]
 `;
 
-exports[`Open API helpers depictSecurityRefs() should handle LogicalOr 1`] = `
+exports[`Documentation helpers depictSecurityRefs() should handle LogicalOr 1`] = `
 [
   {
     "A": [],
@@ -851,7 +851,7 @@ exports[`Open API helpers depictSecurityRefs() should handle LogicalOr 1`] = `
 ]
 `;
 
-exports[`Open API helpers depictSecurityRefs() should handle LogicalOr 2`] = `
+exports[`Documentation helpers depictSecurityRefs() should handle LogicalOr 2`] = `
 [
   {
     "A": [],
@@ -863,7 +863,7 @@ exports[`Open API helpers depictSecurityRefs() should handle LogicalOr 2`] = `
 ]
 `;
 
-exports[`Open API helpers depictSecurityRefs() should handle the plain value 1`] = `
+exports[`Documentation helpers depictSecurityRefs() should handle the plain value 1`] = `
 [
   {
     "A": [],
@@ -871,7 +871,7 @@ exports[`Open API helpers depictSecurityRefs() should handle the plain value 1`]
 ]
 `;
 
-exports[`Open API helpers depictSecurityRefs() should populate the scopes 1`] = `
+exports[`Documentation helpers depictSecurityRefs() should populate the scopes 1`] = `
 [
   {
     "A": [
@@ -892,7 +892,7 @@ exports[`Open API helpers depictSecurityRefs() should populate the scopes 1`] =
 ]
 `;
 
-exports[`Open API helpers depictString() should set format, pattern and min/maxLength props 0 1`] = `
+exports[`Documentation helpers depictString() should set format, pattern and min/maxLength props 0 1`] = `
 {
   "format": "email",
   "maxLength": 20,
@@ -901,28 +901,28 @@ exports[`Open API helpers depictString() should set format, pattern and min/maxL
 }
 `;
 
-exports[`Open API helpers depictString() should set format, pattern and min/maxLength props 1 1`] = `
+exports[`Documentation helpers depictString() should set format, pattern and min/maxLength props 1 1`] = `
 {
   "format": "url",
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictString() should set format, pattern and min/maxLength props 2 1`] = `
+exports[`Documentation helpers depictString() should set format, pattern and min/maxLength props 2 1`] = `
 {
   "format": "uuid",
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictString() should set format, pattern and min/maxLength props 3 1`] = `
+exports[`Documentation helpers depictString() should set format, pattern and min/maxLength props 3 1`] = `
 {
   "format": "cuid",
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictString() should set format, pattern and min/maxLength props 4 1`] = `
+exports[`Documentation helpers depictString() should set format, pattern and min/maxLength props 4 1`] = `
 {
   "format": "date-time",
   "pattern": "/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$/",
@@ -930,7 +930,7 @@ exports[`Open API helpers depictString() should set format, pattern and min/maxL
 }
 `;
 
-exports[`Open API helpers depictString() should set format, pattern and min/maxLength props 5 1`] = `
+exports[`Documentation helpers depictString() should set format, pattern and min/maxLength props 5 1`] = `
 {
   "format": "date-time",
   "pattern": "/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}:\\d{2})|Z)$/",
@@ -938,20 +938,20 @@ exports[`Open API helpers depictString() should set format, pattern and min/maxL
 }
 `;
 
-exports[`Open API helpers depictString() should set format, pattern and min/maxLength props 6 1`] = `
+exports[`Documentation helpers depictString() should set format, pattern and min/maxLength props 6 1`] = `
 {
   "pattern": "/^\\d+.\\d+.\\d+$/",
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictString() should set type:string 1`] = `
+exports[`Documentation helpers depictString() should set type:string 1`] = `
 {
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictTags() should accept objects with URLs 1`] = `
+exports[`Documentation helpers depictTags() should accept objects with URLs 1`] = `
 [
   {
     "description": "Everything about users",
@@ -967,7 +967,7 @@ exports[`Open API helpers depictTags() should accept objects with URLs 1`] = `
 ]
 `;
 
-exports[`Open API helpers depictTags() should accept plain descriptions 1`] = `
+exports[`Documentation helpers depictTags() should accept plain descriptions 1`] = `
 [
   {
     "description": "Everything about users",
@@ -980,7 +980,7 @@ exports[`Open API helpers depictTags() should accept plain descriptions 1`] = `
 ]
 `;
 
-exports[`Open API helpers depictTuple() should set type:array, max- and minLength, oneOf, format:tuple and description 1`] = `
+exports[`Documentation helpers depictTuple() should set type:array, max- and minLength, oneOf, format:tuple and description 1`] = `
 {
   "items": {
     "description": "0: boolean, 1: string, 2: string",
@@ -1006,7 +1006,7 @@ exports[`Open API helpers depictTuple() should set type:array, max- and minLengt
 }
 `;
 
-exports[`Open API helpers depictUnion() should wrap next depicters into oneOf property 1`] = `
+exports[`Documentation helpers depictUnion() should wrap next depicters into oneOf property 1`] = `
 {
   "oneOf": [
     {
@@ -1024,29 +1024,29 @@ exports[`Open API helpers depictUnion() should wrap next depicters into oneOf pr
 }
 `;
 
-exports[`Open API helpers depictUpload() should set format:binary and type:string 1`] = `
+exports[`Documentation helpers depictUpload() should set format:binary and type:string 1`] = `
 {
   "format": "binary",
   "type": "string",
 }
 `;
 
-exports[`Open API helpers depictUpload() should throw when using in response 1`] = `[OpenAPIError: Please use z.upload() only for input.]`;
+exports[`Documentation helpers depictUpload() should throw when using in response 1`] = `[OpenAPIError: Please use z.upload() only for input.]`;
 
-exports[`Open API helpers excludeExampleFromDepiction() should remove example property of supplied object 1`] = `
+exports[`Documentation helpers excludeExampleFromDepiction() should remove example property of supplied object 1`] = `
 {
   "description": "test",
   "type": "string",
 }
 `;
 
-exports[`Open API helpers excludeParamsFromDepiction() should handle the ReferenceObject 1`] = `
+exports[`Documentation helpers excludeParamsFromDepiction() should handle the ReferenceObject 1`] = `
 {
   "$ref": "test",
 }
 `;
 
-exports[`Open API helpers excludeParamsFromDepiction() should omit specified path params 0 1`] = `
+exports[`Documentation helpers excludeParamsFromDepiction() should omit specified path params 0 1`] = `
 {
   "properties": {
     "b": {
@@ -1060,7 +1060,7 @@ exports[`Open API helpers excludeParamsFromDepiction() should omit specified pat
 }
 `;
 
-exports[`Open API helpers excludeParamsFromDepiction() should omit specified path params 1 1`] = `
+exports[`Documentation helpers excludeParamsFromDepiction() should omit specified path params 1 1`] = `
 {
   "oneOf": [
     {
@@ -1083,7 +1083,7 @@ exports[`Open API helpers excludeParamsFromDepiction() should omit specified pat
 }
 `;
 
-exports[`Open API helpers excludeParamsFromDepiction() should omit specified path params 2 1`] = `
+exports[`Documentation helpers excludeParamsFromDepiction() should omit specified path params 2 1`] = `
 {
   "allOf": [
     {
@@ -1106,7 +1106,7 @@ exports[`Open API helpers excludeParamsFromDepiction() should omit specified pat
 }
 `;
 
-exports[`Open API helpers extractObjectSchema() Feature #600: Top level refinements should handle refined object schema 1`] = `
+exports[`Documentation helpers extractObjectSchema() Feature #600: Top level refinements should handle refined object schema 1`] = `
 {
   "_type": "ZodObject",
   "shape": {
@@ -1117,7 +1117,7 @@ exports[`Open API helpers extractObjectSchema() Feature #600: Top level refineme
 }
 `;
 
-exports[`Open API helpers extractObjectSchema() should pass the object schema through 1`] = `
+exports[`Documentation helpers extractObjectSchema() should pass the object schema through 1`] = `
 {
   "_type": "ZodObject",
   "shape": {
@@ -1128,7 +1128,7 @@ exports[`Open API helpers extractObjectSchema() should pass the object schema th
 }
 `;
 
-exports[`Open API helpers extractObjectSchema() should return object schema for the intersection of object schemas 1`] = `
+exports[`Documentation helpers extractObjectSchema() should return object schema for the intersection of object schemas 1`] = `
 {
   "_type": "ZodObject",
   "shape": {
@@ -1142,7 +1142,7 @@ exports[`Open API helpers extractObjectSchema() should return object schema for
 }
 `;
 
-exports[`Open API helpers extractObjectSchema() should return object schema for the union of object schemas 1`] = `
+exports[`Documentation helpers extractObjectSchema() should return object schema for the union of object schemas 1`] = `
 {
   "_type": "ZodObject",
   "shape": {
diff --git a/tests/unit/__snapshots__/open-api.spec.ts.snap b/tests/unit/__snapshots__/documentation.spec.ts.snap
similarity index 97%
rename from tests/unit/__snapshots__/open-api.spec.ts.snap
rename to tests/unit/__snapshots__/documentation.spec.ts.snap
index 6db37c8b..f8012d78 100644
--- a/tests/unit/__snapshots__/open-api.spec.ts.snap
+++ b/tests/unit/__snapshots__/documentation.spec.ts.snap
@@ -1,6 +1,6 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
-exports[`Open API generator Issue #98 Should describe non-empty array 1`] = `
+exports[`Documentation generator Issue #98 Should describe non-empty array 1`] = `
 "openapi: 3.0.0
 info:
   title: "Testing issue #98"
@@ -155,7 +155,7 @@ servers:
 "
 `;
 
-exports[`Open API generator Issue #98 should union schemas 1`] = `
+exports[`Documentation generator Issue #98 should union schemas 1`] = `
 "openapi: 3.0.0
 info:
   title: "Testing issue #98"
@@ -266,7 +266,7 @@ servers:
 "
 `;
 
-exports[`Open API generator Metadata Issue #827: withMeta() should be immutable 1`] = `
+exports[`Documentation generator Metadata Issue #827: withMeta() should be immutable 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Metadata:example on IO parameter
@@ -374,7 +374,7 @@ servers:
 "
 `;
 
-exports[`Open API generator Metadata Issue #929: the location of the custom description should be on the param level 1`] = `
+exports[`Documentation generator Metadata Issue #929: the location of the custom description should be on the param level 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Metadata:description
@@ -460,7 +460,7 @@ servers:
 "
 `;
 
-exports[`Open API generator Metadata should merge endpoint handler examples with its middleware examples 1`] = `
+exports[`Documentation generator Metadata should merge endpoint handler examples with its middleware examples 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Metadata:example on IO schema + middleware
@@ -574,7 +574,7 @@ servers:
 "
 `;
 
-exports[`Open API generator Metadata should pass over examples of each param from the whole IO schema examples (GET) 1`] = `
+exports[`Documentation generator Metadata should pass over examples of each param from the whole IO schema examples (GET) 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Metadata:example on IO schema
@@ -666,7 +666,7 @@ servers:
 "
 `;
 
-exports[`Open API generator Metadata should pass over examples of the whole IO schema (POST) 1`] = `
+exports[`Documentation generator Metadata should pass over examples of the whole IO schema (POST) 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Metadata:example on IO schema
@@ -763,7 +763,7 @@ servers:
 "
 `;
 
-exports[`Open API generator Metadata should pass over the example of an individual parameter 1`] = `
+exports[`Documentation generator Metadata should pass over the example of an individual parameter 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Metadata:example on IO parameter
@@ -846,7 +846,7 @@ servers:
 "
 `;
 
-exports[`Open API generator Metadata should pass over the schema description 1`] = `
+exports[`Documentation generator Metadata should pass over the schema description 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Metadata:description
@@ -934,7 +934,7 @@ servers:
 "
 `;
 
-exports[`Open API generator Route Path Params should handle route path params for GET request 1`] = `
+exports[`Documentation generator Route Path Params should handle route path params for GET request 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing route path params
@@ -1023,7 +1023,7 @@ servers:
 "
 `;
 
-exports[`Open API generator Route Path Params should handle route path params for POST request 1`] = `
+exports[`Documentation generator Route Path Params should handle route path params for POST request 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing route path params
@@ -1117,7 +1117,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should ensure the uniq operation ids 1`] = `
+exports[`Documentation generator getSpecAsYaml() should ensure the uniq operation ids 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Operation IDs
@@ -1239,7 +1239,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should ensure uniq security schema names 1`] = `
+exports[`Documentation generator getSpecAsYaml() should ensure uniq security schema names 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Security
@@ -1475,7 +1475,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should generate the correct schema for DELETE request without body 1`] = `
+exports[`Documentation generator getSpecAsYaml() should generate the correct schema for DELETE request without body 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing DELETE request without body
@@ -1554,7 +1554,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should generate the correct schema for complex types 1`] = `
+exports[`Documentation generator getSpecAsYaml() should generate the correct schema for complex types 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Complex Types
@@ -1668,7 +1668,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should generate the correct schema for discriminated union type 1`] = `
+exports[`Documentation generator getSpecAsYaml() should generate the correct schema for discriminated union type 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Discriminated Union Type
@@ -1795,7 +1795,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should generate the correct schema for intersection type 1`] = `
+exports[`Documentation generator getSpecAsYaml() should generate the correct schema for intersection type 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Intersection and And types
@@ -1909,7 +1909,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should generate the correct schema for nullable and optional types 1`] = `
+exports[`Documentation generator getSpecAsYaml() should generate the correct schema for nullable and optional types 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Nullable and Optional Types
@@ -2018,7 +2018,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should generate the correct schema for union type 1`] = `
+exports[`Documentation generator getSpecAsYaml() should generate the correct schema for union type 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Union and Or Types
@@ -2138,7 +2138,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should generate the correct schema of example routing 0 1`] = `
+exports[`Documentation generator getSpecAsYaml() should generate the correct schema of example routing 0 1`] = `
 "openapi: 3.0.0
 info:
   title: Example API
@@ -2539,7 +2539,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should generate the correct schema of example routing 1 1`] = `
+exports[`Documentation generator getSpecAsYaml() should generate the correct schema of example routing 1 1`] = `
 "openapi: 3.0.0
 info:
   title: Example API
@@ -2972,7 +2972,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should handle bigint, boolean, date and null 1`] = `
+exports[`Documentation generator getSpecAsYaml() should handle bigint, boolean, date and null 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing additional types
@@ -3078,7 +3078,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should handle circular schemas via z.lazy() 1`] = `
+exports[`Documentation generator getSpecAsYaml() should handle circular schemas via z.lazy() 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Lazy
@@ -3183,7 +3183,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should handle custom mime types and status codes 1`] = `
+exports[`Documentation generator getSpecAsYaml() should handle custom mime types and status codes 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing MIME types and status codes
@@ -3241,7 +3241,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should handle different number types 1`] = `
+exports[`Documentation generator getSpecAsYaml() should handle different number types 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing numbers
@@ -3395,7 +3395,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should handle different string types 1`] = `
+exports[`Documentation generator getSpecAsYaml() should handle different string types 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing strings
@@ -3537,7 +3537,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should handle enum types 1`] = `
+exports[`Documentation generator getSpecAsYaml() should handle enum types 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing enums
@@ -3628,7 +3628,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should handle record 1`] = `
+exports[`Documentation generator getSpecAsYaml() should handle record 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing record
@@ -3756,7 +3756,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should handle transformation schema in output 1`] = `
+exports[`Documentation generator getSpecAsYaml() should handle transformation schema in output 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing Transformation in response schema
@@ -3849,7 +3849,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should handle tuples 1`] = `
+exports[`Documentation generator getSpecAsYaml() should handle tuples 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing tuples
@@ -3975,7 +3975,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should handle type any 1`] = `
+exports[`Documentation generator getSpecAsYaml() should handle type any 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing type any
@@ -4054,7 +4054,7 @@ servers:
 "
 `;
 
-exports[`Open API generator generateOpenApi() should handle z.preprocess() 1`] = `
+exports[`Documentation generator getSpecAsYaml() should handle z.preprocess() 1`] = `
 "openapi: 3.0.0
 info:
   title: Testing z.preprocess()
diff --git a/tests/unit/__snapshots__/index.spec.ts.snap b/tests/unit/__snapshots__/index.spec.ts.snap
index 601dc959..b6ac3365 100644
--- a/tests/unit/__snapshots__/index.spec.ts.snap
+++ b/tests/unit/__snapshots__/index.spec.ts.snap
@@ -8,10 +8,14 @@ exports[`Index Entrypoint exports DependsOnMethod should have certain value 1`]
 
 exports[`Index Entrypoint exports DependsOnMethodError should have certain value 1`] = `[Function]`;
 
+exports[`Index Entrypoint exports Documentation should have certain value 1`] = `[Function]`;
+
 exports[`Index Entrypoint exports EndpointsFactory should have certain value 1`] = `[Function]`;
 
 exports[`Index Entrypoint exports InputValidationError should have certain value 1`] = `[Function]`;
 
+exports[`Index Entrypoint exports Integration should have certain value 1`] = `[Function]`;
+
 exports[`Index Entrypoint exports OpenAPI should have certain value 1`] = `[Function]`;
 
 exports[`Index Entrypoint exports OpenAPIError should have certain value 1`] = `[Function]`;
@@ -90,6 +94,7 @@ exports[`Index Entrypoint exports should have certain entities exposed 1`] = `
   "Routing",
   "createServer",
   "attachRouting",
+  "Documentation",
   "OpenAPI",
   "OpenAPIError",
   "DependsOnMethodError",
@@ -98,6 +103,7 @@ exports[`Index Entrypoint exports should have certain entities exposed 1`] = `
   "InputValidationError",
   "withMeta",
   "testEndpoint",
+  "Integration",
   "Client",
   "ez",
   "createHttpError",
diff --git a/tests/unit/__snapshots__/client.spec.ts.snap b/tests/unit/__snapshots__/integration.spec.ts.snap
similarity index 96%
rename from tests/unit/__snapshots__/client.spec.ts.snap
rename to tests/unit/__snapshots__/integration.spec.ts.snap
index 7c2dd66d..013a6a17 100644
--- a/tests/unit/__snapshots__/client.spec.ts.snap
+++ b/tests/unit/__snapshots__/integration.spec.ts.snap
@@ -1,6 +1,6 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
-exports[`API Client Generator Feature #945: should have configurable treatment of optionals 0 1`] = `
+exports[`API Integration Generator Feature #945: should have configurable treatment of optionals 0 1`] = `
 "type PostV1TestWithDashesInput = {
     opt?: string;
 };
@@ -65,7 +65,7 @@ export class ExpressZodAPIClient {
 }"
 `;
 
-exports[`API Client Generator Feature #945: should have configurable treatment of optionals 1 1`] = `
+exports[`API Integration Generator Feature #945: should have configurable treatment of optionals 1 1`] = `
 "type PostV1TestWithDashesInput = {
     opt: string | undefined;
 };
@@ -130,7 +130,7 @@ export class ExpressZodAPIClient {
 }"
 `;
 
-exports[`API Client Generator Feature #945: should have configurable treatment of optionals 2 1`] = `
+exports[`API Integration Generator Feature #945: should have configurable treatment of optionals 2 1`] = `
 "type PostV1TestWithDashesInput = {
     opt: string;
 };
@@ -195,7 +195,7 @@ export class ExpressZodAPIClient {
 }"
 `;
 
-exports[`API Client Generator Should generate a client for example API 1`] = `
+exports[`API Integration Generator Should generate a client for example API 1`] = `
 "type Type2048581c137c5b2130eb860e3ae37da196dfc25b = {
     title: string;
     features: Type2048581c137c5b2130eb860e3ae37da196dfc25b;
@@ -332,7 +332,7 @@ export class ExpressZodAPIClient {
 }"
 `;
 
-exports[`API Client Generator Should treat optionals the same way as z.infer() by default 1`] = `
+exports[`API Integration Generator Should treat optionals the same way as z.infer() by default 1`] = `
 "type PostV1TestWithDashesInput = {
     opt?: string | undefined;
 };
diff --git a/tests/unit/open-api-helpers.spec.ts b/tests/unit/documentation-helpers.spec.ts
similarity index 99%
rename from tests/unit/open-api-helpers.spec.ts
rename to tests/unit/documentation-helpers.spec.ts
index 86d575c8..acc16b5f 100644
--- a/tests/unit/open-api-helpers.spec.ts
+++ b/tests/unit/documentation-helpers.spec.ts
@@ -49,11 +49,11 @@ import {
   onEach,
   onMissing,
   reformatParamsInPath,
-} from "../../src/open-api-helpers";
+} from "../../src/documentation-helpers";
 import { SchemaHandler, walkSchema } from "../../src/schema-walker";
 import { serializeSchemaForTest } from "../helpers";
 
-describe("Open API helpers", () => {
+describe("Documentation helpers", () => {
   const getRefMock = jest.fn();
   const makeRefMock = jest.fn(
     (name: string, {}: SchemaObject | ReferenceObject): ReferenceObject => ({
diff --git a/tests/unit/open-api.spec.ts b/tests/unit/documentation.spec.ts
similarity index 96%
rename from tests/unit/open-api.spec.ts
rename to tests/unit/documentation.spec.ts
index b044e7dc..838359cb 100644
--- a/tests/unit/open-api.spec.ts
+++ b/tests/unit/documentation.spec.ts
@@ -1,8 +1,8 @@
 import { config as exampleConfig } from "../../example/config";
 import { routing } from "../../example/routing";
 import {
+  Documentation,
   EndpointsFactory,
-  OpenAPI,
   createConfig,
   createMiddleware,
   createResultHandler,
@@ -14,7 +14,7 @@ import { expectType } from "tsd";
 import { mimeJson } from "../../src/mime";
 import { z } from "zod";
 
-describe("Open API generator", () => {
+describe("Documentation generator", () => {
   const sampleConfig = createConfig({
     cors: true,
     logger: { level: "debug", color: true },
@@ -23,14 +23,14 @@ describe("Open API generator", () => {
     },
   });
 
-  describe("generateOpenApi()", () => {
+  describe("getSpecAsYaml()", () => {
     test.each([
       { composition: "inline" },
       { composition: "components" },
     ] as const)(
       "should generate the correct schema of example routing %#",
       ({ composition }) => {
-        const spec = new OpenAPI({
+        const spec = new Documentation({
           routing,
           config: exampleConfig,
           version: "1.2.3",
@@ -43,7 +43,7 @@ describe("Open API generator", () => {
     );
 
     test("should generate the correct schema for DELETE request without body", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         routing: {
           v1: {
             deleteSomething: defaultEndpointsFactory.build({
@@ -68,7 +68,7 @@ describe("Open API generator", () => {
 
     test("should generate the correct schema for complex types", () => {
       const literalValue = "something" as const;
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -98,7 +98,7 @@ describe("Open API generator", () => {
     });
 
     test("should generate the correct schema for nullable and optional types", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -127,7 +127,7 @@ describe("Open API generator", () => {
     });
 
     test("should generate the correct schema for intersection type", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -171,7 +171,7 @@ describe("Open API generator", () => {
     });
 
     test("should generate the correct schema for union type", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -206,7 +206,7 @@ describe("Open API generator", () => {
     });
 
     test("should generate the correct schema for discriminated union type", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -238,7 +238,7 @@ describe("Open API generator", () => {
     });
 
     test("should handle transformation schema in output", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -265,7 +265,7 @@ describe("Open API generator", () => {
     });
 
     test("should handle bigint, boolean, date and null", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -295,7 +295,7 @@ describe("Open API generator", () => {
     });
 
     test("should handle record", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -325,7 +325,7 @@ describe("Open API generator", () => {
     });
 
     test("should handle type any", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -349,7 +349,7 @@ describe("Open API generator", () => {
     });
 
     test("should handle different number types", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -381,7 +381,7 @@ describe("Open API generator", () => {
     });
 
     test("should handle different string types", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -423,7 +423,7 @@ describe("Open API generator", () => {
     });
 
     test("should handle tuples", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -453,7 +453,7 @@ describe("Open API generator", () => {
     });
 
     test("should handle enum types", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -485,7 +485,7 @@ describe("Open API generator", () => {
         z.number().int().nonnegative()
       );
       const boolean = z.preprocess((arg) => !!arg, z.boolean());
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -521,7 +521,7 @@ describe("Open API generator", () => {
       const categorySchema: z.ZodType<Category> = baseCategorySchema.extend({
         subcategories: z.lazy(() => categorySchema.array()),
       });
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -566,7 +566,7 @@ describe("Open API generator", () => {
       ].forEach((zodType) => {
         expect(
           () =>
-            new OpenAPI({
+            new Documentation({
               config: sampleConfig,
               routing: {
                 v1: {
@@ -621,7 +621,7 @@ describe("Open API generator", () => {
         input: z.object({}),
         middleware: jest.fn(),
       });
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -660,7 +660,7 @@ describe("Open API generator", () => {
     });
 
     test("should ensure the uniq operation ids", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -704,7 +704,7 @@ describe("Open API generator", () => {
         handler: () => {},
       });
       const factory = new EndpointsFactory(resultHandler);
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -729,7 +729,7 @@ describe("Open API generator", () => {
       // There is no such class as ZodNonEmptyArray in Zod v3.7.0+
       // It existed though in Zod v3.6.x:
       // @see https://github.com/colinhacks/zod/blob/v3.6.1/src/types.ts#L1204
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -764,7 +764,7 @@ describe("Open API generator", () => {
       expectType<TestingType>({ id: "string", field1: "string" });
       expectType<TestingType>({ id: "string", field2: "string" });
 
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -797,7 +797,7 @@ describe("Open API generator", () => {
 
   describe("Route Path Params", () => {
     test("should handle route path params for POST request", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -820,7 +820,7 @@ describe("Open API generator", () => {
     });
 
     test("should handle route path params for GET request", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -845,7 +845,7 @@ describe("Open API generator", () => {
 
   describe("Metadata", () => {
     test("should pass over the schema description", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -873,7 +873,7 @@ describe("Open API generator", () => {
     });
 
     test("Issue #929: the location of the custom description should be on the param level", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         composition: "components",
         config: sampleConfig,
         routing: {
@@ -902,7 +902,7 @@ describe("Open API generator", () => {
     });
 
     test("should pass over the example of an individual parameter", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -930,7 +930,7 @@ describe("Open API generator", () => {
     });
 
     test("should pass over examples of each param from the whole IO schema examples (GET)", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -962,7 +962,7 @@ describe("Open API generator", () => {
     });
 
     test("should pass over examples of the whole IO schema (POST)", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -994,7 +994,7 @@ describe("Open API generator", () => {
     });
 
     test("should merge endpoint handler examples with its middleware examples", () => {
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
@@ -1040,7 +1040,7 @@ describe("Open API generator", () => {
 
     test("Issue #827: withMeta() should be immutable", () => {
       const zodSchema = z.object({ a: z.string() });
-      const spec = new OpenAPI({
+      const spec = new Documentation({
         config: sampleConfig,
         routing: {
           v1: {
diff --git a/tests/unit/client.spec.ts b/tests/unit/integration.spec.ts
similarity index 85%
rename from tests/unit/client.spec.ts
rename to tests/unit/integration.spec.ts
index c6ffdf0d..1166b4b4 100644
--- a/tests/unit/client.spec.ts
+++ b/tests/unit/integration.spec.ts
@@ -1,15 +1,15 @@
 import { z } from "zod";
 import { routing } from "../../example/routing";
-import { Client, defaultEndpointsFactory } from "../../src";
+import { Integration, defaultEndpointsFactory } from "../../src";
 
-describe("API Client Generator", () => {
+describe("API Integration Generator", () => {
   test("Should generate a client for example API", () => {
-    const client = new Client({ routing });
+    const client = new Integration({ routing });
     expect(client.print()).toMatchSnapshot();
   });
 
   test("Should treat optionals the same way as z.infer() by default", () => {
-    const client = new Client({
+    const client = new Integration({
       routing: {
         v1: {
           "test-with-dashes": defaultEndpointsFactory.build({
@@ -31,7 +31,7 @@ describe("API Client Generator", () => {
   test.each([{ withQuestionMark: true }, { withUndefined: true }, {}])(
     "Feature #945: should have configurable treatment of optionals %#",
     (optionalPropStyle) => {
-      const client = new Client({
+      const client = new Integration({
         optionalPropStyle,
         routing: {
           v1: {