From 94f47a9759e7ac57a5a572da8bba7f7d8c6707aa Mon Sep 17 00:00:00 2001 From: Vladimir Gorej Date: Tue, 27 Dec 2022 13:14:10 +0100 Subject: [PATCH] chore: integrate ApiDOM into codebase Refs #2718 --- .github/workflows/nodejs.yml | 12 ++++++++++++ .github/workflows/release.yml | 10 +++++----- .npmrc | 1 + .nvmrc | 2 +- package.json | 18 ++++++++++++++++++ 5 files changed, 37 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 887c68e52..ffb978282 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -23,6 +23,8 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} + registry-url: https://npm.pkg.github.com/ + scope: "@swagger-api" - name: Cache Node Modules id: cache-node-modules uses: actions/cache@v2 @@ -32,6 +34,8 @@ jobs: - name: Install dependencies if: steps.cache-node-modules.outputs.cache-hit != 'true' run: npm ci + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Lint commit message if: github.ref != 'refs/heads/main' && github.actor != 'dependabot[bot]' run: git log -1 --pretty=format:"%s" | npx commitlint @@ -61,6 +65,8 @@ jobs: uses: actions/setup-node@v2 with: node-version: 12.4.x + registry-url: https://npm.pkg.github.com/ + scope: "@swagger-api" - name: Cache Node Modules id: cache-node-modules uses: actions/cache@v2 @@ -70,6 +76,8 @@ jobs: - name: Install dependencies if: steps.cache-node-modules.outputs.cache-hit != 'true' run: npm ci + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Download commonjs build artifacts uses: actions/download-artifact@v1 @@ -83,6 +91,8 @@ jobs: uses: actions/setup-node@v2 with: node-version: 14.x + registry-url: https://npm.pkg.github.com/ + scope: "@swagger-api" - name: Run commonjs build artifacts on Node.js 14.x run: node -p "require('./commonjs')" @@ -90,5 +100,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: 16.x + registry-url: https://npm.pkg.github.com/ + scope: "@swagger-api" - name: Run commonjs build artifacts on Node.js 16.x run: node -p "require('./commonjs')" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a3dfa408..dfee04ccc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ on: workflows: - "Node.js CI" branches: - - master + - char0n/openapi-3-1-support types: - completed jobs: @@ -18,15 +18,16 @@ jobs: with: fetch-depth: 0 persist-credentials: false - - name: Setup Node.js uses: actions/setup-node@v2 with: node-version: 16 - + registry-url: https://npm.pkg.github.com/ + scope: "@swagger-api" - name: Install dependencies run: npm ci - + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Semantic Release id: semantic uses: cycjimmy/semantic-release-action@v3.2.0 @@ -37,7 +38,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Release published if: steps.semantic.outputs.new_release_published == 'true' run: | diff --git a/.npmrc b/.npmrc index e69de29bb..9cfbce585 100644 --- a/.npmrc +++ b/.npmrc @@ -0,0 +1 @@ +@swagger-api:registry=https://npm.pkg.github.com diff --git a/.nvmrc b/.nvmrc index 898c8715b..d4b25d088 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14.17 +16.16 diff --git a/package.json b/package.json index f85ccdf65..eb36905eb 100644 --- a/package.json +++ b/package.json @@ -110,6 +110,7 @@ }, "dependencies": { "@babel/runtime-corejs3": "^7.11.2", + "@swagger-api/apidom-reference": "^0.58.0", "cookie": "~0.5.0", "cross-fetch": "^3.1.5", "deepmerge": "~4.2.2", @@ -122,5 +123,22 @@ "qs": "^6.10.2", "traverse": "~0.6.6", "url": "~0.11.0" + }, + "overrides": { + "@swagger-api/apidom-reference": { + "@swagger-api/apidom-ns-asyncapi-2": "npm:-@0.0.1", + "@swagger-api/apidom-ns-openapi-3-0": "npm:-@0.0.1", + "@swagger-api/apidom-parser-adapter-api-design-systems-json": "npm:-@0.0.1", + "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "npm:-@0.0.1", + "@swagger-api/apidom-parser-adapter-asyncapi-json-2": "npm:-@0.0.1", + "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "npm:-@0.0.1", + "@swagger-api/apidom-parser-adapter-json": "npm:-@0.0.1", + "@swagger-api/apidom-parser-adapter-openapi-json-3-0": "npm:-@0.0.1", + "@swagger-api/apidom-parser-adapter-openapi-json-3-1": "npm:-@0.0.1", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "npm:-@0.0.1", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "npm:-@0.0.1", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "npm:-@0.0.1", + "axios": "npm:-@0.0.1" + } } }