diff --git a/.projen/tasks.json b/.projen/tasks.json
index 200702858..c6f730264 100644
--- a/.projen/tasks.json
+++ b/.projen/tasks.json
@@ -260,9 +260,6 @@
},
{
"exec": "ln -s $PWD/packages/type-safe-api/scripts/type-safe-api/custom/generate-asyncapi-spec/generate-asyncapi-spec $(pnpm bin)/type-safe-api.generate-asyncapi-spec &>/dev/null; exit 0;"
- },
- {
- "exec": "ln -s $PWD/packages/type-safe-api/scripts/type-safe-api/custom/docs/html-redoc $(pnpm bin)/type-safe-api.generate-html-redoc-docs &>/dev/null; exit 0;"
}
]
}
diff --git a/packages/pdk/package.json b/packages/pdk/package.json
index 79f12c8de..9dd444b4c 100644
--- a/packages/pdk/package.json
+++ b/packages/pdk/package.json
@@ -14,8 +14,7 @@
"type-safe-api.generate": "./scripts/type-safe-api/generators/generate",
"type-safe-api.generate-asyncapi-html-docs": "./scripts/type-safe-api/custom/docs/asyncapi-html",
"type-safe-api.generate-asyncapi-markdown-docs": "./scripts/type-safe-api/custom/docs/asyncapi-markdown",
- "type-safe-api.generate-asyncapi-spec": "./scripts/type-safe-api/custom/generate-asyncapi-spec/generate-asyncapi-spec",
- "type-safe-api.generate-html-redoc-docs": "./scripts/type-safe-api/custom/docs/html-redoc"
+ "type-safe-api.generate-asyncapi-spec": "./scripts/type-safe-api/custom/generate-asyncapi-spec/generate-asyncapi-spec"
},
"scripts": {
"build": "pnpm exec projen build",
@@ -194,7 +193,6 @@
"./_scripts/pdk.sh",
"./_scripts/exec-command.js",
"./scripts/type-safe-api/common/common.sh",
- "./scripts/type-safe-api/custom/docs/html-redoc",
"./scripts/type-safe-api/custom/docs/asyncapi-html",
"./scripts/type-safe-api/custom/docs/asyncapi-markdown",
"./scripts/type-safe-api/generators/generate",
diff --git a/packages/type-safe-api/package.json b/packages/type-safe-api/package.json
index dfb0e1e3a..b6b68a4e6 100644
--- a/packages/type-safe-api/package.json
+++ b/packages/type-safe-api/package.json
@@ -12,8 +12,7 @@
"type-safe-api.generate": "scripts/type-safe-api/generators/generate",
"type-safe-api.generate-asyncapi-html-docs": "scripts/type-safe-api/custom/docs/asyncapi-html",
"type-safe-api.generate-asyncapi-markdown-docs": "scripts/type-safe-api/custom/docs/asyncapi-markdown",
- "type-safe-api.generate-asyncapi-spec": "scripts/type-safe-api/custom/generate-asyncapi-spec/generate-asyncapi-spec",
- "type-safe-api.generate-html-redoc-docs": "scripts/type-safe-api/custom/docs/html-redoc"
+ "type-safe-api.generate-asyncapi-spec": "scripts/type-safe-api/custom/generate-asyncapi-spec/generate-asyncapi-spec"
},
"scripts": {
"build": "pnpm exec projen build",
@@ -113,7 +112,6 @@
"access": "public",
"executableFiles": [
"scripts/type-safe-api/common/common.sh",
- "scripts/type-safe-api/custom/docs/html-redoc",
"scripts/type-safe-api/custom/docs/asyncapi-html",
"scripts/type-safe-api/custom/docs/asyncapi-markdown",
"scripts/type-safe-api/generators/generate",
diff --git a/packages/type-safe-api/scripts/type-safe-api/custom/docs/html-redoc b/packages/type-safe-api/scripts/type-safe-api/custom/docs/html-redoc
deleted file mode 100755
index 3cb623cf5..000000000
--- a/packages/type-safe-api/scripts/type-safe-api/custom/docs/html-redoc
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-
-set -e
-
-# Parse arguments
-spec_path=''
-output_path=''
-while [[ "$#" -gt 0 ]]; do case $1 in
- --spec-path) spec_path="$2"; shift;;
- --output-path) output_path="$2"; shift;;
-esac; shift; done
-
-echo "Generating HTML Redoc documentation..."
-
-working_dir=$(pwd)
-script_dir="$( cd -- "$(dirname $([ -L "${BASH_SOURCE[0]:-$0}" ] && readlink -f "${BASH_SOURCE[0]:-$0}" || echo "${BASH_SOURCE[0]:-$0}"))" >/dev/null 2>&1 ; pwd -P )";
-
-# load common package manager helper functions
-. "$script_dir/../../common/common.sh"
-
-# Create a temporary directory
-tmp_dir=$(mktemp -d "${TMPDIR:-/tmp/}generate-docs-html-redoc.XXXXXXXXX")
-cd $tmp_dir
-
-log "html-redoc :: tmp_dir :: $tmp_dir"
-
-# Install dependencies
-install_packages
-
-# Generate
-run_command redocly build-docs "$working_dir/$spec_path" --output "$working_dir/$output_path/index.html"
-
-echo "HTML Redoc documentation generation done!"
-
-# Clean up
-cd $working_dir
-rm -rf $tmp_dir
diff --git a/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/.gitkeep b/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
diff --git a/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/markdown/README.ejs b/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/markdown/README.ejs
new file mode 100644
index 000000000..e6b016583
--- /dev/null
+++ b/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/markdown/README.ejs
@@ -0,0 +1,25 @@
+###TSAPI_WRITE_FILE###
+{
+ "id": "readme",
+ "dir": ".",
+ "name": "README",
+ "ext": ".md",
+ "overwrite": true
+}
+###/TSAPI_WRITE_FILE#### Documentation for <%- info.title %>
+
+
+## Documentation for API Endpoints
+
+| Class | Method | HTTP request | Description |
+|------------ | ------------- | ------------- | -------------|
+<%_ allOperations.forEach(operation => { _%>
+| *<%- operation.service %>Api* | [**<%- operation.name %>**](Apis/<%- operation.service %>Api.md#<%- operation.name %>) | **<%- operation.method %>** <%- operation.path %> | <%- operation.description || '' %> |
+<%_ }); _%>
+
+
+## Documentation for Models
+
+<%_ models.forEach(model => { _%>
+ - [<%- model.name %>](./Models/<%- model.name %>.md)
+<%_ }); _%>
diff --git a/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/markdown/api.ejs b/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/markdown/api.ejs
new file mode 100644
index 000000000..4d545be00
--- /dev/null
+++ b/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/markdown/api.ejs
@@ -0,0 +1,54 @@
+<%_ services.forEach(service => { _%>
+###TSAPI_WRITE_FILE###
+{
+ "id": "service-<%- service.name %>",
+ "dir": "Apis",
+ "name": "<%- service.className %>",
+ "ext": ".md",
+ "overwrite": true
+}
+###/TSAPI_WRITE_FILE#### <%- service.className %>
+ <%- service.description || '' %>
+
+| Method | HTTP request | Description |
+|------------- | ------------- | -------------|
+<%_ service.operations.forEach(operation => { _%>
+| [**<%- operation.name %>**](<%- operation.service %>Api.md#<%- operation.name %>) | **<%- operation.method %>** <%- operation.path %> | <%- operation.description || '' %> |
+<%_ }); _%>
+
+<%_ service.operations.forEach(operation => { _%>
+
+# **<%- operation.name %>**
+<%_ const result = operation.results[0] _%>
+> <% if (result && result.type !== 'void') { %><%- result.javaType %> <% } %><%- operation.name %>(<% operation.parameters.forEach((param, i) => { %><%- param.prop %><% if (i < operation.parameters.length - 1) { %>, <% } %><% }); %>)
+
+<%_ if (operation.description) { _%>
+ <%- operation.description %>
+<%_ } _%>
+
+### Parameters
+<%_ if (operation.parameters.length === 0) { _%>
+This endpoint does not need any parameters.
+<%_ } else { _%>
+|Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+<%_ operation.parameters.forEach((param) => { _%>
+| **<%- param.prop %>** | <% if (param.isPrimitive || param.export === "array" || param.export === "dictionary") { %>**<%- param.javaType %>**<% } else { %>[**<%- param.type %>**](../Models/<%- param.type %>.md)<% } %>| <%- param.description || '' %> |<% if (!param.isRequired) { %> [optional]<% } %><% if (param.defaultValue) { %> [default to <%- param.defaultValue %>]<% } %><% if (param.enum.length > 0) { %> [enum: <% param.enum.forEach((e, i) => { %><%- e.value %><% if (i < param.enum.length - 1) { %>, <% } %><% }); %><% } %> |
+<%_ }); _%>
+<%_ } _%>
+
+### Return type
+
+<%_ if (result && result.type !== 'void') { _%>
+<% if (result.isPrimitive || result.export === "array" || result.export === "dictionary") { %>**<%- result.javaType %>**<% } else { %>[**<%- result.type %>**](../Models/<%- result.type %>.md)<% } %>
+<%_ } else { _%>
+null (empty response body)
+<%_ } _%>
+
+### HTTP request headers
+
+- **Content-Type**: <% if (operation.parametersBody && operation.parametersBody.mediaTypes && operation.parametersBody.mediaTypes.length > 0) { %><%- operation.parametersBody.mediaTypes.join(', ') %><% } else { %>Not defined<% } %>
+- **Accept**: <% if (result && result.mediaTypes && result.mediaTypes.length > 0) { %><%- result.mediaTypes.join(', ') %><% } else { %>Not defined<% } %>
+
+<%_ }); _%>
+<%_ }); _%>
\ No newline at end of file
diff --git a/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/markdown/model.ejs b/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/markdown/model.ejs
new file mode 100644
index 000000000..a4f535151
--- /dev/null
+++ b/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/markdown/model.ejs
@@ -0,0 +1,21 @@
+<%_ models.forEach(model => { _%>
+###TSAPI_WRITE_FILE###
+{
+ "id": "model-<%- model.name %>",
+ "dir": "Models",
+ "name": "<%- model.name %>",
+ "ext": ".md",
+ "overwrite": true
+}
+###/TSAPI_WRITE_FILE#### <%- model.name %>
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+<%_ model.resolvedProperties.forEach(property => { _%>
+| **<%- property.name %>** | <% if (property.isPrimitive || property.export === "array" || property.export === "dictionary") { %>**<%- property.javaType %>**<% } else { %>[**<%- property.type %>**](<%- property.type %>.md)<% } %> | <%- property.description || '' %> | <% if (!property.isRequired) { %>[optional] <% } %><% if (property.isReadOnly) { %>[readonly] <% } %><% if (property.defaultValue) { %>[default to <%- property.defaultValue %>]<% } %> |
+<%_ }); _%>
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+<%_ }); _%>
\ No newline at end of file
diff --git a/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/plantuml/schemas.ejs b/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/plantuml/schemas.ejs
new file mode 100644
index 000000000..3bb88ee15
--- /dev/null
+++ b/packages/type-safe-api/scripts/type-safe-api/generators/docs/templates/plantuml/schemas.ejs
@@ -0,0 +1,30 @@
+###TSAPI_WRITE_FILE###
+{
+ "id": "schemas",
+ "dir": ".",
+ "name": "schemas",
+ "ext": ".plantuml",
+ "overwrite": true
+}
+###/TSAPI_WRITE_FILE###@startuml
+
+title <%- info.title %> Schemas Diagram
+
+<%_ models.forEach((model) => { _%>
+entity <%- model.name %> {
+<%_ model.resolvedProperties.forEach(property => { _%>
+ <% if (property.isRequired) { %>* <% } %><%- property.name %>: <%- property.javaType %>
+<%_ }); _%>
+}
+
+<%_ }); _%>
+
+<%_ models.forEach((model) => { _%>
+<%_ model.resolvedProperties.forEach((property) => { _%>
+<%_ if (!property.isPrimitive) { _%>
+<%- model.name %> -- <% if (["array", "dictionary"].includes(property.export)) { %>"0..*" <% } %><%- property.type %> : <%- property.name %>
+<%_ } _%>
+<%_ }); _%>
+<%_ }); _%>
+
+@enduml
\ No newline at end of file
diff --git a/packages/type-safe-api/scripts/type-safe-api/generators/generate-next.ts b/packages/type-safe-api/scripts/type-safe-api/generators/generate-next.ts
index 3ccc79cc7..34c7c1a2a 100755
--- a/packages/type-safe-api/scripts/type-safe-api/generators/generate-next.ts
+++ b/packages/type-safe-api/scripts/type-safe-api/generators/generate-next.ts
@@ -44,6 +44,10 @@ interface Arguments {
* Location to write the generated code to
*/
readonly outputPath: string;
+ /**
+ * Print the data passed to the ejs templates
+ */
+ readonly printData?: boolean;
}
interface WriteFileConfig {
@@ -240,12 +244,58 @@ const toTypeScriptType = (property: parseOpenapi.Model): string => {
}
};
+const toJavaPrimitive = (property: parseOpenapi.Model): string => {
+ if (property.type === "string" && ["date", "date-time"].includes(property.format ?? '')) {
+ return "Date";
+ } else if (property.type === "binary") {
+ return "byte[]";
+ } else if (property.type === "number") {
+ switch(property.format) {
+ case "int32":
+ return "Integer";
+ case "int64":
+ return "BigInteger";
+ case "float":
+ return "Float";
+ case "double":
+ return "Double";
+ default:
+ break;
+ }
+
+ if ((property as any).openapiType === "integer") {
+ return "Integer";
+ }
+ return "BigDecimal";
+ } else if (property.type === "boolean") {
+ return "Boolean";
+ } else if (property.type === "string") {
+ return "String";
+ }
+ return property.type;
+};
+
+const toJavaType = (property: parseOpenapi.Model): string => {
+ switch (property.export) {
+ case "generic":
+ case "reference":
+ return toJavaPrimitive(property);
+ case "array":
+ return `${property.uniqueItems ? 'Set' : 'List'}<${property.link ? toTypeScriptType(property.link) : property.type}>`;
+ case "dictionary":
+ return `Map`;
+ default:
+ return property.type;
+ }
+};
+
/**
* Mutates the given model to add language specific types and names
*/
const mutateModelWithAdditionalTypes = (model: parseOpenapi.Model) => {
(model as any).typescriptName = model.name;
(model as any).typescriptType = toTypeScriptType(model);
+ (model as any).javaType = toJavaType(model);
(model as any).isPrimitive = PRIMITIVE_TYPES.has(model.type);
// Trim any surrounding quotes from name
@@ -259,6 +309,7 @@ const mutateWithOpenapiSchemaProperties = (spec: OpenAPIV3.Document, model: pars
(model as any).isShort = schema.format === "int32";
(model as any).isLong = schema.format === "int64";
(model as any).deprecated = !!schema.deprecated;
+ (model as any).openapiType = schema.type;
visited.add(model);
@@ -414,6 +465,9 @@ const buildData = (inSpec: OpenAPIV3.Document, metadata: any) => {
// When there's no content, we set the type to 'void'
if (!specResponse.content) {
response.type = 'void';
+ } else {
+ // Add the response media types
+ (response as any).mediaTypes = Object.keys(specResponse.content);
}
}
});
@@ -443,6 +497,7 @@ const buildData = (inSpec: OpenAPIV3.Document, metadata: any) => {
if (parameter.in === "body") {
// Parameter name for the body is it's type in camelCase
parameter.name = parameter.export === "reference" ? _camelCase(parameter.type) : "body";
+ parameter.prop = "body";
// The request body is not in the "parameters" section of the openapi spec so we won't have added the schema
// properties above. Find it here.
@@ -565,6 +620,7 @@ export default async (argv: string[], rootScriptDir: string) => {
metadata: { type: String, optional: true },
templateDirs: { type: String, multiple: true },
outputPath: { type: String },
+ printData: { type: Boolean, optional: true },
}, { argv });
const spec = (await SwaggerParser.bundle(args.specPath)) as any;
@@ -585,6 +641,10 @@ export default async (argv: string[], rootScriptDir: string) => {
// Build data
const data = buildData(spec, JSON.parse(args.metadata ?? '{}'));
+ if (args.printData) {
+ console.log(JSON.stringify(data, null, 2));
+ }
+
// Read all .ejs files in each template directory
const templates = args.templateDirs.flatMap(t => fs.readdirSync(resolveTemplateDir(rootScriptDir, t), {
recursive: true,
diff --git a/packages/type-safe-api/src/project/codegen/documentation/generated-html-redoc-documentation-project.ts b/packages/type-safe-api/src/project/codegen/documentation/generated-html-redoc-documentation-project.ts
index b3c037c1b..3efaa22e5 100644
--- a/packages/type-safe-api/src/project/codegen/documentation/generated-html-redoc-documentation-project.ts
+++ b/packages/type-safe-api/src/project/codegen/documentation/generated-html-redoc-documentation-project.ts
@@ -4,10 +4,6 @@ import { Project, ProjectOptions, Task } from "projen";
import { GeneratedHtmlRedocDocumentationOptions } from "../../types";
import { OpenApiToolsJsonFile } from "../components/open-api-tools-json-file";
import { TypeSafeApiCommandEnvironment } from "../components/type-safe-api-command-environment";
-import {
- buildTypeSafeApiExecCommand,
- TypeSafeApiScript,
-} from "../components/utils";
export interface GeneratedHtmlRedocDocumentationProjectOptions
extends ProjectOptions,
@@ -32,10 +28,7 @@ export class GeneratedHtmlRedocDocumentationProject extends Project {
this.generateTask = this.addTask("generate");
this.generateTask.exec(
- buildTypeSafeApiExecCommand(
- TypeSafeApiScript.GENERATE_HTML_REDOC_DOCS,
- `--spec-path ${options.specPath} --output-path .`
- )
+ `npx --yes @redocly/cli@1.25.4 build-docs "${options.specPath}" --output ./index.html`
);
this.compileTask.spawn(this.generateTask);
diff --git a/packages/type-safe-api/src/project/codegen/documentation/generated-markdown-documentation-project.ts b/packages/type-safe-api/src/project/codegen/documentation/generated-markdown-documentation-project.ts
index 1699bc677..7db3091ad 100644
--- a/packages/type-safe-api/src/project/codegen/documentation/generated-markdown-documentation-project.ts
+++ b/packages/type-safe-api/src/project/codegen/documentation/generated-markdown-documentation-project.ts
@@ -1,14 +1,12 @@
/*! Copyright [Amazon.com](http://amazon.com/), Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0 */
import { Project, ProjectOptions, Task } from "projen";
-import { DocumentationFormat } from "../../languages";
import { GeneratedMarkdownDocumentationOptions } from "../../types";
import { OpenApiToolsJsonFile } from "../components/open-api-tools-json-file";
import { TypeSafeApiCommandEnvironment } from "../components/type-safe-api-command-environment";
import {
- buildInvokeOpenApiGeneratorCommandArgs,
+ buildCodegenCommandArgs,
buildTypeSafeApiExecCommand,
- OtherGenerators,
TypeSafeApiScript,
} from "../components/utils";
@@ -36,11 +34,10 @@ export class GeneratedMarkdownDocumentationProject extends Project {
this.generateTask = this.addTask("generate");
this.generateTask.exec(
buildTypeSafeApiExecCommand(
- TypeSafeApiScript.GENERATE,
- buildInvokeOpenApiGeneratorCommandArgs({
- generator: DocumentationFormat.MARKDOWN,
+ TypeSafeApiScript.GENERATE_NEXT,
+ buildCodegenCommandArgs({
specPath: options.specPath,
- generatorDirectory: OtherGenerators.DOCS,
+ templateDirs: ["docs/templates/markdown"],
})
)
);
diff --git a/packages/type-safe-api/src/project/codegen/documentation/generated-plantuml-documentation-project.ts b/packages/type-safe-api/src/project/codegen/documentation/generated-plantuml-documentation-project.ts
index cd6ca8f87..c4edc0b46 100644
--- a/packages/type-safe-api/src/project/codegen/documentation/generated-plantuml-documentation-project.ts
+++ b/packages/type-safe-api/src/project/codegen/documentation/generated-plantuml-documentation-project.ts
@@ -1,14 +1,12 @@
/*! Copyright [Amazon.com](http://amazon.com/), Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0 */
import { Project, ProjectOptions, Task } from "projen";
-import { DocumentationFormat } from "../../languages";
import { GeneratedPlantumlDocumentationOptions } from "../../types";
import { OpenApiToolsJsonFile } from "../components/open-api-tools-json-file";
import { TypeSafeApiCommandEnvironment } from "../components/type-safe-api-command-environment";
import {
- buildInvokeOpenApiGeneratorCommandArgs,
+ buildCodegenCommandArgs,
buildTypeSafeApiExecCommand,
- OtherGenerators,
TypeSafeApiScript,
} from "../components/utils";
@@ -36,11 +34,10 @@ export class GeneratedPlantumlDocumentationProject extends Project {
this.generateTask = this.addTask("generate");
this.generateTask.exec(
buildTypeSafeApiExecCommand(
- TypeSafeApiScript.GENERATE,
- buildInvokeOpenApiGeneratorCommandArgs({
- generator: DocumentationFormat.PLANTUML,
+ TypeSafeApiScript.GENERATE_NEXT,
+ buildCodegenCommandArgs({
specPath: options.specPath,
- generatorDirectory: OtherGenerators.DOCS,
+ templateDirs: ["docs/templates/plantuml"],
})
)
);
diff --git a/packages/type-safe-api/test/project/__snapshots__/type-safe-api-project.test.ts.snap b/packages/type-safe-api/test/project/__snapshots__/type-safe-api-project.test.ts.snap
index 4064f8cde..c80b1b06a 100644
--- a/packages/type-safe-api/test/project/__snapshots__/type-safe-api-project.test.ts.snap
+++ b/packages/type-safe-api/test/project/__snapshots__/type-safe-api-project.test.ts.snap
@@ -382,7 +382,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -498,7 +498,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -612,7 +612,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -4751,7 +4751,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -5141,7 +5141,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -5529,7 +5529,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -9821,7 +9821,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -9937,7 +9937,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -10051,7 +10051,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -14109,7 +14109,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -14499,7 +14499,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -14887,7 +14887,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -19111,7 +19111,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -19227,7 +19227,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -19341,7 +19341,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -23641,7 +23641,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -24031,7 +24031,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -24419,7 +24419,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -35808,7 +35808,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -35924,7 +35924,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -36038,7 +36038,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -40271,7 +40271,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -40661,7 +40661,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -41049,7 +41049,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -45427,7 +45427,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -45543,7 +45543,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -45657,7 +45657,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -49095,7 +49095,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -49485,7 +49485,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -49873,7 +49873,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -52642,7 +52642,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -52758,7 +52758,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -52872,7 +52872,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -56333,7 +56333,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -56723,7 +56723,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -57111,7 +57111,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -59898,7 +59898,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -60014,7 +60014,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -60128,7 +60128,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -64280,7 +64280,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -64670,7 +64670,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -65058,7 +65058,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -69376,7 +69376,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -69492,7 +69492,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -69606,7 +69606,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -74000,7 +74000,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -74390,7 +74390,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -74778,7 +74778,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -79091,7 +79091,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -79207,7 +79207,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -79321,7 +79321,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -82800,7 +82800,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -83190,7 +83190,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -83578,7 +83578,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -86385,7 +86385,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -86501,7 +86501,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -86615,7 +86615,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
@@ -90054,7 +90054,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path ../../../model/.api.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "../../../model/.api.json" --output ./index.html",
},
],
},
@@ -90444,7 +90444,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
@@ -90832,7 +90832,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path ../../../model/.api.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath ../../../model/.api.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
diff --git a/packages/type-safe-api/test/project/codegen/documentation/__snapshots__/generated-html-redoc-documentation-project.test.ts.snap b/packages/type-safe-api/test/project/codegen/documentation/__snapshots__/generated-html-redoc-documentation-project.test.ts.snap
index c1b77d0d1..5003bb872 100644
--- a/packages/type-safe-api/test/project/codegen/documentation/__snapshots__/generated-html-redoc-documentation-project.test.ts.snap
+++ b/packages/type-safe-api/test/project/codegen/documentation/__snapshots__/generated-html-redoc-documentation-project.test.ts.snap
@@ -102,7 +102,7 @@ index.html
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate-html-redoc-docs --spec-path my-spec.json --output-path .",
+ "exec": "npx --yes @redocly/cli@1.25.4 build-docs "my-spec.json" --output ./index.html",
},
],
},
diff --git a/packages/type-safe-api/test/project/codegen/documentation/__snapshots__/generated-markdown-documentation-project.test.ts.snap b/packages/type-safe-api/test/project/codegen/documentation/__snapshots__/generated-markdown-documentation-project.test.ts.snap
index 3d4ddfa76..0a186776f 100644
--- a/packages/type-safe-api/test/project/codegen/documentation/__snapshots__/generated-markdown-documentation-project.test.ts.snap
+++ b/packages/type-safe-api/test/project/codegen/documentation/__snapshots__/generated-markdown-documentation-project.test.ts.snap
@@ -105,7 +105,7 @@ README.md
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator markdown --spec-path my-spec.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath my-spec.json --outputPath . --templateDirs "docs/templates/markdown"",
},
],
},
diff --git a/packages/type-safe-api/test/project/codegen/documentation/__snapshots__/generated-plantuml-documentation-project.test.ts.snap b/packages/type-safe-api/test/project/codegen/documentation/__snapshots__/generated-plantuml-documentation-project.test.ts.snap
index b6594b7d2..47b7c1242 100644
--- a/packages/type-safe-api/test/project/codegen/documentation/__snapshots__/generated-plantuml-documentation-project.test.ts.snap
+++ b/packages/type-safe-api/test/project/codegen/documentation/__snapshots__/generated-plantuml-documentation-project.test.ts.snap
@@ -103,7 +103,7 @@ schemas.plantuml
"spawn": "create-openapitools.json",
},
{
- "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.generate --generator plantuml --spec-path my-spec.json --output-path . --generator-dir docs --src-dir src --tst-dir test --generate-alias-as-model",
+ "exec": "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api generate --specPath my-spec.json --outputPath . --templateDirs "docs/templates/plantuml"",
},
],
},
diff --git a/packages/type-safe-api/test/scripts/generators/__snapshots__/docs.test.ts.snap b/packages/type-safe-api/test/scripts/generators/__snapshots__/docs.test.ts.snap
index b40b82850..cefbf8615 100644
--- a/packages/type-safe-api/test/scripts/generators/__snapshots__/docs.test.ts.snap
+++ b/packages/type-safe-api/test/scripts/generators/__snapshots__/docs.test.ts.snap
@@ -5426,40 +5426,6 @@ g,0
# **anyRequestResponse**
-> oas_any_type_not_mapped anyRequestResponse(body)
-
+> any anyRequestResponse(body)
### Parameters
-
|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
-| **body** | **oas_any_type_not_mapped**| | [optional] |
+| **body** | **any**| | [optional] |
### Return type
-[**oas_any_type_not_mapped**](../Models/AnyType.md)
-
-### Authorization
-
-No authorization required
+**any**
### HTTP request headers
@@ -5514,18 +5480,13 @@ No authorization required
> empty()
-
### Parameters
-This endpoint does not need any parameter.
+This endpoint does not need any parameters.
### Return type
null (empty response body)
-### Authorization
-
-No authorization required
-
### HTTP request headers
- **Content-Type**: Not defined
@@ -5536,18 +5497,13 @@ No authorization required
> MapResponse mapResponse()
-
### Parameters
-This endpoint does not need any parameter.
+This endpoint does not need any parameters.
### Return type
[**MapResponse**](../Models/MapResponse.md)
-### Authorization
-
-No authorization required
-
### HTTP request headers
- **Content-Type**: Not defined
@@ -5558,21 +5514,15 @@ No authorization required
> String mediaTypes(body)
-
### Parameters
-
|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
-| **body** | **File**| | |
+| **body** | **byte[]**| | |
### Return type
**String**
-### Authorization
-
-No authorization required
-
### HTTP request headers
- **Content-Type**: application/pdf
@@ -5580,24 +5530,18 @@ No authorization required
# **multipleContentTypes**
-> String multipleContentTypes(TestRequest)
-
+> String multipleContentTypes(body)
### Parameters
-
|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
-| **TestRequest** | [**TestRequest**](../Models/TestRequest.md)| | |
+| **body** | [**TestRequest**](../Models/TestRequest.md)| | |
### Return type
**String**
-### Authorization
-
-No authorization required
-
### HTTP request headers
- **Content-Type**: application/json, application/pdf
@@ -5605,31 +5549,25 @@ No authorization required
# **operationOne**
-> TestResponse operationOne(param1, param2, param3, pathParam, x-header-param, TestRequest, param4, x-multi-value-header-param)
-
+> TestResponse operationOne(param1, param2, param3, pathParam, x-header-param, body, param4, x-multi-value-header-param)
### Parameters
-
|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
-| **param1** | **String**| This is parameter 1 | [default to null] |
-| **param2** | [**List**](../Models/String.md)| This is parameter 2 | [default to null] |
-| **param3** | **BigDecimal**| | [default to null] |
-| **pathParam** | **String**| | [default to null] |
-| **x-header-param** | **String**| This is a header parameter | [default to null] |
-| **TestRequest** | [**TestRequest**](../Models/TestRequest.md)| | |
-| **param4** | **String**| | [optional] [default to null] |
-| **x-multi-value-header-param** | [**List**](../Models/String.md)| | [optional] [default to null] |
+| **param1** | **String**| This is parameter 1 | |
+| **param2** | **List**| This is parameter 2 | |
+| **param3** | **BigDecimal**| | |
+| **pathParam** | **String**| | |
+| **x-header-param** | **String**| This is a header parameter | |
+| **body** | [**TestRequest**](../Models/TestRequest.md)| | |
+| **param4** | **String**| | [optional] |
+| **x-multi-value-header-param** | **List**| | [optional] |
### Return type
[**TestResponse**](../Models/TestResponse.md)
-### Authorization
-
-No authorization required
-
### HTTP request headers
- **Content-Type**: application/json
@@ -5640,18 +5578,13 @@ No authorization required
> TestResponse withoutOperationIdDelete()
-
### Parameters
-This endpoint does not need any parameter.
+This endpoint does not need any parameters.
### Return type
[**TestResponse**](../Models/TestResponse.md)
-### Authorization
-
-No authorization required
-
### HTTP request headers
- **Content-Type**: Not defined
@@ -5663,7 +5596,7 @@ No authorization required
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
-| **errorMessage** | **String** | | [default to null] |
+| **errorMessage** | **String** | | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -5673,18 +5606,18 @@ No authorization required
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
-| **mapProperty** | [**Map**](MapResponse_mapProperty_value.md) | | [default to null] |
+| **mapProperty** | **Map** | | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
",
- "Models/MapResponse_mapProperty_value.md": "# MapResponse_mapProperty_value
+ "Models/MapResponseMapPropertyValue.md": "# MapResponseMapPropertyValue
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
-| **a** | **String** | | [default to null] |
-| **b** | **String** | | [optional] [default to null] |
+| **a** | **String** | | |
+| **b** | **String** | | [optional] |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -5694,7 +5627,7 @@ No authorization required
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
-| **myInput** | **BigDecimal** | | [optional] [default to null] |
+| **myInput** | **BigDecimal** | | [optional] |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -5704,18 +5637,18 @@ No authorization required
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
-| **messages** | [**List**](TestResponse_messages_inner.md) | | [default to null] |
+| **messages** | **List** | | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
",
- "Models/TestResponse_messages_inner.md": "# TestResponse_messages_inner
+ "Models/TestResponseMessagesInner.md": "# TestResponseMessagesInner
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
-| **message** | **String** | This is a message | [optional] [default to null] |
-| **id** | **Integer** | | [default to null] |
+| **message** | **String** | This is a message | [optional] |
+| **id** | **Integer** | | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
@@ -5725,34 +5658,25 @@ No authorization required
## Documentation for API Endpoints
-All URIs are relative to *http://localhost*
-
| Class | Method | HTTP request | Description |
|------------ | ------------- | ------------- | -------------|
-| *DefaultApi* | [**anyRequestResponse**](Apis/DefaultApi.md#anyrequestresponse) | **PUT** /any-request-response | |
-*DefaultApi* | [**empty**](Apis/DefaultApi.md#empty) | **PUT** /empty-response | |
-*DefaultApi* | [**mapResponse**](Apis/DefaultApi.md#mapresponse) | **GET** /map-response | |
-*DefaultApi* | [**mediaTypes**](Apis/DefaultApi.md#mediatypes) | **POST** /different-media-type | |
-*DefaultApi* | [**multipleContentTypes**](Apis/DefaultApi.md#multiplecontenttypes) | **POST** /multiple-content-types | |
-*DefaultApi* | [**operationOne**](Apis/DefaultApi.md#operationone) | **POST** /path/{pathParam} | |
-*DefaultApi* | [**withoutOperationIdDelete**](Apis/DefaultApi.md#withoutoperationiddelete) | **DELETE** /without-operation-id | |
-
+| *DefaultApi* | [**anyRequestResponse**](Apis/DefaultApi.md#anyRequestResponse) | **PUT** /any-request-response | |
+| *DefaultApi* | [**empty**](Apis/DefaultApi.md#empty) | **PUT** /empty-response | |
+| *DefaultApi* | [**mapResponse**](Apis/DefaultApi.md#mapResponse) | **GET** /map-response | |
+| *DefaultApi* | [**mediaTypes**](Apis/DefaultApi.md#mediaTypes) | **POST** /different-media-type | |
+| *DefaultApi* | [**multipleContentTypes**](Apis/DefaultApi.md#multipleContentTypes) | **POST** /multiple-content-types | |
+| *DefaultApi* | [**operationOne**](Apis/DefaultApi.md#operationOne) | **POST** /path/{pathParam} | |
+| *DefaultApi* | [**withoutOperationIdDelete**](Apis/DefaultApi.md#withoutOperationIdDelete) | **DELETE** /without-operation-id | |
## Documentation for Models
- [ApiError](./Models/ApiError.md)
- [MapResponse](./Models/MapResponse.md)
- - [MapResponse_mapProperty_value](./Models/MapResponse_mapProperty_value.md)
+ - [MapResponseMapPropertyValue](./Models/MapResponseMapPropertyValue.md)
- [TestRequest](./Models/TestRequest.md)
- [TestResponse](./Models/TestResponse.md)
- - [TestResponse_messages_inner](./Models/TestResponse_messages_inner.md)
-
-
-
-## Documentation for Authorization
-
-All endpoints do not require authorization.
+ - [TestResponseMessagesInner](./Models/TestResponseMessagesInner.md)
",
"openapitools.json": {
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
@@ -5768,33 +5692,6 @@ All endpoints do not require authorization.
exports[`Docs Generation Script Unit Tests Generates plantuml 1`] = `
{
- ".openapi-generator-ignore": "# OpenAPI Generator Ignore
-# Generated by openapi-generator https://github.com/openapitools/openapi-generator
-
-# Use this file to prevent files from being overwritten by the generator.
-# The patterns follow closely to .gitignore or .dockerignore.
-
-# As an example, the C# client generator defines ApiClient.cs.
-# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
-#ApiClient.cs
-
-# You can match any string of characters against a directory, file or extension with a single asterisk (*):
-#foo/*/qux
-# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
-
-# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
-#foo/**/qux
-# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
-
-# You can also negate patterns with an exclamation (!).
-# For example, you can ignore all files in a docs folder with the file extension .md:
-#docs/*.md
-# Then explicitly reverse the ignore rule for a single file:
-#!docs/README.md
-",
- ".openapi-generator/FILES": ".openapi-generator-ignore
-schemas.plantuml",
- ".openapi-generator/VERSION": "6.3.0",
".pdk/dynamic-files/openapitools.json": {
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
@@ -5804,6 +5701,7 @@ schemas.plantuml",
},
"spaces": 2,
},
+ ".tsapi-manifest": "schemas.plantuml",
"openapitools.json": {
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".",
@@ -5822,7 +5720,7 @@ entity ApiError {
}
entity MapResponse {
- * mapProperty: Map
+ * mapProperty: Map
}
entity MapResponseMapPropertyValue {
@@ -5844,6 +5742,7 @@ entity TestResponseMessagesInner {
}
+MapResponse -- "0..*" MapResponseMapPropertyValue : mapProperty
TestResponse -- "0..*" TestResponseMessagesInner : messages
@enduml",
diff --git a/packages/type-safe-api/test/scripts/generators/docs.test.ts b/packages/type-safe-api/test/scripts/generators/docs.test.ts
index 27187df02..329e8876e 100644
--- a/packages/type-safe-api/test/scripts/generators/docs.test.ts
+++ b/packages/type-safe-api/test/scripts/generators/docs.test.ts
@@ -4,6 +4,7 @@ import os from "os";
import * as path from "path";
import { Project } from "projen";
import { exec } from "projen/lib/util";
+import { buildCodegenCommandArgs } from "../../../lib/project/codegen/components/utils";
import { DocumentationFormat } from "../../../src";
import { OpenApiToolsJsonFile } from "../../../src/project/codegen/components/open-api-tools-json-file";
import {
@@ -17,7 +18,7 @@ describe("Docs Generation Script Unit Tests", () => {
DocumentationFormat.HTML2,
DocumentationFormat.MARKDOWN,
DocumentationFormat.PLANTUML,
- ])("Generates %s", (generator) => {
+ ])("Generates %s", (format) => {
const specPath = path.resolve(
__dirname,
`../../resources/specs/single.yaml`
@@ -36,14 +37,23 @@ describe("Docs Generation Script Unit Tests", () => {
openApiToolsJsonFile.synthesize();
exec(openApiToolsJsonFile.createTask.steps[0].exec!, { cwd: outdir });
exec(
- `${path.resolve(
- __dirname,
- "../../../scripts/type-safe-api/generators/generate"
- )} ${buildInvokeOpenApiGeneratorCommandArgs({
- generator,
- specPath: "spec.yaml",
- generatorDirectory: OtherGenerators.DOCS,
- })}`,
+ // Use the old openapi generator command for html2
+ format === DocumentationFormat.HTML2
+ ? `${path.resolve(
+ __dirname,
+ "../../../scripts/type-safe-api/generators/generate"
+ )} ${buildInvokeOpenApiGeneratorCommandArgs({
+ generator: format,
+ specPath: "spec.yaml",
+ generatorDirectory: OtherGenerators.DOCS,
+ })}`
+ : `${path.resolve(
+ __dirname,
+ "../../../scripts/type-safe-api/run.js generate"
+ )} ${buildCodegenCommandArgs({
+ specPath: "spec.yaml",
+ templateDirs: [`docs/templates/${format}`],
+ })}`,
{
cwd: outdir,
}
diff --git a/projenrc/projects/type-safe-api-project.ts b/projenrc/projects/type-safe-api-project.ts
index 549e6d204..90e796899 100644
--- a/projenrc/projects/type-safe-api-project.ts
+++ b/projenrc/projects/type-safe-api-project.ts
@@ -68,7 +68,6 @@ export class TypeSafeApiProject extends PDKProject {
publishConfig: {
executableFiles: [
"scripts/type-safe-api/common/common.sh",
- "scripts/type-safe-api/custom/docs/html-redoc",
"scripts/type-safe-api/custom/docs/asyncapi-html",
"scripts/type-safe-api/custom/docs/asyncapi-markdown",
"scripts/type-safe-api/generators/generate",
@@ -84,8 +83,6 @@ export class TypeSafeApiProject extends PDKProject {
bin: {
"type-safe-api": "scripts/type-safe-api/run.js",
"type-safe-api.generate": "scripts/type-safe-api/generators/generate",
- "type-safe-api.generate-html-redoc-docs":
- "scripts/type-safe-api/custom/docs/html-redoc",
"type-safe-api.generate-asyncapi-html-docs":
"scripts/type-safe-api/custom/docs/asyncapi-html",
"type-safe-api.generate-asyncapi-markdown-docs":