From 446d533df7e9c99e136b3f509f857b6d3861df73 Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Thu, 12 May 2022 12:01:29 +0200 Subject: [PATCH] chore(all): factor the version into clients.config.json (#496) --- .../exceptions/AlgoliaApiException.java | 2 +- .../exceptions/AlgoliaRetryException.java | 2 +- .../exceptions/AlgoliaRuntimeException.java | 2 +- config/clients.config.json | 5 +- config/openapitools.json | 27 ++----- .../algolia/codegen/AlgoliaJavaGenerator.java | 17 +++- .../codegen/AlgoliaJavascriptGenerator.java | 13 ++- .../algolia/codegen/AlgoliaPhpGenerator.java | 11 ++- .../algolia/codegen/GenerationException.java | 4 + .../main/java/com/algolia/codegen/Utils.java | 31 ++++++- package.json | 2 +- scripts/common.ts | 11 +-- scripts/config.ts | 10 +++ scripts/release/common.ts | 10 --- scripts/release/create-release-issue.ts | 15 ++-- scripts/release/process-release.ts | 80 ++++++++++++------- specs/abtesting/spec.yml | 2 +- specs/analytics/spec.yml | 2 +- specs/insights/spec.yml | 2 +- specs/personalization/spec.yml | 2 +- specs/predict/spec.yml | 2 +- specs/query-suggestions/spec.yml | 2 +- specs/recommend/spec.yml | 2 +- specs/search/spec.yml | 2 +- specs/sources/spec.yml | 2 +- templates/java/gradle.properties.mustache | 2 +- templates/php/composer.mustache | 4 +- 27 files changed, 156 insertions(+), 110 deletions(-) diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaApiException.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaApiException.java index ab8dc91ab9..d17692fbf7 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaApiException.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaApiException.java @@ -3,7 +3,7 @@ /** Exception thrown in case of API failure such as 4XX, 5XX error. */ public class AlgoliaApiException extends AlgoliaRuntimeException { - public static final long serialVersionUID = -1L; + public static final long serialVersionUID = 1L; public int getHttpErrorCode() { return httpErrorCode; diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java index 3fbb98c608..b95ff54944 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRetryException.java @@ -6,7 +6,7 @@ */ public class AlgoliaRetryException extends AlgoliaRuntimeException { - public static final long serialVersionUID = -1L; + public static final long serialVersionUID = 1L; public AlgoliaRetryException(String message, Throwable cause) { super(message, cause); diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRuntimeException.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRuntimeException.java index 1099fea1c2..2f06bdfb28 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRuntimeException.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/AlgoliaRuntimeException.java @@ -3,7 +3,7 @@ /** Exception thrown when an error occurs during the Serialization/Deserialization process */ public class AlgoliaRuntimeException extends RuntimeException { - public static final long serialVersionUID = -1L; + public static final long serialVersionUID = 1L; public AlgoliaRuntimeException(String message, Throwable cause) { super(message, cause); diff --git a/config/clients.config.json b/config/clients.config.json index 730ab8bd7a..9a299d5690 100644 --- a/config/clients.config.json +++ b/config/clients.config.json @@ -1,7 +1,7 @@ { "java": { "folder": "clients/algoliasearch-client-java-2", - "mainPackage": "java-search", + "packageVersion": "0.0.1", "modelFolder": "algoliasearch-core/src/main/java/com/algolia/model", "apiFolder": "algoliasearch-core/src/main/java/com/algolia/api", "customGenerator": "algolia-java", @@ -12,7 +12,6 @@ }, "javascript": { "folder": "clients/algoliasearch-client-javascript", - "mainPackage": "javascript-search", "modelFolder": "model", "apiFolder": "src", "customGenerator": "algolia-javascript", @@ -23,7 +22,7 @@ }, "php": { "folder": "clients/algoliasearch-client-php", - "mainPackage": "php-search", + "packageVersion": "0.0.1", "modelFolder": "lib/Model", "customGenerator": "algolia-php", "apiFolder": "lib/Api", diff --git a/config/openapitools.json b/config/openapitools.json index c20e704deb..3c99c907bb 100644 --- a/config/openapitools.json +++ b/config/openapitools.json @@ -143,8 +143,7 @@ "library": "okhttp-gson", "gitRepoId": "algoliasearch-client-java-2", "additionalProperties": { - "packageName": "algoliasearch-client-java-2", - "packageVersion": "0.0.1" + "packageName": "algoliasearch-client-java-2" } }, "java-recommend": { @@ -157,8 +156,7 @@ "library": "okhttp-gson", "gitRepoId": "algoliasearch-client-java-2", "additionalProperties": { - "packageName": "algoliasearch-client-java-2", - "packageVersion": "0.0.1" + "packageName": "algoliasearch-client-java-2" } }, "java-personalization": { @@ -172,7 +170,6 @@ "gitRepoId": "algoliasearch-client-java-2", "additionalProperties": { "packageName": "algoliasearch-client-java-2", - "packageVersion": "0.0.1", "hasRegionalHost": true } }, @@ -187,7 +184,6 @@ "gitRepoId": "algoliasearch-client-java-2", "additionalProperties": { "packageName": "algoliasearch-client-java-2", - "packageVersion": "0.0.1", "hasRegionalHost": true } }, @@ -202,7 +198,6 @@ "gitRepoId": "algoliasearch-client-java-2", "additionalProperties": { "packageName": "algoliasearch-client-java-2", - "packageVersion": "0.0.1", "hasRegionalHost": true } }, @@ -217,7 +212,6 @@ "gitRepoId": "algoliasearch-client-java-2", "additionalProperties": { "packageName": "algoliasearch-client-java-2", - "packageVersion": "0.0.1", "hasRegionalHost": true } }, @@ -232,7 +226,6 @@ "gitRepoId": "algoliasearch-client-java-2", "additionalProperties": { "packageName": "algoliasearch-client-java-2", - "packageVersion": "0.0.1", "hasRegionalHost": true } }, @@ -246,8 +239,7 @@ "library": "okhttp-gson", "gitRepoId": "algoliasearch-client-java-2", "additionalProperties": { - "packageName": "algoliasearch-client-java-2", - "packageVersion": "0.0.1" + "packageName": "algoliasearch-client-java-2" } }, "php-search": { @@ -256,8 +248,7 @@ "invokerPackage": "Algolia\\AlgoliaSearch", "modelPackage": "Model\\Search", "additionalProperties": { - "packageName": "algoliasearch-client-php", - "packageVersion": "0.0.1" + "packageName": "algoliasearch-client-php" } }, "php-recommend": { @@ -266,8 +257,7 @@ "invokerPackage": "Algolia\\AlgoliaSearch", "modelPackage": "Model\\Recommend", "additionalProperties": { - "packageName": "algoliasearch-client-php", - "packageVersion": "0.0.1" + "packageName": "algoliasearch-client-php" } }, "php-personalization": { @@ -277,7 +267,6 @@ "modelPackage": "Model\\Personalization", "additionalProperties": { "packageName": "algoliasearch-client-php", - "packageVersion": "0.0.1", "hasRegionalHost": true } }, @@ -288,7 +277,6 @@ "modelPackage": "Model\\Analytics", "additionalProperties": { "packageName": "algoliasearch-client-php", - "packageVersion": "0.0.1", "hasRegionalHost": true } }, @@ -299,7 +287,6 @@ "modelPackage": "Model\\Insights", "additionalProperties": { "packageName": "algoliasearch-client-php", - "packageVersion": "0.0.1", "hasRegionalHost": true } }, @@ -310,7 +297,6 @@ "modelPackage": "Model\\Abtesting", "additionalProperties": { "packageName": "algoliasearch-client-php", - "packageVersion": "0.0.1", "hasRegionalHost": true } }, @@ -326,8 +312,7 @@ "invokerPackage": "Algolia\\AlgoliaSearch", "modelPackage": "Model\\QuerySuggestions", "additionalProperties": { - "packageName": "algoliasearch-client-php", - "packageVersion": "0.0.1" + "packageName": "algoliasearch-client-php" } } } diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java index 05c6ce43d2..75d38def06 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java @@ -45,10 +45,19 @@ public Map postProcessOperationsWithModels( allModels ); - Utils.generateServer( - Utils.getClientNameKebabCase(results), - additionalProperties - ); + try { + Utils.generateServer( + Utils.getClientNameKebabCase(results), + additionalProperties + ); + additionalProperties.put( + "packageVersion", + Utils.getPackageVersion("java") + ); + } catch (GenerationException e) { + e.printStackTrace(); + System.exit(1); + } return results; } diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaJavascriptGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaJavascriptGenerator.java index 7e943af33c..ccad9607d5 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaJavascriptGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaJavascriptGenerator.java @@ -76,10 +76,15 @@ public Map postProcessOperationsWithModels( CLIENT = Utils.getClientNameCamelCase(results); setDefaultGeneratorOptions(); - Utils.generateServer( - Utils.getClientNameKebabCase(results), - additionalProperties - ); + try { + Utils.generateServer( + Utils.getClientNameKebabCase(results), + additionalProperties + ); + } catch (GenerationException e) { + e.printStackTrace(); + System.exit(1); + } List operations = ((Map>) results.get("operations")).get( diff --git a/generators/src/main/java/com/algolia/codegen/AlgoliaPhpGenerator.java b/generators/src/main/java/com/algolia/codegen/AlgoliaPhpGenerator.java index 8ca265b09d..a1c7294814 100644 --- a/generators/src/main/java/com/algolia/codegen/AlgoliaPhpGenerator.java +++ b/generators/src/main/java/com/algolia/codegen/AlgoliaPhpGenerator.java @@ -53,7 +53,16 @@ public Map postProcessOperationsWithModels( String client = Utils.getClientNameKebabCase(results); setDefaultGeneratorOptions(client); - Utils.generateServer(client, additionalProperties); + try { + Utils.generateServer(client, additionalProperties); + additionalProperties.put( + "packageVersion", + Utils.getPackageVersion("php") + ); + } catch (GenerationException e) { + e.printStackTrace(); + System.exit(1); + } return results; } diff --git a/generators/src/main/java/com/algolia/codegen/GenerationException.java b/generators/src/main/java/com/algolia/codegen/GenerationException.java index c33e5e2ad8..1bd79d2a94 100644 --- a/generators/src/main/java/com/algolia/codegen/GenerationException.java +++ b/generators/src/main/java/com/algolia/codegen/GenerationException.java @@ -5,4 +5,8 @@ public class GenerationException extends Exception { public GenerationException(String message) { super(message); } + + public GenerationException(String message, Throwable cause) { + super(message, cause); + } } diff --git a/generators/src/main/java/com/algolia/codegen/Utils.java b/generators/src/main/java/com/algolia/codegen/Utils.java index 3e9c1477b8..23cafb22ae 100644 --- a/generators/src/main/java/com/algolia/codegen/Utils.java +++ b/generators/src/main/java/com/algolia/codegen/Utils.java @@ -1,7 +1,11 @@ package com.algolia.codegen; +import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.Sets; +import io.swagger.v3.core.util.Json; +import java.io.File; import java.io.FileInputStream; +import java.io.IOException; import java.net.URL; import java.util.*; import org.openapitools.codegen.CodegenOperation; @@ -72,7 +76,7 @@ public static String getClientNameCamelCase(Map data) { public static void generateServer( String clientKebab, Map additionalProperties - ) { + ) throws GenerationException { Yaml yaml = new Yaml(); try { Map spec = yaml.load( @@ -145,8 +149,29 @@ public static void generateServer( allowedRegions.toArray(new String[0]) ); } catch (Exception e) { - e.printStackTrace(); - System.exit(1); + throw new GenerationException("Couldn't generate servers", e); + } + } + + // Get the package version from clients.config.json (doesn't work for JavaScript) + public static String getPackageVersion(String language) + throws GenerationException { + if (language.equals("javascript")) { + throw new GenerationException( + "Cannot use getPackageVersion with language=\"javascript\", " + + "read openapitools.json instead" + ); + } + try { + JsonNode config = Json + .mapper() + .readTree(new File("config/clients.config.json")); + return config.get(language).get("packageVersion").asText(); + } catch (IOException e) { + throw new GenerationException( + "Couldn't read packageVersion from clients.config.json", + e + ); } } } diff --git a/package.json b/package.json index ba0bd90768..0bc1caa057 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@algolia/api-client-automation", - "version": "0.0.0", + "version": "0.0.1", "private": true, "workspaces": [ "clients/algoliasearch-client-javascript/", diff --git a/scripts/common.ts b/scripts/common.ts index 5971686989..332e0b5f1f 100644 --- a/scripts/common.ts +++ b/scripts/common.ts @@ -5,10 +5,10 @@ import execa from 'execa'; // https://github.com/sindresorhus/execa/tree/v5.1.1 import { hashElement } from 'folder-hash'; import { remove } from 'fs-extra'; -import clientsConfig from '../config/clients.config.json'; import openapiConfig from '../config/openapitools.json'; import releaseConfig from '../config/release.config.json'; +import { getPackageVersionDefault } from './config'; import { createSpinner } from './oraLog'; import type { CheckForCache, @@ -41,10 +41,7 @@ export const GENERATORS: Record = { additionalProperties: { buildFile: 'algoliasearch', packageName: '@experimental-api-clients-automation/algoliasearch', - packageVersion: - openapiConfig['generator-cli'].generators[ - clientsConfig.javascript.mainPackage - ].additionalProperties.packageVersion, + packageVersion: getPackageVersionDefault('javascript'), }, }, }; @@ -60,10 +57,6 @@ Object.entries(openapiConfig['generator-cli'].generators).forEach( } ); -export function getPackageVersion(generator: string): string { - return GENERATORS[generator].additionalProperties.packageVersion; -} - export const LANGUAGES = [ ...new Set(Object.values(GENERATORS).map((gen) => gen.language)), ]; diff --git a/scripts/config.ts b/scripts/config.ts index 4d86c1615e..cdd9c39f93 100644 --- a/scripts/config.ts +++ b/scripts/config.ts @@ -1,4 +1,5 @@ import clientsConfig from '../config/clients.config.json'; +import openapiConfig from '../config/openapitools.json'; import type { Language } from './types'; @@ -25,3 +26,12 @@ export function getTestOutputFolder(language: Language): string { export function getCustomGenerator(language: Language): string { return clientsConfig[language].customGenerator; } + +// Returns the version of the package from clients.config.json, except for JavaScript where it returns the version of javascript-search +export function getPackageVersionDefault(language: Language): string { + if (language === 'javascript') { + return openapiConfig['generator-cli'].generators['javascript-search'] + .additionalProperties.packageVersion; + } + return clientsConfig[language].packageVersion; +} diff --git a/scripts/release/common.ts b/scripts/release/common.ts index 6c3e65b295..f6432ca691 100644 --- a/scripts/release/common.ts +++ b/scripts/release/common.ts @@ -2,21 +2,11 @@ import path from 'path'; import { Octokit } from '@octokit/rest'; -import clientsConfig from '../../config/clients.config.json'; import config from '../../config/release.config.json'; import { getGitHubUrl, run } from '../common'; export const RELEASED_TAG = config.releasedTag; export const TEAM_SLUG = config.teamSlug; -export const MAIN_PACKAGE = Object.keys(clientsConfig).reduce( - (mainPackage: { [lang: string]: string }, lang: string) => { - return { - ...mainPackage, - [lang]: clientsConfig[lang].mainPackage, - }; - }, - {} -); export function getOctokit(githubToken: string): Octokit { return new Octokit({ diff --git a/scripts/release/create-release-issue.ts b/scripts/release/create-release-issue.ts index f843bc25aa..66e6fc4cdf 100755 --- a/scripts/release/create-release-issue.ts +++ b/scripts/release/create-release-issue.ts @@ -7,14 +7,14 @@ import { LANGUAGES, ROOT_ENV_PATH, run, - getPackageVersion, MAIN_BRANCH, OWNER, REPO, } from '../common'; +import { getPackageVersionDefault } from '../config'; import type { Language } from '../types'; -import { RELEASED_TAG, MAIN_PACKAGE, getOctokit } from './common'; +import { RELEASED_TAG, getOctokit } from './common'; import TEXT from './text'; import type { Versions, @@ -26,14 +26,9 @@ import type { dotenv.config({ path: ROOT_ENV_PATH }); export function readVersions(): VersionsWithoutReleaseType { - return Object.keys(MAIN_PACKAGE).reduce((acc, lang) => { - return { - ...acc, - [lang]: { - current: getPackageVersion(MAIN_PACKAGE[lang]), - }, - }; - }, {}); + return Object.fromEntries( + LANGUAGES.map((lang) => [lang, { current: getPackageVersionDefault(lang) }]) + ); } export function getVersionChangesText(versions: Versions): string { diff --git a/scripts/release/process-release.ts b/scripts/release/process-release.ts index 35f744b3da..8cde7e4c1d 100755 --- a/scripts/release/process-release.ts +++ b/scripts/release/process-release.ts @@ -6,6 +6,7 @@ import execa from 'execa'; import { copy } from 'fs-extra'; import semver from 'semver'; +import clientsConfig from '../../config/clients.config.json'; import openapiConfig from '../../config/openapitools.json'; import { ROOT_ENV_PATH, @@ -17,8 +18,10 @@ import { OWNER, REPO, emptyDirExceptForDotGit, + GENERATORS, + LANGUAGES, } from '../common'; -import { getLanguageFolder } from '../config'; +import { getLanguageFolder, getPackageVersionDefault } from '../config'; import type { Language } from '../types'; import { @@ -28,7 +31,6 @@ import { configureGitHubAuthor, cloneRepository, getOctokit, - MAIN_PACKAGE, } from './common'; import TEXT from './text'; import type { @@ -101,49 +103,69 @@ export function getVersionsToRelease(issueBody: string): VersionsToRelease { return versionsToRelease; } -async function updateOpenApiTools( +// Bump each client version of the JavaScript client in openapitools.json +async function updateVersionForJavascript( versionsToRelease: VersionsToRelease ): Promise { - let nextUtilsPackageVersion = ''; - - if (versionsToRelease.javascript) { - nextUtilsPackageVersion = - semver.inc( - openapiConfig['generator-cli'].generators[MAIN_PACKAGE.javascript] - .additionalProperties.utilsPackageVersion, - versionsToRelease.javascript.releaseType - ) || ''; + if (!versionsToRelease.javascript) { + return; } - - Object.keys(openapiConfig['generator-cli'].generators).forEach((client) => { - const lang = client.split('-')[0]; - if (versionsToRelease[lang]) { + const jsVersion = versionsToRelease.javascript; + const nextUtilsPackageVersion = + semver.inc( + openapiConfig['generator-cli'].generators['javascript-search'] + .additionalProperties.utilsPackageVersion, + jsVersion.releaseType + ) || ''; + Object.values(GENERATORS) + .filter((gen) => gen.language === 'javascript') + .forEach((gen) => { const additionalProperties = - openapiConfig['generator-cli'].generators[client].additionalProperties; - const releaseType = versionsToRelease[lang].releaseType; + openapiConfig['generator-cli'].generators[gen.key].additionalProperties; const newVersion = semver.inc( additionalProperties.packageVersion, - releaseType + jsVersion.releaseType ); if (!newVersion) { throw new Error( - `Failed to bump version ${additionalProperties.packageVersion} by ${releaseType}.` + `Failed to bump version ${additionalProperties.packageVersion} by ${jsVersion.releaseType}.` ); } additionalProperties.packageVersion = newVersion; + additionalProperties.utilsPackageVersion = nextUtilsPackageVersion; + }); + await fsp.writeFile( + toAbsolutePath('config/openapitools.json'), + JSON.stringify(openapiConfig, null, 2) + ); +} - // In case we're not releasing javascript package, - // we shouldn't bump the utils version. - // At that time `nextUtilsPackageVersion` is undefined, and the following branch is skipped. - if (lang === 'javascript' && nextUtilsPackageVersion) { - additionalProperties.utilsPackageVersion = nextUtilsPackageVersion; - } +async function updateConfigFiles( + versionsToRelease: VersionsToRelease +): Promise { + await updateVersionForJavascript(versionsToRelease); + + // update the other versions in clients.config.json + LANGUAGES.forEach((lang) => { + if (lang === 'javascript' || !versionsToRelease[lang]) { + return; } + const releaseType = versionsToRelease[lang]!.releaseType; + + const newVersion = semver.inc(getPackageVersionDefault(lang), releaseType); + if (!newVersion) { + throw new Error( + `Failed to bump version ${getPackageVersionDefault( + lang + )} by ${releaseType}.` + ); + } + clientsConfig[lang].packageVersion = newVersion; }); await fsp.writeFile( - toAbsolutePath('config/openapitools.json'), - JSON.stringify(openapiConfig, null, 2) + toAbsolutePath('config/clients.config.json'), + JSON.stringify(clientsConfig, null, 2) ); } @@ -225,7 +247,7 @@ async function processRelease(): Promise { const issueBody = await getIssueBody(); const versionsToRelease = getVersionsToRelease(issueBody); - await updateOpenApiTools(versionsToRelease); + await updateConfigFiles(versionsToRelease); for (const [lang, { current, releaseType }] of Object.entries( versionsToRelease diff --git a/specs/abtesting/spec.yml b/specs/abtesting/spec.yml index ae9c8f43ac..3a70308d95 100644 --- a/specs/abtesting/spec.yml +++ b/specs/abtesting/spec.yml @@ -2,7 +2,7 @@ openapi: 3.0.2 info: title: A/B Testing API description: API powering the A/B Testing feature of Algolia. - version: 0.1.0 + version: 1.0.0 components: securitySchemes: appId: diff --git a/specs/analytics/spec.yml b/specs/analytics/spec.yml index 59a02136c2..ceaeab656b 100644 --- a/specs/analytics/spec.yml +++ b/specs/analytics/spec.yml @@ -2,7 +2,7 @@ openapi: 3.0.2 info: title: Analytics API description: API powering the Analytics feature of Algolia. - version: 0.1.0 + version: 1.0.0 components: securitySchemes: appId: diff --git a/specs/insights/spec.yml b/specs/insights/spec.yml index e5092ff185..72fa04d278 100644 --- a/specs/insights/spec.yml +++ b/specs/insights/spec.yml @@ -2,7 +2,7 @@ openapi: 3.0.2 info: title: Insights API description: API powering the Insights feature of Algolia. - version: 0.0.1 + version: 1.0.0 components: securitySchemes: appId: diff --git a/specs/personalization/spec.yml b/specs/personalization/spec.yml index edbbbc14a5..c14ba988dc 100644 --- a/specs/personalization/spec.yml +++ b/specs/personalization/spec.yml @@ -2,7 +2,7 @@ openapi: 3.0.2 info: title: Personalization API description: API powering the Personalization feature of Algolia. - version: 0.1.0 + version: 1.0.0 components: securitySchemes: appId: diff --git a/specs/predict/spec.yml b/specs/predict/spec.yml index 87fb8c4794..b816c79ae2 100644 --- a/specs/predict/spec.yml +++ b/specs/predict/spec.yml @@ -2,7 +2,7 @@ openapi: 3.0.2 info: title: Predict API description: API powering the Predict feature of Algolia. - version: 0.1.0 + version: 1.0.0 components: securitySchemes: appId: diff --git a/specs/query-suggestions/spec.yml b/specs/query-suggestions/spec.yml index 2046eb4061..7b863bcbf1 100644 --- a/specs/query-suggestions/spec.yml +++ b/specs/query-suggestions/spec.yml @@ -2,7 +2,7 @@ openapi: 3.0.2 info: title: Query Suggestions API description: API powering the Query Suggestions feature of Algolia. - version: 0.0.1 + version: 1.0.0 components: securitySchemes: appId: diff --git a/specs/recommend/spec.yml b/specs/recommend/spec.yml index 7bd5d1a983..9d7f70de64 100644 --- a/specs/recommend/spec.yml +++ b/specs/recommend/spec.yml @@ -2,7 +2,7 @@ openapi: 3.0.2 info: title: Recommend API description: API powering the Recommend feature of Algolia. - version: 0.1.0 + version: 1.0.0 components: securitySchemes: appId: diff --git a/specs/search/spec.yml b/specs/search/spec.yml index dea747d475..1656fbd377 100644 --- a/specs/search/spec.yml +++ b/specs/search/spec.yml @@ -2,7 +2,7 @@ openapi: 3.0.2 info: title: Search API description: API powering the Search feature of Algolia. - version: 0.1.0 + version: 1.0.0 components: securitySchemes: appId: diff --git a/specs/sources/spec.yml b/specs/sources/spec.yml index 578eb480e8..485aff1865 100644 --- a/specs/sources/spec.yml +++ b/specs/sources/spec.yml @@ -2,7 +2,7 @@ openapi: 3.0.2 info: title: Event & Records Connection API description: API powering the ingestion of Events and Records. - version: 0.1.0 + version: 1.0.0 components: securitySchemes: appId: diff --git a/templates/java/gradle.properties.mustache b/templates/java/gradle.properties.mustache index f5d32b4d55..d2ab402a79 100644 --- a/templates/java/gradle.properties.mustache +++ b/templates/java/gradle.properties.mustache @@ -1,2 +1,2 @@ GROUP={{groupId}} -VERSION_NAME={{artifactVersion}}-SNAPSHOT +VERSION_NAME={{packageVersion}}-SNAPSHOT diff --git a/templates/php/composer.mustache b/templates/php/composer.mustache index 86e3b7c01e..2cb52be254 100644 --- a/templates/php/composer.mustache +++ b/templates/php/composer.mustache @@ -2,9 +2,9 @@ {{#composerPackageName}} "name": "{{.}}", {{/composerPackageName}} - {{#artifactVersion}} + {{#packageVersion}} "version": "{{.}}", - {{/artifactVersion}} + {{/packageVersion}} "description": "API powering the features of Algolia.", "keywords": [ "openapitools",