From 2cd605a6db4ae5a265c608447375b6cbb790ee3a Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Wed, 18 Oct 2023 20:56:04 +0200 Subject: [PATCH 1/6] add examples --- docs/integration.md | 17 +++ docs/languages/Java.md | 3 + examples/README.md | 4 +- .../integrate-modelina-into-maven/README.md | 3 + .../maven-project/.gitignore | 25 ++++ .../maven-project/README.md | 10 ++ .../maven-project/asyncapi.json | 26 ++++ .../maven-project/pom.xml | 113 ++++++++++++++++++ .../scripts/modelina/generate.ts | 26 ++++ .../scripts/modelina/package.json | 10 ++ .../com/mycompany/app/generic/Address.java | 40 +++++++ .../mycompany/app/generic/NestedObject.java | 15 +++ .../package.json | 12 ++ modelina-website/scripts/build-examples.js | 19 ++- 14 files changed, 320 insertions(+), 3 deletions(-) create mode 100644 examples/integrate-modelina-into-maven/README.md create mode 100644 examples/integrate-modelina-into-maven/maven-project/.gitignore create mode 100644 examples/integrate-modelina-into-maven/maven-project/README.md create mode 100644 examples/integrate-modelina-into-maven/maven-project/asyncapi.json create mode 100644 examples/integrate-modelina-into-maven/maven-project/pom.xml create mode 100644 examples/integrate-modelina-into-maven/maven-project/scripts/modelina/generate.ts create mode 100644 examples/integrate-modelina-into-maven/maven-project/scripts/modelina/package.json create mode 100644 examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/Address.java create mode 100644 examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/NestedObject.java create mode 100644 examples/integrate-modelina-into-maven/package.json diff --git a/docs/integration.md b/docs/integration.md index 480ee25b47..973a8d00fe 100644 --- a/docs/integration.md +++ b/docs/integration.md @@ -54,3 +54,20 @@ To be on the safeside, only enable the user to chose between the internal option ## Integrate Modelina in an AsyncAPI generator template TODO + +## Integrate Modelina into Maven + +There are at least two ways you can integrate Modelina into your build process for Maven projects, either with the AsyncAPI CLI or with a custom build script. Which one to choose all depends on your scenario, look below: + +**Custom build script** +- DO work with other inputs then AsyncAPI +- DO work when needing extensive build options and configurations + +Checkout the Maven example here: [Integrate Modelina into Maven](../examples/integrate-modelina-into-maven/maven-project/) + +**AsyncAPI CLI** + +- DO NOT work if you have other inputs then AsyncAPI +- DO NOT need extensive build options and configuration + +We don't have a full example for this, but you can use similar concept as the custom build script. However, instead you just install and call the AsyncAPI CLI directly in the plugin execution when utilizing the [frontend-maven-plugin](https://github.com/eirslett/frontend-maven-plugin) and [more specifically the NPX execution](https://github.com/eirslett/frontend-maven-plugin#npx). \ No newline at end of file diff --git a/docs/languages/Java.md b/docs/languages/Java.md index f8745ec24d..e7a87f7cd8 100644 --- a/docs/languages/Java.md +++ b/docs/languages/Java.md @@ -92,3 +92,6 @@ Currently not supported, [let everyone know you need it](https://github.com/asyn ### To and from binary Currently not supported, [let everyone know you need it](https://github.com/asyncapi/modelina/issues/new?assignees=&labels=enhancement&template=enhancement.md)! + +## Integrate Modelina into Maven +We have created an example Maven project to show you how to generate AsyncAPI payload models from your AsyncAPI file and integrate it into the build process. [You can find the integration example here](../integration.md#integrate-modelina-into-maven). \ No newline at end of file diff --git a/examples/README.md b/examples/README.md index 45d0e1f845..91e92b7013 100644 --- a/examples/README.md +++ b/examples/README.md @@ -68,8 +68,9 @@ These are all the basic generator examples that shows a bare minimal example of ## Integrations These are examples of how you can integrate Modelina into a specific scenario: -- [integrate with React](./integrate-with-react) - A basic example that shows how you can integrate Modelina with React. +- [integrate-with-react](./integrate-with-react) - A basic example that shows how you can integrate Modelina with React. - [integrate-with-next](./integrate-with-next) - A basic example that shows how you can integrate Modelina with Next. +- [integrate-modelina-into-maven/](./integrate-modelina-into-maven/) - A basic example that shows how you can integrate Modelina into the Java Maven build process. ## Python These are all specific examples only relevant to the Python generator: @@ -94,6 +95,7 @@ These are all specific examples only relevant to the Java generator: - [java-generate-equals](./java-generate-equals) - A basic example that shows how to generate models that overwrite the `equal` method - [java-generate-javax-constraint-annotation](./java-generate-javax-constraint-annotation) - A basic example that shows how Java data models having `javax.validation.constraints` annotations can be generated. - [java-generate-javadoc](./java-generate-javadoc) - A basic example of how to generate Java models including JavaDocs. +- [integrate-modelina-into-maven](./integrate-modelina-into-maven/) - A basic example that shows how you can integrate Modelina into the Java Maven build process. ## C# These are all specific examples only relevant to the C# generator: diff --git a/examples/integrate-modelina-into-maven/README.md b/examples/integrate-modelina-into-maven/README.md new file mode 100644 index 0000000000..8237839d08 --- /dev/null +++ b/examples/integrate-modelina-into-maven/README.md @@ -0,0 +1,3 @@ +# Integrate Modelina into Maven + +This example show how you can integrate Modelina into Maven with a custom build script. [Please have a look at the Maven project README file for further information](./maven-project/). \ No newline at end of file diff --git a/examples/integrate-modelina-into-maven/maven-project/.gitignore b/examples/integrate-modelina-into-maven/maven-project/.gitignore new file mode 100644 index 0000000000..fb3e67b746 --- /dev/null +++ b/examples/integrate-modelina-into-maven/maven-project/.gitignore @@ -0,0 +1,25 @@ + +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties +# https://github.com/takari/maven-wrapper#usage-without-binary-jar +.mvn/wrapper/maven-wrapper.jar + +# Eclipse m2e generated files +# Eclipse Core +.project +# JDT-specific (Eclipse Java Development Tools) +.classpath + +bin +.settings + +# Ignore Modelina generation node modules +scripts/modelina/java_runtime_node +scripts/modelina/node_modules \ No newline at end of file diff --git a/examples/integrate-modelina-into-maven/maven-project/README.md b/examples/integrate-modelina-into-maven/maven-project/README.md new file mode 100644 index 0000000000..62019d60b7 --- /dev/null +++ b/examples/integrate-modelina-into-maven/maven-project/README.md @@ -0,0 +1,10 @@ +# Integrate Modelina into Maven + +This Java Maven project shows an example how to integrate Modelina and AsyncAPI into your build process. + +Here is how it works: +- The script `./scripts/modelina/generate.ts` is what generates all the models, and what Maven uses to generate the models. This can also be executed manually through `npm run generate`. +- The input, in this case, is an AsyncAPI document located in the root of the project `./asyncapi.json`. The input can be anything, just alter the generator script. +- The Maven project file `./pom.xml` then utilizes the [frontend-maven-plugin](https://github.com/eirslett/frontend-maven-plugin) to execute the generate script on build so you will always have the up to date models from your AsyncAPI document. + +> NOTICE: The only thing you manually have to change for this to work in your project is the dependency entry for `"@asyncapi/modelina": "file:../../../../",` in the `./scripts/modelina/package.json` file to use the latest Modelina version (we only use a local one for testing purposes). \ No newline at end of file diff --git a/examples/integrate-modelina-into-maven/maven-project/asyncapi.json b/examples/integrate-modelina-into-maven/maven-project/asyncapi.json new file mode 100644 index 0000000000..e91f2fa683 --- /dev/null +++ b/examples/integrate-modelina-into-maven/maven-project/asyncapi.json @@ -0,0 +1,26 @@ +{ + "asyncapi": "2.2.0", + "info": { + "title": "example", + "version": "0.1.0" + }, + "channels": { + "/test": { + "subscribe": { + "message": { + "payload": { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "properties": { + "email": { + "type": "string", + "format": "email" + } + } + } + } + } + } + } +} diff --git a/examples/integrate-modelina-into-maven/maven-project/pom.xml b/examples/integrate-modelina-into-maven/maven-project/pom.xml new file mode 100644 index 0000000000..a5ccadddec --- /dev/null +++ b/examples/integrate-modelina-into-maven/maven-project/pom.xml @@ -0,0 +1,113 @@ + + + + 4.0.0 + + com.mycompany.app + maven-project + 1.0-SNAPSHOT + + maven-project + http://www.example.com + + + UTF-8 + 1.8 + 1.8 + + + + + junit + junit + 4.11 + test + + + + com.fasterxml.jackson.core + jackson-annotations + 2.15.0 + + + com.fasterxml.jackson.core + jackson-databind + 2.15.0 + + + + org.hamcrest + hamcrest-all + 1.3 + test + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + com.github.eirslett + frontend-maven-plugin + 1.12.1 + + ./scripts/modelina + java_runtime_node + + + + + install node and npm + generate-sources + + install-node-and-npm + + + v18.15.0 + + + + Generate sources + generate-sources + + npm + + + run generate + + + + + + + diff --git a/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/generate.ts b/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/generate.ts new file mode 100644 index 0000000000..d2fb53a025 --- /dev/null +++ b/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/generate.ts @@ -0,0 +1,26 @@ +import { JAVA_JACKSON_PRESET, JavaFileGenerator } from '@asyncapi/modelina'; +import path from 'path'; + +// Where should the models be placed relative to root maven project? +const PACKAGE_NAME = 'java/com/mycompany/app'; +const MODEL_DIR = `src/main/${PACKAGE_NAME}`; + +const FINAL_OUTPUT_PATH = path.resolve(__dirname, '../../', MODEL_DIR); +// Setup the generator and all it's configurations +const generator = new JavaFileGenerator({ + presets: [JAVA_JACKSON_PRESET] +}); + +// Load the input from file, memory, or remotely. +// Here we just use a local AsyncAPI file +import INPUT from '../../asyncapi.json'; +const input = INPUT; + +// Generate all the files +generator.generateToFiles( + input, + FINAL_OUTPUT_PATH, + { + packageName: 'java/com/mycompany/app' + } +); \ No newline at end of file diff --git a/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/package.json b/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/package.json new file mode 100644 index 0000000000..ef0ee6fd81 --- /dev/null +++ b/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/package.json @@ -0,0 +1,10 @@ +{ + "dependencies": { + "@asyncapi/modelina": "file:../../../../", + "ts-node": "^10.3.0" + }, + "scripts": { + "generate": "./node_modules/.bin/ts-node ./generate.ts", + "generate:windows": "..\\node_modules\\.bin\\ts-node .%\\generate.ts" + } +} diff --git a/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/Address.java b/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/Address.java new file mode 100644 index 0000000000..c79052ee4c --- /dev/null +++ b/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/Address.java @@ -0,0 +1,40 @@ +package com.mycompany.app.generic; +import com.mycompany.app.generic.NestedObject; +import java.util.Map; +import com.fasterxml.jackson.annotation.*; +public class Address { + @JsonProperty("street_name") + private String streetName; + @JsonProperty("house_number") + private Double houseNumber; + @JsonProperty("marriage") + private boolean marriage; + @JsonProperty("members") + private Object members; + @JsonProperty("array_type") + private Object[] arrayType; + @JsonProperty("nestedObject") + private NestedObject nestedObject; + private Map additionalProperties; + + public String getStreetName() { return this.streetName; } + public void setStreetName(String streetName) { this.streetName = streetName; } + + public Double getHouseNumber() { return this.houseNumber; } + public void setHouseNumber(Double houseNumber) { this.houseNumber = houseNumber; } + + public boolean getMarriage() { return this.marriage; } + public void setMarriage(boolean marriage) { this.marriage = marriage; } + + public Object getMembers() { return this.members; } + public void setMembers(Object members) { this.members = members; } + + public Object[] getArrayType() { return this.arrayType; } + public void setArrayType(Object[] arrayType) { this.arrayType = arrayType; } + + public NestedObject getNestedObject() { return this.nestedObject; } + public void setNestedObject(NestedObject nestedObject) { this.nestedObject = nestedObject; } + + public Map getAdditionalProperties() { return this.additionalProperties; } + public void setAdditionalProperties(Map additionalProperties) { this.additionalProperties = additionalProperties; } +} \ No newline at end of file diff --git a/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/NestedObject.java b/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/NestedObject.java new file mode 100644 index 0000000000..aec38ec8f2 --- /dev/null +++ b/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/NestedObject.java @@ -0,0 +1,15 @@ +package com.mycompany.app.generic; + +import java.util.Map; +import com.fasterxml.jackson.annotation.*; +public class NestedObject { + @JsonProperty("test") + private String test; + private Map additionalProperties; + + public String getTest() { return this.test; } + public void setTest(String test) { this.test = test; } + + public Map getAdditionalProperties() { return this.additionalProperties; } + public void setAdditionalProperties(Map additionalProperties) { this.additionalProperties = additionalProperties; } +} \ No newline at end of file diff --git a/examples/integrate-modelina-into-maven/package.json b/examples/integrate-modelina-into-maven/package.json new file mode 100644 index 0000000000..62ab65c543 --- /dev/null +++ b/examples/integrate-modelina-into-maven/package.json @@ -0,0 +1,12 @@ +{ + "config": { + "example_name": "integrate-modelina-into-maven" + }, + "scripts": { + "install": "(cd ../.. && npm i) && cd maven-project/scripts/modelina && npm i", + "start": "cd ./examples/$npm_package_config_example_name/maven-project/scripts/modelina && npm run generate", + "start:windows": "cd ./examples/%npm_package_config_example_name%/maven-project/scripts/modelina && npm run generate:windows", + "test": "npm run start", + "test:windows": "npm run start:windows" + } +} diff --git a/modelina-website/scripts/build-examples.js b/modelina-website/scripts/build-examples.js index 5074162b07..dcc9732975 100644 --- a/modelina-website/scripts/build-examples.js +++ b/modelina-website/scripts/build-examples.js @@ -28,6 +28,14 @@ const nameMapping = [ 'php' ]; +const examplesToIgnore = [ + 'integrate-with-react', + 'integrate-with-next', + 'integrate-modelina-into-maven', + 'TEMPLATE' +] + + /** * Find the proper language type for the output code. * @@ -53,7 +61,7 @@ function getOutput(exampleDirPath){ const consoleLogOutputPath = path.resolve(exampleDirPath, './__snapshots__/index.spec.ts.snap'); let output = require(consoleLogOutputPath); output = Object.values(output).map((exportValue) => { - const searchValue = 'Array [\n \"\"'; + const searchValue = 'Array [\n ""'; exportValue = exportValue.slice(searchValue.length, exportValue.length); exportValue = exportValue.slice(0, exportValue.length-5); exportValue = exportValue.replace(/\\/g, ""); @@ -83,7 +91,7 @@ async function start() { //Filter out any examples that either: // 1. are impossible to show (react and next examples) // 2. should not be shown - exampleDirs = exampleDirs.filter((dir) => dir !== 'TEMPLATE' && dir !== 'integrate-with-react' && dir !== 'integrate-with-next'); + exampleDirs = exampleDirs.filter((dir) => !examplesToIgnore.includes(dir)); const templateConfig = {}; for (const example of exampleDirs) { @@ -111,9 +119,16 @@ async function start() { mainReadme = mainReadme.replace('', ''); mainReadme = mainReadme.replace('', ''); mainReadme = mainReadme.replace('', ''); +<<<<<<< Updated upstream mainReadme = mainReadme.replace('- [integrate with React](?selectedExample=integrate-with-react/)', '- [integrate with React](https://github.com/asyncapi/modelina/tree/master/examples/integrate-with-react)'); mainReadme = mainReadme.replace('- [integrate with Next](?selectedExample=integrate-with-next/)', '- [integrate with Next](https://github.com/asyncapi/modelina/tree/master/examples/integrate-with-next)'); mainReadme = mainReadme.replace('- [TEMPLATE](?selectedExample=TEMPLATE)', '- [TEMPLATE](https://github.com/asyncapi/modelina/tree/master/examples/TEMPLATE)'); +======= + mainReadme = mainReadme.replace('../docs/contributing.md', 'https://github.com/asyncapi/modelina/tree/master/examples/../docs/contributing.md'); + for (const exampleToIgnore of exampleToIgnore) { + mainReadme = mainReadme.replace(`- [${exampleToIgnore}](?selectedExample=${exampleToIgnore}/)`, `- [${exampleToIgnore}](https://github.com/asyncapi/modelina/tree/master/examples/${exampleToIgnore})`); + } +>>>>>>> Stashed changes const readmePath = path.resolve(__dirname, '../config/examples_readme.json'); await writeFile(readmePath, JSON.stringify(mainReadme)) } From 1e78ba10606521786fd0413412e0b828e9cf0ae3 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Wed, 25 Oct 2023 12:43:27 +0200 Subject: [PATCH 2/6] finished final implementation details --- .../maven-project/README.md | 2 +- .../scripts/modelina/generate.ts | 10 +- .../scripts/modelina/package-lock.json | 243 ++++++++++++++++++ .../scripts/modelina/package.json | 2 +- .../com/mycompany/app/AnonymousSchema_1.java | 11 + .../com/mycompany/app/generic/Address.java | 40 --- .../mycompany/app/generic/NestedObject.java | 15 -- .../package-lock.json | 10 + .../package.json | 4 +- 9 files changed, 271 insertions(+), 66 deletions(-) create mode 100644 examples/integrate-modelina-into-maven/maven-project/scripts/modelina/package-lock.json create mode 100644 examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/AnonymousSchema_1.java delete mode 100644 examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/Address.java delete mode 100644 examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/NestedObject.java create mode 100644 examples/integrate-modelina-into-maven/package-lock.json diff --git a/examples/integrate-modelina-into-maven/maven-project/README.md b/examples/integrate-modelina-into-maven/maven-project/README.md index 62019d60b7..c736dafd53 100644 --- a/examples/integrate-modelina-into-maven/maven-project/README.md +++ b/examples/integrate-modelina-into-maven/maven-project/README.md @@ -7,4 +7,4 @@ Here is how it works: - The input, in this case, is an AsyncAPI document located in the root of the project `./asyncapi.json`. The input can be anything, just alter the generator script. - The Maven project file `./pom.xml` then utilizes the [frontend-maven-plugin](https://github.com/eirslett/frontend-maven-plugin) to execute the generate script on build so you will always have the up to date models from your AsyncAPI document. -> NOTICE: The only thing you manually have to change for this to work in your project is the dependency entry for `"@asyncapi/modelina": "file:../../../../",` in the `./scripts/modelina/package.json` file to use the latest Modelina version (we only use a local one for testing purposes). \ No newline at end of file +> NOTICE: The only thing you manually have to change for this to work in your project is the dependency entry for `"@asyncapi/modelina": "file:../../../../../",` in the `./scripts/modelina/package.json` file to use the latest Modelina version (we only use a local one for testing purposes). \ No newline at end of file diff --git a/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/generate.ts b/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/generate.ts index d2fb53a025..379703d4a2 100644 --- a/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/generate.ts +++ b/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/generate.ts @@ -17,10 +17,6 @@ import INPUT from '../../asyncapi.json'; const input = INPUT; // Generate all the files -generator.generateToFiles( - input, - FINAL_OUTPUT_PATH, - { - packageName: 'java/com/mycompany/app' - } -); \ No newline at end of file +generator.generateToFiles(input, FINAL_OUTPUT_PATH, { + packageName: 'com.mycompany.app' +}); diff --git a/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/package-lock.json b/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/package-lock.json new file mode 100644 index 0000000000..506cfc5437 --- /dev/null +++ b/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/package-lock.json @@ -0,0 +1,243 @@ +{ + "name": "modelina", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@asyncapi/modelina": "file:../../../../../", + "ts-node": "^10.3.0" + } + }, + "../../../..": { + "extraneous": true + }, + "../../../../..": { + "name": "@asyncapi/modelina", + "version": "2.0.1", + "license": "Apache-2.0", + "dependencies": { + "@apidevtools/json-schema-ref-parser": "^9.0.9", + "@apidevtools/swagger-parser": "^10.0.3", + "@asyncapi/avro-schema-parser": "^3.0.2", + "@asyncapi/openapi-schema-parser": "^3.0.5", + "@asyncapi/parser": "^2.1.0", + "@asyncapi/raml-dt-schema-parser": "^4.0.4", + "@swc/core": "^1.3.5", + "@swc/jest": "^0.2.23", + "@types/node": "^20.3.3", + "alterschema": "^1.1.2", + "change-case": "^4.1.2", + "cross-env": "^7.0.3", + "openapi-types": "9.3.0", + "typescript-json-schema": "^0.58.1" + }, + "devDependencies": { + "@asyncapi/parserV1": "npm:@asyncapi/parser@^1.17.2", + "@types/jest": "^27.0.2", + "@typescript-eslint/eslint-plugin": "^6.7.5", + "@typescript-eslint/parser": "^6.7.5", + "ajv": "^8.6.3", + "concurrently": "^7.5.0", + "eslint": "^8.51.0", + "eslint-config-prettier": "9.0.0", + "eslint-plugin-github": "^4.10.1", + "eslint-plugin-jest": "^27.2.1", + "eslint-plugin-prettier": "^5.0.1", + "eslint-plugin-security": "^1.7.1", + "eslint-plugin-sonarjs": "^0.19.0", + "jest": "^27.2.5", + "markdown-toc": "^1.2.0", + "ts-jest": "^27.0.5", + "ts-node": "^10.3.0", + "typedoc": "^0.24.8", + "typescript": "4.9.5" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@asyncapi/modelina": { + "resolved": "../../../../..", + "link": true + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==" + }, + "node_modules/@types/node": { + "version": "20.8.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.8.tgz", + "integrity": "sha512-YRsdVxq6OaLfmR9Hy816IMp33xOBjfyOgUd77ehqg96CFywxAPbDbXvAsuN2KVg2HOT8Eh6uAfU+l4WffwPVrQ==", + "peer": true, + "dependencies": { + "undici-types": "~5.25.1" + } + }, + "node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" + }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/typescript": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.25.3", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz", + "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==", + "peer": true + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "engines": { + "node": ">=6" + } + } + } +} diff --git a/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/package.json b/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/package.json index ef0ee6fd81..9a4203ab4a 100644 --- a/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/package.json +++ b/examples/integrate-modelina-into-maven/maven-project/scripts/modelina/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "@asyncapi/modelina": "file:../../../../", + "@asyncapi/modelina": "file:../../../../../", "ts-node": "^10.3.0" }, "scripts": { diff --git a/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/AnonymousSchema_1.java b/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/AnonymousSchema_1.java new file mode 100644 index 0000000000..499cb7f448 --- /dev/null +++ b/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/AnonymousSchema_1.java @@ -0,0 +1,11 @@ +package com.mycompany.app; + +import com.fasterxml.jackson.annotation.*; +public class AnonymousSchema_1 { + @JsonProperty("email") + @JsonInclude(JsonInclude.Include.NON_NULL) + private String email; + + public String getEmail() { return this.email; } + public void setEmail(String email) { this.email = email; } +} \ No newline at end of file diff --git a/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/Address.java b/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/Address.java deleted file mode 100644 index c79052ee4c..0000000000 --- a/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/Address.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.mycompany.app.generic; -import com.mycompany.app.generic.NestedObject; -import java.util.Map; -import com.fasterxml.jackson.annotation.*; -public class Address { - @JsonProperty("street_name") - private String streetName; - @JsonProperty("house_number") - private Double houseNumber; - @JsonProperty("marriage") - private boolean marriage; - @JsonProperty("members") - private Object members; - @JsonProperty("array_type") - private Object[] arrayType; - @JsonProperty("nestedObject") - private NestedObject nestedObject; - private Map additionalProperties; - - public String getStreetName() { return this.streetName; } - public void setStreetName(String streetName) { this.streetName = streetName; } - - public Double getHouseNumber() { return this.houseNumber; } - public void setHouseNumber(Double houseNumber) { this.houseNumber = houseNumber; } - - public boolean getMarriage() { return this.marriage; } - public void setMarriage(boolean marriage) { this.marriage = marriage; } - - public Object getMembers() { return this.members; } - public void setMembers(Object members) { this.members = members; } - - public Object[] getArrayType() { return this.arrayType; } - public void setArrayType(Object[] arrayType) { this.arrayType = arrayType; } - - public NestedObject getNestedObject() { return this.nestedObject; } - public void setNestedObject(NestedObject nestedObject) { this.nestedObject = nestedObject; } - - public Map getAdditionalProperties() { return this.additionalProperties; } - public void setAdditionalProperties(Map additionalProperties) { this.additionalProperties = additionalProperties; } -} \ No newline at end of file diff --git a/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/NestedObject.java b/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/NestedObject.java deleted file mode 100644 index aec38ec8f2..0000000000 --- a/examples/integrate-modelina-into-maven/maven-project/src/main/java/com/mycompany/app/generic/NestedObject.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.mycompany.app.generic; - -import java.util.Map; -import com.fasterxml.jackson.annotation.*; -public class NestedObject { - @JsonProperty("test") - private String test; - private Map additionalProperties; - - public String getTest() { return this.test; } - public void setTest(String test) { this.test = test; } - - public Map getAdditionalProperties() { return this.additionalProperties; } - public void setAdditionalProperties(Map additionalProperties) { this.additionalProperties = additionalProperties; } -} \ No newline at end of file diff --git a/examples/integrate-modelina-into-maven/package-lock.json b/examples/integrate-modelina-into-maven/package-lock.json new file mode 100644 index 0000000000..925777425c --- /dev/null +++ b/examples/integrate-modelina-into-maven/package-lock.json @@ -0,0 +1,10 @@ +{ + "name": "integrate-modelina-into-maven", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "hasInstallScript": true + } + } +} diff --git a/examples/integrate-modelina-into-maven/package.json b/examples/integrate-modelina-into-maven/package.json index 62ab65c543..1425f5cf7d 100644 --- a/examples/integrate-modelina-into-maven/package.json +++ b/examples/integrate-modelina-into-maven/package.json @@ -4,8 +4,8 @@ }, "scripts": { "install": "(cd ../.. && npm i) && cd maven-project/scripts/modelina && npm i", - "start": "cd ./examples/$npm_package_config_example_name/maven-project/scripts/modelina && npm run generate", - "start:windows": "cd ./examples/%npm_package_config_example_name%/maven-project/scripts/modelina && npm run generate:windows", + "start": "cd ./maven-project/scripts/modelina && npm run generate", + "start:windows": "cd ./maven-project/scripts/modelina && npm run generate:windows", "test": "npm run start", "test:windows": "npm run start:windows" } From b3cd7d367ac7d600857c377b4731aa07a14ccf69 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Wed, 25 Oct 2023 12:44:02 +0200 Subject: [PATCH 3/6] finished final implementation details --- examples/integrate-modelina-into-maven/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/integrate-modelina-into-maven/README.md b/examples/integrate-modelina-into-maven/README.md index 8237839d08..9e266fb740 100644 --- a/examples/integrate-modelina-into-maven/README.md +++ b/examples/integrate-modelina-into-maven/README.md @@ -1,3 +1,3 @@ # Integrate Modelina into Maven -This example show how you can integrate Modelina into Maven with a custom build script. [Please have a look at the Maven project README file for further information](./maven-project/). \ No newline at end of file +This example show how you can integrate Modelina into Maven with a custom build script. [Please have a look at the Maven project README file for further information](./maven-project/README.md). \ No newline at end of file From ef67d4c137a900ce46e966e58d4676f06facff22 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Wed, 25 Oct 2023 12:51:43 +0200 Subject: [PATCH 4/6] fixed remaining merge conflict --- modelina-website/scripts/build-examples.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modelina-website/scripts/build-examples.js b/modelina-website/scripts/build-examples.js index dcc9732975..6aa13f1d92 100644 --- a/modelina-website/scripts/build-examples.js +++ b/modelina-website/scripts/build-examples.js @@ -119,16 +119,10 @@ async function start() { mainReadme = mainReadme.replace('', ''); mainReadme = mainReadme.replace('', ''); mainReadme = mainReadme.replace('', ''); -<<<<<<< Updated upstream - mainReadme = mainReadme.replace('- [integrate with React](?selectedExample=integrate-with-react/)', '- [integrate with React](https://github.com/asyncapi/modelina/tree/master/examples/integrate-with-react)'); - mainReadme = mainReadme.replace('- [integrate with Next](?selectedExample=integrate-with-next/)', '- [integrate with Next](https://github.com/asyncapi/modelina/tree/master/examples/integrate-with-next)'); - mainReadme = mainReadme.replace('- [TEMPLATE](?selectedExample=TEMPLATE)', '- [TEMPLATE](https://github.com/asyncapi/modelina/tree/master/examples/TEMPLATE)'); -======= mainReadme = mainReadme.replace('../docs/contributing.md', 'https://github.com/asyncapi/modelina/tree/master/examples/../docs/contributing.md'); for (const exampleToIgnore of exampleToIgnore) { mainReadme = mainReadme.replace(`- [${exampleToIgnore}](?selectedExample=${exampleToIgnore}/)`, `- [${exampleToIgnore}](https://github.com/asyncapi/modelina/tree/master/examples/${exampleToIgnore})`); } ->>>>>>> Stashed changes const readmePath = path.resolve(__dirname, '../config/examples_readme.json'); await writeFile(readmePath, JSON.stringify(mainReadme)) } From f7c569c8db0c979b65e4961012787d0eee818a58 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Wed, 25 Oct 2023 12:55:02 +0200 Subject: [PATCH 5/6] fixed remaining merge conflict --- modelina-website/scripts/build-examples.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modelina-website/scripts/build-examples.js b/modelina-website/scripts/build-examples.js index 6aa13f1d92..d06c83875b 100644 --- a/modelina-website/scripts/build-examples.js +++ b/modelina-website/scripts/build-examples.js @@ -120,7 +120,7 @@ async function start() { mainReadme = mainReadme.replace('', ''); mainReadme = mainReadme.replace('', ''); mainReadme = mainReadme.replace('../docs/contributing.md', 'https://github.com/asyncapi/modelina/tree/master/examples/../docs/contributing.md'); - for (const exampleToIgnore of exampleToIgnore) { + for (const exampleToIgnore of examplesToIgnore) { mainReadme = mainReadme.replace(`- [${exampleToIgnore}](?selectedExample=${exampleToIgnore}/)`, `- [${exampleToIgnore}](https://github.com/asyncapi/modelina/tree/master/examples/${exampleToIgnore})`); } const readmePath = path.resolve(__dirname, '../config/examples_readme.json'); From eccb7c8f121cd034045d5af975a77dd6abfaa4b7 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Wed, 25 Oct 2023 13:04:43 +0200 Subject: [PATCH 6/6] update example generation --- examples/README.md | 2 +- modelina-website/package-lock.json | 84 ++++++++++++++++++++++ modelina-website/scripts/build-examples.js | 2 +- 3 files changed, 86 insertions(+), 2 deletions(-) diff --git a/examples/README.md b/examples/README.md index 91e92b7013..67911e0fc1 100644 --- a/examples/README.md +++ b/examples/README.md @@ -70,7 +70,7 @@ These are all the basic generator examples that shows a bare minimal example of These are examples of how you can integrate Modelina into a specific scenario: - [integrate-with-react](./integrate-with-react) - A basic example that shows how you can integrate Modelina with React. - [integrate-with-next](./integrate-with-next) - A basic example that shows how you can integrate Modelina with Next. -- [integrate-modelina-into-maven/](./integrate-modelina-into-maven/) - A basic example that shows how you can integrate Modelina into the Java Maven build process. +- [integrate-modelina-into-maven](./integrate-modelina-into-maven) - A basic example that shows how you can integrate Modelina into the Java Maven build process. ## Python These are all specific examples only relevant to the Python generator: diff --git a/modelina-website/package-lock.json b/modelina-website/package-lock.json index 1e968289d9..092007944c 100644 --- a/modelina-website/package-lock.json +++ b/modelina-website/package-lock.json @@ -7044,6 +7044,66 @@ "type": "github", "url": "https://github.com/sponsors/wooorm" } + }, + "node_modules/@next/swc-android-arm-eabi": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.5.tgz", + "integrity": "sha512-QAEf3YM9U0qWVQTxgF3Tsh4OeCN1i9Smsf6cVlwZsPzoLyj2nQ879joCoN+ONqDknkBgG6OG/ajefywL3jw9Cg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-android-arm64": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.5.tgz", + "integrity": "sha512-ZmtGPTghRuT5YKL0nNcC2bBVSiG1O0is16eIZ2rWSP/hRW64ZCcAew6pxw2rihntNp22UfequjSTHd91WE/tyQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-freebsd-x64": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.5.tgz", + "integrity": "sha512-nR4a/SNblG0w8hhYRflTZjk4yD99ld18w/FCftw99ziw8sgciBlOXRICJIiRIaMRU8UH7QLSgBOQVnfNcVNKMA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@next/swc-linux-arm-gnueabihf": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.5.tgz", + "integrity": "sha512-EzkltCVKg3gUzamoeKPhGeSgXTTLAhSzc7v/+g1Y+HQa7JKMrlzdRkrJf+H4LJXcz7lnxgNKHGRyZBSXnmJKJw==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } } }, "dependencies": { @@ -11823,6 +11883,30 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==" + }, + "@next/swc-android-arm-eabi": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.5.tgz", + "integrity": "sha512-QAEf3YM9U0qWVQTxgF3Tsh4OeCN1i9Smsf6cVlwZsPzoLyj2nQ879joCoN+ONqDknkBgG6OG/ajefywL3jw9Cg==", + "optional": true + }, + "@next/swc-android-arm64": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.5.tgz", + "integrity": "sha512-ZmtGPTghRuT5YKL0nNcC2bBVSiG1O0is16eIZ2rWSP/hRW64ZCcAew6pxw2rihntNp22UfequjSTHd91WE/tyQ==", + "optional": true + }, + "@next/swc-freebsd-x64": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.5.tgz", + "integrity": "sha512-nR4a/SNblG0w8hhYRflTZjk4yD99ld18w/FCftw99ziw8sgciBlOXRICJIiRIaMRU8UH7QLSgBOQVnfNcVNKMA==", + "optional": true + }, + "@next/swc-linux-arm-gnueabihf": { + "version": "13.1.5", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.5.tgz", + "integrity": "sha512-EzkltCVKg3gUzamoeKPhGeSgXTTLAhSzc7v/+g1Y+HQa7JKMrlzdRkrJf+H4LJXcz7lnxgNKHGRyZBSXnmJKJw==", + "optional": true } } } diff --git a/modelina-website/scripts/build-examples.js b/modelina-website/scripts/build-examples.js index d06c83875b..1caa89c799 100644 --- a/modelina-website/scripts/build-examples.js +++ b/modelina-website/scripts/build-examples.js @@ -121,7 +121,7 @@ async function start() { mainReadme = mainReadme.replace('', ''); mainReadme = mainReadme.replace('../docs/contributing.md', 'https://github.com/asyncapi/modelina/tree/master/examples/../docs/contributing.md'); for (const exampleToIgnore of examplesToIgnore) { - mainReadme = mainReadme.replace(`- [${exampleToIgnore}](?selectedExample=${exampleToIgnore}/)`, `- [${exampleToIgnore}](https://github.com/asyncapi/modelina/tree/master/examples/${exampleToIgnore})`); + mainReadme = mainReadme.replace(`- [${exampleToIgnore}](?selectedExample=${exampleToIgnore})`, `- [${exampleToIgnore}](https://github.com/asyncapi/modelina/tree/master/examples/${exampleToIgnore})`); } const readmePath = path.resolve(__dirname, '../config/examples_readme.json'); await writeFile(readmePath, JSON.stringify(mainReadme))