diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03a979bea75..a80b27c4e8d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -81,7 +81,7 @@ jobs: npm run oa version-manager help npm run oa generate -- -g ruby -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o $GITHUB_WORKSPACE/tmp/ruby-client (npm run oa version-manager set 3.0.0 && npm run oa version | grep -q '3.0.0') || exit 1 - (npm run oa version-manager set 4.0 && npm run oa version | grep -q '4.0.3') || exit 1 + (npm run oa version-manager set 6.0 && npm run oa version | grep -q '6.0.1') || exit 1 (npm run oa version-manager set 4.3.1 && npm run oa version | grep -q '4.3.1') || exit 1 (npm run oa version-manager set 4.3.1 && npm run oa version | grep -q '4.3.1') || exit 1 (export OPENAPI_GENERATOR_CLI_SEARCH_URL=DEFAULT && npm run oa version-manager set 7.2.0 && npm run oa version | grep -q '7.2.0') || exit 1 diff --git a/apps/generator-cli/src/app/services/version-manager.service.spec.ts b/apps/generator-cli/src/app/services/version-manager.service.spec.ts index 52d88e15113..3e93f05e90a 100644 --- a/apps/generator-cli/src/app/services/version-manager.service.spec.ts +++ b/apps/generator-cli/src/app/services/version-manager.service.spec.ts @@ -142,7 +142,7 @@ describe('VersionManagerService', () => { it('executes one get request', () => { expect(get).toHaveBeenNthCalledWith( 1, - 'https://search.maven.org/solrsearch/select?q=g:org.openapitools+AND+a:openapi-generator-cli&core=gav&start=0&rows=200', + 'https://central.sonatype.com/solrsearch/select?q=g:org.openapitools+AND+a:openapi-generator-cli&core=gav&start=0&rows=200', ); }); @@ -184,7 +184,7 @@ describe('VersionManagerService', () => { it('executes one get request', () => { expect(get).toHaveBeenNthCalledWith( 1, - 'https://search.maven.org/solrsearch/select?q=g:org.openapitools+AND+a:openapi-generator-cli&core=gav&start=0&rows=200', + 'https://central.sonatype.com/solrsearch/select?q=g:org.openapitools+AND+a:openapi-generator-cli&core=gav&start=0&rows=200', ); }); @@ -219,7 +219,7 @@ describe('VersionManagerService', () => { it('executes one get request', () => { expect(get).toHaveBeenNthCalledWith( 1, - 'https://search.maven.org/solrsearch/select?q=g:org.openapitools+AND+a:openapi-generator-cli&core=gav&start=0&rows=200', + 'https://central.sonatype.com/solrsearch/select?q=g:org.openapitools+AND+a:openapi-generator-cli&core=gav&start=0&rows=200', ); }); diff --git a/apps/generator-cli/src/app/services/version-manager.service.ts b/apps/generator-cli/src/app/services/version-manager.service.ts index 937a4a4c749..16797c14315 100644 --- a/apps/generator-cli/src/app/services/version-manager.service.ts +++ b/apps/generator-cli/src/app/services/version-manager.service.ts @@ -23,7 +23,7 @@ export interface Version { } const mvn = { - repo: 'https://search.maven.org', + repo: 'https://central.sonatype.com', groupId: 'org.openapitools', artifactId: 'openapi-generator-cli', }; diff --git a/apps/generator-cli/src/config.schema.json b/apps/generator-cli/src/config.schema.json index 84aaf692617..0979e1f6ff7 100644 --- a/apps/generator-cli/src/config.schema.json +++ b/apps/generator-cli/src/config.schema.json @@ -26,7 +26,7 @@ "repository": { "queryUrl": { "type": "string", - "default": "https://search.maven.org/solrsearch/select?q=g:${group.id}+AND+a:${artifact.id}&core=gav&start=0&rows=200" + "default": "https://central.sonatype.com/solrsearch/select?q=g:${group.id}+AND+a:${artifact.id}&core=gav&start=0&rows=200" }, "downloadUrl": { "type": "string", diff --git a/lib/index.js b/lib/index.js index 41c84663c6c..a823965a0c0 100644 --- a/lib/index.js +++ b/lib/index.js @@ -19,7 +19,7 @@ async function httpGET(url) { } async function getOpenapiGeneratorCliDownloadLinks() { - const baseUrl = 'https://search.maven.org'; + const baseUrl = 'https://central.sonatype.com'; const queryUrl = `${baseUrl}/solrsearch/select?q=g:org.openapitools+AND+a:openapi-generator-cli&core=gav&start=0&rows=200`; return httpGET(queryUrl).then(data => {