ondc-code-generator 0.7.3 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alpha/possible-json-paths.json +3734 -0
- package/dist/bin/cli.js +63 -3
- package/dist/constants/syntax.js +26 -0
- package/dist/generator/config-compiler.d.ts +4 -3
- package/dist/generator/config-compiler.js +16 -7
- package/dist/generator/generators/classes/abstract-generator.d.ts +1 -0
- package/dist/generator/generators/documentation/md-generator.d.ts +1 -0
- package/dist/generator/generators/documentation/md-generator.js +3 -0
- package/dist/generator/generators/go/go-generator.d.ts +1 -0
- package/dist/generator/generators/go/go-generator.js +39 -4
- package/dist/generator/generators/go/templates/api-tests.mustache +0 -1
- package/dist/generator/generators/go/templates/index.mustache +1 -1
- package/dist/generator/generators/go/templates/json-normalizer.mustache +10 -12
- package/dist/generator/generators/go/templates/test-config.mustache +3 -3
- package/dist/generator/generators/go/templates/test-object.mustache +4 -8
- package/dist/generator/generators/go/templates/test-templates/validator-test.mustache +167 -0
- package/dist/generator/generators/go/templates/validation-code.mustache +1 -1
- package/dist/generator/generators/javascript/js-generator.d.ts +1 -0
- package/dist/generator/generators/javascript/js-generator.js +3 -0
- package/dist/generator/generators/python/py-generator.d.ts +1 -0
- package/dist/generator/generators/python/py-generator.js +3 -0
- package/dist/generator/generators/typescript/ts-generator.d.ts +1 -0
- package/dist/generator/generators/typescript/ts-generator.js +3 -0
- package/dist/services/schema-service.d.ts +2 -1
- package/dist/services/schema-service.js +2 -1
- package/dist/types/build.d.ts +1 -0
- package/dist/utils/general-utils/string-utils.d.ts +1 -0
- package/dist/utils/general-utils/string-utils.js +3 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { removeRequiredAndEnum } from "../utils/config-utils/json-schema-utils.js";
|
|
2
2
|
import { getAllJsonPaths } from "../utils/json-path-utils/extract-string-paths.js";
|
|
3
|
-
export class
|
|
3
|
+
export class ExtractionService {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.extractSchemas = async (data, removeRequired, removeEnums) => {
|
|
6
6
|
const paths = data.paths;
|
|
@@ -25,5 +25,6 @@ export class SchemaExtactionService {
|
|
|
25
25
|
}
|
|
26
26
|
return paths;
|
|
27
27
|
};
|
|
28
|
+
this.extractPayloadExamples = (data) => { };
|
|
28
29
|
}
|
|
29
30
|
}
|
package/dist/types/build.d.ts
CHANGED
|
@@ -27,3 +27,4 @@ export declare function ConvertArrayToStringsInTestObject(testObject: TestObject
|
|
|
27
27
|
export declare function ConvertArrayToString(arr: any[]): string;
|
|
28
28
|
export declare function ConvertArrayToStringGoStyle(arr: any[]): string;
|
|
29
29
|
export declare function addTabToMarkdown(markdown: string): string;
|
|
30
|
+
export declare function removeAllSpecialCharacters(input: string): string;
|
|
@@ -79,3 +79,6 @@ export function addTabToMarkdown(markdown) {
|
|
|
79
79
|
.map((line) => `\t${line}`) // Add a tab character at the beginning of each line
|
|
80
80
|
.join("\n"); // Rejoin the lines into a single string
|
|
81
81
|
}
|
|
82
|
+
export function removeAllSpecialCharacters(input) {
|
|
83
|
+
return input.replace(/[()!]/g, "").trim();
|
|
84
|
+
}
|