Skip to content

Commit

Permalink
enhance anca config schema
Browse files Browse the repository at this point in the history
enhance nodejs-openapi action
  • Loading branch information
TimurRin committed Sep 22, 2024
1 parent 159ee15 commit 8129f23
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions anca.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"dataVersion": 0,
"version": {
"latest": "0.1.0-dev.3",
"latestNext": "0.1.0-dev.3+next.20240921_084742",
"timestamp": 1726908462
"latestNext": "0.1.0-dev.3+next.20240922_155921",
"timestamp": 1727020761
},
"files": [
{
Expand Down
4 changes: 2 additions & 2 deletions src/actions/nodejs-openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function getDevelopmentModelsPath(development: AncaDevelopment): {
isFile: openapiConfig?.modelsLocation
? openapiConfig?.modelsLocationType === "file"
: false,
isModule: openapiConfig?.modelsModule != null,
isModule: openapiConfig?.externalModule ? true : false,
};
}

Expand Down Expand Up @@ -634,7 +634,7 @@ export async function generateNodejsOpenapiFiles(development: AncaDevelopment) {
responseContentTypes,
responseErrorContentTypes,
}) => {
addImport(routesImports, "./controllers/${fileName}.js", functionName, {
addImport(routesImports, `./controllers/${fileName}.js`, functionName, {
isDefault: true,
});

Expand Down
4 changes: 2 additions & 2 deletions src/cinnabar.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file was generated by Cinnabar Meta. Do not edit.

export const CINNABAR_PROJECT_TIMESTAMP = 1726908463;
export const CINNABAR_PROJECT_VERSION = "0.1.0-dev.3+next.20240921_084742";
export const CINNABAR_PROJECT_TIMESTAMP = 1727020761;
export const CINNABAR_PROJECT_VERSION = "0.1.0-dev.3+next.20240922_155921";
2 changes: 2 additions & 0 deletions src/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export interface AncaNodejsSeaModules {
}

export interface AncaNodejsOpenapi {
externalModule?: boolean;
modelsLocation?: string;
modelsLocationType?: "file" | "folder";
modelsModule?: string;
Expand Down Expand Up @@ -306,6 +307,7 @@ export const ANCA_CONFIG_SCHEMA = {
properties: {
nodejsOpenapi: {
properties: {
externalModule: { type: "boolean" },
modelsLocation: { type: "string" },
modelsLocationType: { enum: ["file", "folder"], type: "string" },
modelsModule: { type: "string" },
Expand Down

0 comments on commit 8129f23

Please sign in to comment.