diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 0000000..e5b6d8d --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000..edef2eb --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "restricted", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..56eea9e --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,6 @@ +## Explanation of Changes + +## Checklist before requesting a review + +- [ ] I have performed a self-review of my code +- [ ] Tested via unit tests diff --git a/.github/workflows/branch.yml b/.github/workflows/branch.yml deleted file mode 100644 index 0ad4c1c..0000000 --- a/.github/workflows/branch.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Branch -on: - pull_request: - -jobs: - build: - name: Build - uses: flexbase-eng/.github/.github/workflows/build.typescript.yml@main - secrets: inherit - with: - node_version: '20' - - unit-test: - name: Run unit tests - needs: build - uses: flexbase-eng/.github/.github/workflows/test.unit.typescript.yml@main - secrets: inherit - with: - node_version: '20' - - coverage: - name: Compute test coverage - needs: [unit-test] - uses: flexbase-eng/.github/.github/workflows/coverage.sonarcloud.yml@main - secrets: inherit - - package: - name: Package artifacts - needs: build - uses: flexbase-eng/.github/.github/workflows/package.typescript.yml@main - secrets: inherit - with: - version_command: '' - packr_command: 'packr' - build_artifact_folder: 'output' - - deploy: - needs: [package, coverage] - uses: flexbase-eng/.github/.github/workflows/deploy.npm.yml@main - secrets: inherit - with: - node_version: '20' - tag: beta - build_artifact_folder: '' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c38d8cd --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,62 @@ +name: Build +on: + workflow_call: + inputs: + node_version: + required: true + type: string + environment: + required: true + type: string + tag: + required: false + type: string + default: latest + build_cache_key: + required: false + type: string + default: build-cache-${{ github.sha }} + +jobs: + initenv: + uses: ./.github/workflows/initialize.environment.yml + with: + environment: ${{ inputs.environment }} + build_cache_key: ${{ inputs.build_cache_key }} + node_version: ${{ inputs.node_version }} + + dependencies: + needs: [initenv] + uses: ./.github/workflows/node.dependencies.yml + secrets: inherit + with: + node_version: ${{ needs.initenv.outputs.node_version }} + environment: ${{ needs.initenv.outputs.environment }} + + compile: + needs: [initenv, dependencies] + uses: ./.github/workflows/compile.yml + secrets: inherit + with: + node_version: ${{ inputs.node_version }} + build_cache_key: ${{ inputs.build_cache_key }} + dependencies_cache_key: ${{ needs.dependencies.outputs.cache_key }} + + unittest: + needs: [initenv, dependencies, compile] + uses: ./.github/workflows/unit.test.yml + secrets: inherit + with: + node_version: ${{ inputs.node_version }} + build_cache_key: ${{ inputs.build_cache_key }} + coverage_artifact_folder: 'apps/cli/coverage/lcov.info' + + deploy: + name: Deploy + uses: ./.github/workflows/deploy.yml + needs: [unittest] + secrets: inherit + with: + node_version: ${{ inputs.node_version }} + build_cache_key: ${{ inputs.build_cache_key }} + tag: ${{ inputs.tag }} diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml new file mode 100644 index 0000000..57f2dc4 --- /dev/null +++ b/.github/workflows/compile.yml @@ -0,0 +1,89 @@ +name: Compile +on: + workflow_call: + inputs: + node_version: + required: true + type: string + build_cache_key: + required: true + type: string + dependencies_cache_key: + required: true + type: string + package_manager: + required: false + type: string + default: pnpm + node_modules_path: + required: false + type: string + default: ./node_modules + turbo_cache_path: + required: false + type: string + default: ./.turbo + +jobs: + Compile: + runs-on: ubuntu-latest + env: + CLI_BUILD: pnpm turbo build:ci + CLI_INSTALL: pnpm install --frozen-lockfile + CLI_LINT: pnpm turbo lint + PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Install pnpm + if: ${{ inputs.package_manager == 'pnpm' }} + uses: pnpm/action-setup@v4 + + - name: Setup Node ${{ inputs.node_version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node_version }} + cache: ${{ inputs.package_manager }} + + - name: Retrieve dependencies cache + id: dependencies-cache + uses: actions/cache/restore@v4 + with: + path: ${{ inputs.node_modules_path }} + key: ${{ inputs.dependencies_cache_key }} + fail-on-cache-miss: true + + - name: Retrieve turbo cache + uses: actions/cache/restore@v4 + with: + path: ${{ inputs.turbo_cache_path }} + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: ${{ runner.os }}-turbo- + + - name: Install dependencies + env: + NODE_ENV: development # ensure all the dev dependencies are installed + run: ${{ env.CLI_INSTALL }} + + - name: Build + run: ${{ env.CLI_BUILD }} + + - name: Lint + run: ${{ env.CLI_LINT }} + + - name: Upload turbo cache + uses: actions/cache@v4 + with: + path: ${{ inputs.turbo_cache_path }} + key: ${{ runner.os }}-turbo-${{ github.sha }} + + - name: Upload build cache + uses: actions/cache@v4 + with: + path: ./* + key: ${{ inputs.build_cache_key }} diff --git a/.github/workflows/conclusion.yml b/.github/workflows/conclusion.yml new file mode 100644 index 0000000..f13aa62 --- /dev/null +++ b/.github/workflows/conclusion.yml @@ -0,0 +1,25 @@ +name: Conclusion +on: + workflow_call: + inputs: + is_success: + required: true + type: boolean + release_title: + required: true + type: string + +jobs: + github-release: + if: github.ref == 'refs/heads/main' && inputs.is_success + name: Update github release + uses: flexbase-eng/.github/.github/workflows/notify.github.release.yml@main + secrets: inherit + + notify-slack: + name: Slack notification + uses: flexbase-eng/.github/.github/workflows/notify.slack.yml@main + secrets: inherit + with: + release_title: ${{ inputs.release_title }} + is_success: ${{ inputs.is_success }} diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..ee6b372 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,67 @@ +name: Coverage +on: + workflow_call: + inputs: + project_key: + required: false + type: string + default: 'flexbase-eng_${{ github.event.repository.name }}' + coverage_artifact_folder: + required: false + type: string + default: 'coverage' + coverage_artifact_name: + required: false + type: string + default: 'code-coverage-report' + js_report_path: + required: false + type: string + default: 'coverage/lcov.info' + src_path: + required: false + type: string + default: './src/' + test_path: + required: false + type: string + default: './tests/' + exclusions: + required: false + type: string + default: '**/generated/**' + +env: + SONAR_ORG: flexbase + SONAR_PROJECT_KEY: ${{ inputs.project_key }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + +jobs: + sonarcloud: + name: Sonarcloud Analysis + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Retrieve coverage artifacts + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.coverage_artifact_name }} + path: ${{ inputs.coverage_artifact_folder }} + + - name: SonarCloud Scan + uses: sonarsource/sonarcloud-github-action@master + with: + args: > + -Dsonar.organization=${{ env.SONAR_ORG }} + -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} + -Dsonar.javascript.lcov.reportPaths=${{ inputs.js_report_path }} + -Dsonar.sources=${{inputs.src_path}} + -Dsonar.tests=${{inputs.test_path}} + -Dsonar.exclusions=${{inputs.exclusions}} + -Dsonar.log.level=WARN diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..2a4e411 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,72 @@ +name: Deploy +on: + workflow_call: + inputs: + node_version: + required: true + type: string + build_cache_key: + required: true + type: string + tag: + required: false + type: string + default: latest + registry_url: + required: false + type: string + default: 'https://registry.npmjs.org' + description: The package registry to use. Defaults to 'https://registry.npmjs.org' + secrets: + NODE_AUTH_TOKEN: + required: true +env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} + CLI_DEPLOY: pnpm deploy --prod ./apps/cli/bin --filter=cli + CLI_PUBLISH: pnpm publish ./apps/cli/bin --tag ${{ inputs.tag }} --no-git-checks + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node ${{ inputs.node_version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node_version }} + cache: pnpm + registry-url: ${{ inputs.registry_url }} + always-auth: true + + - name: Retrieve build cache + id: cache + uses: actions/cache/restore@v4 + with: + path: ./* + key: ${{ inputs.build_cache_key }} + fail-on-cache-miss: true + + # reference: https://stackoverflow.com/questions/54310050/how-to-version-build-artifacts-using-github-actions + # - name: beta - version value from package.json + # if: inputs.tag != 'latest' + # run: | + # npm i -g json + # json -I -f package.json -e "this.version=\"$(json -f package.json | json version)-${{ inputs.tag }}.${{ github.run_number }}\"" + + - name: Prep + run: | + ${{ env.CLI_DEPLOY }} + pnpm turbo packr + npm i -g json + json -I -f ./apps/cli/bin/package.json -e "this.name=@flexbase/openapi-generator" + + - name: Publish + run: ${{ env.CLI_PUBLISH }} diff --git a/.github/workflows/initialize.environment.yml b/.github/workflows/initialize.environment.yml new file mode 100644 index 0000000..2efa407 --- /dev/null +++ b/.github/workflows/initialize.environment.yml @@ -0,0 +1,55 @@ +name: Build and Test +on: + workflow_call: + inputs: + environment: + required: true + type: string + build_cache_key: + required: true + type: string + node_version: + required: true + type: string + outputs: + node_version: + value: ${{ jobs.setenv.outputs.node_version }} + build_cache_key: + value: ${{ jobs.setenv.outputs.build_cache_key }} + gcp_workload_identity_provider: + value: ${{ jobs.setenv.outputs.gcp_workload_identity_provider }} + gcp_sa_email: + value: ${{ jobs.setenv.outputs.gcp_sa_email }} + gcp_project_id: + value: ${{ jobs.setenv.outputs.gcp_project_id }} + flexbase_env: + value: ${{ jobs.setenv.outputs.flexbase_env }} + node_env: + value: ${{ jobs.setenv.outputs.node_env }} + node_port: + value: ${{ jobs.setenv.outputs.node_port }} + gcp_docker_repository: + value: ${{ jobs.setenv.outputs.gcp_docker_repository }} + gcp_zone_id: + value: ${{ jobs.setenv.outputs.gcp_zone_id }} + environment: + value: ${{ inputs.environment }} + +jobs: + setenv: + name: Initialize environment variables + runs-on: ubuntu-latest + environment: ${{ inputs.environment }} + outputs: + node_version: ${{ inputs.node_version }} + build_cache_key: ${{ inputs.build_cache_key }} + gcp_workload_identity_provider: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }} + gcp_sa_email: ${{ vars.GCP_PLATFORM_SA_EMAIL }} + gcp_project_id: ${{ vars.GCP_PROJECT_ID }} + flexbase_env: ${{ vars.FLEXBASE_ENV }} + node_env: ${{ vars.NODE_ENV }} + node_port: ${{ vars.NODE_PORT }} + gcp_docker_repository: ${{ vars.GCP_DOCKER_REPOSITORY }} + gcp_zone_id: ${{ vars.ZONE_ID }} + steps: + - run: echo "Initialize environment variables" diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml new file mode 100644 index 0000000..86ad503 --- /dev/null +++ b/.github/workflows/merge.yml @@ -0,0 +1,25 @@ +name: Merge +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + prod: + name: Build Production + uses: ./.github/workflows/build.yml + secrets: inherit + with: + node_version: '20' + environment: 'production' + build_cache_key: build-cache-${{ github.sha }} + + conclusion: + needs: [prod] + if: success() || failure() + uses: ./.github/workflows/conclusion.yml + secrets: inherit + with: + release_title: OpenApi Generator + is_success: ${{ !contains(needs.*.result, 'failure') }} diff --git a/.github/workflows/node.dependencies.yml b/.github/workflows/node.dependencies.yml new file mode 100644 index 0000000..b1aa56f --- /dev/null +++ b/.github/workflows/node.dependencies.yml @@ -0,0 +1,81 @@ +name: Node Dependencies +on: + workflow_call: + inputs: + node_version: + required: true + type: string + environment: + required: true + type: string + package_manager: + required: false + type: string + default: pnpm + node_modules_path: + required: false + type: string + default: ./node_modules + + outputs: + cache_key: + description: Node dependencies cache key + value: ${{ jobs.dependencies.outputs.cache_key}} + +jobs: + dependencies: + name: Node Development Dependencies + runs-on: ubuntu-latest + env: + CLI_INSTALL: pnpm install --frozen-lockfile + LOCK_FILE: pnpm-lock.yaml + CACHE_KEY: + + outputs: + cache_key: ${{ steps.compute-cache-key.outputs.cache_key }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Install pnpm + if: ${{ inputs.package_manager == 'pnpm' }} + uses: pnpm/action-setup@v4 + + - name: Compute cache key + id: compute-cache-key + env: + CACHE_KEY: node-modules-${{ runner.os }}-${{ inputs.environment }}-${{ hashFiles(env.LOCK_FILE) }} + run: | + echo "cache_key=$CACHE_KEY" >> $GITHUB_OUTPUT + echo "CACHE_KEY=$CACHE_KEY" >> $GITHUB_ENV + + - name: Lookup dependencies cache + id: dependencies-cache + uses: actions/cache/restore@v4 + with: + path: ${{ inputs.node_modules_path }} + key: ${{ env.CACHE_KEY }} + lookup-only: true + + - name: Setup Node ${{ inputs.node_version }} + if: steps.dependencies-cache.outputs.cache-hit != 'true' + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node_version }} + cache: ${{ inputs.package_manager }} + + - name: Install dependencies + if: steps.dependencies-cache.outputs.cache-hit != 'true' + env: + NODE_ENV: development # ensure all the dev dependencies are installed + run: ${{ env.CLI_INSTALL }} + + - name: Update dependencies cache + if: steps.dependencies-cache.outputs.cache-hit != 'true' + uses: actions/cache@v4 + with: + path: ${{ inputs.node_modules_path }} + key: ${{ env.CACHE_KEY }} diff --git a/.github/workflows/prod.yml b/.github/workflows/prod.yml deleted file mode 100644 index e8e2f61..0000000 --- a/.github/workflows/prod.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Production -on: - push: - branches: main - -jobs: - build: - name: Build - uses: flexbase-eng/.github/.github/workflows/build.typescript.yml@main - secrets: inherit - with: - node_version: '20' - - unit-test: - name: Run unit tests - needs: build - uses: flexbase-eng/.github/.github/workflows/test.unit.typescript.yml@main - secrets: inherit - with: - node_version: '20' - - coverage: - name: Compute test coverage - needs: [unit-test] - uses: flexbase-eng/.github/.github/workflows/coverage.sonarcloud.yml@main - secrets: inherit - - package: - name: Package artifacts - needs: build - uses: flexbase-eng/.github/.github/workflows/package.typescript.yml@main - secrets: inherit - with: - version_command: '' - packr_command: 'packr' - build_artifact_folder: 'output' - - deploy: - needs: [package, coverage] - uses: flexbase-eng/.github/.github/workflows/deploy.npm.yml@main - secrets: inherit - with: - node_version: '20' - build_artifact_folder: '' - - github-release: - name: Update github release - needs: deploy - uses: flexbase-eng/.github/.github/workflows/notify.github.release.yml@main - secrets: inherit diff --git a/.github/workflows/pull.request.yml b/.github/workflows/pull.request.yml new file mode 100644 index 0000000..321735e --- /dev/null +++ b/.github/workflows/pull.request.yml @@ -0,0 +1,13 @@ +name: Pull Request +on: + pull_request: + +jobs: + pr: + uses: ./.github/workflows/build.yml + secrets: inherit + with: + node_version: '20' + environment: 'development' + build_cache_key: build-cache-${{ github.sha }} + tag: 'beta' diff --git a/.github/workflows/unit.test.yml b/.github/workflows/unit.test.yml new file mode 100644 index 0000000..0ae7166 --- /dev/null +++ b/.github/workflows/unit.test.yml @@ -0,0 +1,81 @@ +name: Unit Test +on: + workflow_call: + inputs: + node_version: + required: true + type: string + build_cache_key: + required: true + type: string + coverage_artifact_folder: + required: false + type: string + default: 'coverage/lcov.info' + coverage_artifact_name: + required: false + type: string + default: 'code-coverage-report' + +jobs: + test: + name: Unit tests + runs-on: ubuntu-latest + env: + CLI_TEST: pnpm turbo test:ci + CLI_INSTALL: pnpm install --frozen-lockfile + permissions: + contents: 'read' + id-token: 'write' + steps: + - name: Checkout + uses: 'actions/checkout@v4' # needed by google auth + with: + fetch-depth: 0 + persist-credentials: false + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node ${{ inputs.node_version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node_version }} + cache: pnpm + + - name: Retrieve build cache + id: cache + uses: actions/cache/restore@v4 + with: + path: ./* + key: ${{ inputs.build_cache_key }} + fail-on-cache-miss: true + + - name: Retrieve turbo cache + uses: actions/cache/restore@v4 + with: + path: ./.turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + restore-keys: ${{ runner.os }}-turbo- + + - name: Install dependencies + env: + NODE_ENV: development # ensure all the dev dependencies are installed + run: ${{ env.CLI_INSTALL }} + + - name: Run tests + run: ${{ env.CLI_TEST }} + + - name: Upload turbo cache + uses: actions/cache@v4 + with: + path: ./.turbo + key: ${{ runner.os }}-turbo-${{ github.sha }} + + - name: Upload coverage artifacts + if: ${{ inputs.coverage_artifact_folder != ''}} + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.coverage_artifact_name }} + path: ${{ inputs.coverage_artifact_folder }} + retention-days: 1 diff --git a/.gitignore b/.gitignore index b8f14df..333138f 100644 --- a/.gitignore +++ b/.gitignore @@ -67,9 +67,17 @@ typings/ # Yarn Integrity file .yarn-integrity +.yarn/* +!.yarn/cache +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions # dotenv environment variables file .env +.env.local .env.test # parcel-bundler cache (https://parceljs.org/) @@ -107,7 +115,7 @@ dist #.vscode # webstorm -#.idea +.idea /dist .DS_Store @@ -115,3 +123,30 @@ dist cypress/videos cypress/screenshots + +/openapi/debug +*.ast.json +*.oasTree.json + +cloud-sql-proxy +# Sentry Auth Token +.sentryclirc + +# cloud sql proxy local logs +nohup.out + +package-lock.json + +types/build + +.node-version + +.twisp/ +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ + +.next/ +.turbo/ +bin/ \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit index c7c5138..9272ad7 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,7 +1,7 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -yarn build -yarn lint-staged -yarn test +# turbo build +# turbo lint +# turbo test diff --git a/LICENSE b/LICENSE index ff56548..96b66ea 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 Flexbase +Copyright (c) 2025 Flexbase Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/apps/LICENSE b/apps/LICENSE new file mode 100644 index 0000000..96b66ea --- /dev/null +++ b/apps/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Flexbase + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/apps/README.md b/apps/README.md new file mode 100644 index 0000000..e2d78fb --- /dev/null +++ b/apps/README.md @@ -0,0 +1,338 @@ +# openapi-generator + +[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_openapi-generator&metric=coverage)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_openapi-generator) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=flexbase-eng_openapi-generator&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=flexbase-eng_openapi-generator) + +[OpenAPI](https://www.openapis.org/) code generator. + +## Getting started + +``` +yarn add @flexbase/openapi-generator --dev +``` + +or + +``` +npm i @flexbase/openapi-generator -D +``` + +## Usage + +``` +openapi-generator -i .yaml -o . -t