Skip to content

Commit 6a657a5

Browse files
authored
Merge branch 'main' into fix/more-broken-links
2 parents 867084a + 070c42b commit 6a657a5

File tree

13 files changed

+107
-70
lines changed

13 files changed

+107
-70
lines changed

docs/bundled/analytics.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7343,7 +7343,7 @@ components:
73437343
- ':'
73447344
- <
73457345
- <=
7346-
- '='
7346+
- =
73477347
- '!='
73487348
- '>'
73497349
- '>='

docs/bundled/composition.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6504,7 +6504,8 @@ components:
65046504
65056505
`facet:\-value`.
65066506
example:
6507-
- - category:Book
6507+
-
6508+
- category:Book
65086509
- category:-Movie
65096510
- author:John Doe
65106511
oneOf:
@@ -6567,7 +6568,8 @@ components:
65676568
65686569
The same combination rules apply as for `facetFilters`.
65696570
example:
6570-
- - inStock = 1
6571+
-
6572+
- inStock = 1
65716573
- deliveryDate < 1441755506
65726574
- price < 1000
65736575
oneOf:
@@ -6713,11 +6715,13 @@ components:
67136715
For more information, see [rectangular
67146716
area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
67156717
example:
6716-
- - 47.3165
6718+
-
6719+
- 47.3165
67176720
- 4.9665
67186721
- 47.3424
67196722
- 5.0201
6720-
- - 40.9234
6723+
-
6724+
- 40.9234
67216725
- 2.1185
67226726
- 38.643
67236727
- 1.9916
@@ -6751,13 +6755,15 @@ components:
67516755
67526756
This parameter is ignored if you also specify `insideBoundingBox`.
67536757
example:
6754-
- - 47.3165
6758+
-
6759+
- 47.3165
67556760
- 4.9665
67566761
- 47.3424
67576762
- 5.0201
67586763
- 47.32
67596764
- 4.9
6760-
- - 40.9234
6765+
-
6766+
- 40.9234
67616767
- 2.1185
67626768
- 38.643
67636769
- 1.9916

docs/bundled/query-suggestions.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3199,7 +3199,8 @@ components:
31993199
type: string
32003200
- type: 'null'
32013201
example:
3202-
- - color
3202+
-
3203+
- color
32033204
- brand
32043205
External:
32053206
description: >

docs/bundled/recommend.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3077,7 +3077,8 @@ components:
30773077
30783078
`facet:\-value`.
30793079
example:
3080-
- - category:Book
3080+
-
3081+
- category:Book
30813082
- category:-Movie
30823083
- author:John Doe
30833084
oneOf:
@@ -3140,7 +3141,8 @@ components:
31403141
31413142
The same combination rules apply as for `facetFilters`.
31423143
example:
3143-
- - inStock = 1
3144+
-
3145+
- inStock = 1
31443146
- deliveryDate < 1441755506
31453147
- price < 1000
31463148
oneOf:
@@ -3166,7 +3168,8 @@ components:
31663168
31673169
The same combination and escaping rules apply as for `facetFilters`.
31683170
example:
3169-
- - Book
3171+
-
3172+
- Book
31703173
- Movie
31713174
- SciFi
31723175
oneOf:
@@ -3364,11 +3367,13 @@ components:
33643367
For more information, see [rectangular
33653368
area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
33663369
example:
3367-
- - 47.3165
3370+
-
3371+
- 47.3165
33683372
- 4.9665
33693373
- 47.3424
33703374
- 5.0201
3371-
- - 40.9234
3375+
-
3376+
- 40.9234
33723377
- 2.1185
33733378
- 38.643
33743379
- 1.9916
@@ -3402,13 +3407,15 @@ components:
34023407
34033408
This parameter is ignored if you also specify `insideBoundingBox`.
34043409
example:
3405-
- - 47.3165
3410+
-
3411+
- 47.3165
34063412
- 4.9665
34073413
- 47.3424
34083414
- 5.0201
34093415
- 47.32
34103416
- 4.9
3411-
- - 40.9234
3417+
-
3418+
- 40.9234
34123419
- 2.1185
34133420
- 38.643
34143421
- 1.9916

docs/bundled/search.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19203,7 +19203,8 @@ components:
1920319203

1920419204
`facet:\-value`.
1920519205
example:
19206-
- - category:Book
19206+
-
19207+
- category:Book
1920719208
- category:-Movie
1920819209
- author:John Doe
1920919210
oneOf:
@@ -19266,7 +19267,8 @@ components:
1926619267

1926719268
The same combination rules apply as for `facetFilters`.
1926819269
example:
19269-
- - inStock = 1
19270+
-
19271+
- inStock = 1
1927019272
- deliveryDate < 1441755506
1927119273
- price < 1000
1927219274
oneOf:
@@ -19292,7 +19294,8 @@ components:
1929219294

1929319295
The same combination and escaping rules apply as for `facetFilters`.
1929419296
example:
19295-
- - Book
19297+
-
19298+
- Book
1929619299
- Movie
1929719300
- SciFi
1929819301
oneOf:
@@ -19487,11 +19490,13 @@ components:
1948719490
For more information, see [rectangular
1948819491
area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
1948919492
example:
19490-
- - 47.3165
19493+
-
19494+
- 47.3165
1949119495
- 4.9665
1949219496
- 47.3424
1949319497
- 5.0201
19494-
- - 40.9234
19498+
-
19499+
- 40.9234
1949519500
- 2.1185
1949619501
- 38.643
1949719502
- 1.9916
@@ -19525,13 +19530,15 @@ components:
1952519530

1952619531
This parameter is ignored if you also specify `insideBoundingBox`.
1952719532
example:
19528-
- - 47.3165
19533+
-
19534+
- 47.3165
1952919535
- 4.9665
1953019536
- 47.3424
1953119537
- 5.0201
1953219538
- 47.32
1953319539
- 4.9
19534-
- - 40.9234
19540+
-
19541+
- 40.9234
1953519542
- 2.1185
1953619543
- 38.643
1953719544
- 1.9916

scripts/cache.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,23 @@ import { exists } from './common.ts';
77
export class Cache {
88
folder: string;
99
generatedFiles: string[];
10-
filesToCache: string[];
10+
dependencies: string[];
1111
cacheFile: string;
1212

1313
constructor({
1414
folder,
1515
generatedFiles,
16-
filesToCache,
16+
dependencies,
1717
cacheFile,
1818
}: {
1919
folder: string;
2020
generatedFiles: string[];
21-
filesToCache: string[];
21+
dependencies: string[];
2222
cacheFile: string;
2323
}) {
2424
this.folder = folder;
2525
this.generatedFiles = generatedFiles;
26-
this.filesToCache = filesToCache;
26+
this.dependencies = dependencies;
2727
this.cacheFile = cacheFile;
2828
}
2929

@@ -34,14 +34,14 @@ export class Cache {
3434
hash += (await hashElement(`${this.folder}/${generatedFile}`)).hash;
3535
}
3636

37-
for (const fileToCache of this.filesToCache) {
38-
hash += (await hashElement(`${this.folder}/${fileToCache}`)).hash;
37+
for (const dependency of this.dependencies) {
38+
hash += (await hashElement(`${this.folder}/${dependency}`)).hash;
3939
}
4040

4141
return hash;
4242
}
4343

44-
async isValid(): Promise<boolean> {
44+
async hit(): Promise<boolean> {
4545
if (!(await exists(this.cacheFile))) {
4646
return false;
4747
}

scripts/common.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export const ROOT_DIR = path.resolve(process.cwd(), '..');
3333
export const GENERATORS = Object.entries(clientsConfig).reduce(
3434
(current, [language, opts]) => {
3535
if (typeof opts === 'string') {
36+
// skip $schema
3637
return current;
3738
}
3839

@@ -51,7 +52,6 @@ export const GENERATORS = Object.entries(clientsConfig).reduce(
5152
}
5253

5354
current[key] = {
54-
additionalProperties: {},
5555
...opts,
5656
output,
5757
client: clientName,
@@ -61,7 +61,7 @@ export const GENERATORS = Object.entries(clientsConfig).reduce(
6161

6262
// guess the package name for js from the output folder variable
6363
if (language === 'javascript') {
64-
current[key].additionalProperties.packageName = output.substring(output.lastIndexOf('/') + 1);
64+
current[key].packageName = output.substring(output.lastIndexOf('/') + 1);
6565
}
6666
}
6767

@@ -153,11 +153,11 @@ async function buildCustomGenerators(): Promise<void> {
153153
const cache = new Cache({
154154
folder: toAbsolutePath('generators/'),
155155
generatedFiles: ['build/classes'],
156-
filesToCache: ['src', 'build.gradle', 'settings.gradle', '../config/.java-version'],
156+
dependencies: ['src', 'build.gradle', 'settings.gradle', '../config/.java-version'],
157157
cacheFile: toAbsolutePath('generators/.cache'),
158158
});
159159

160-
const cacheExists = await cache.isValid();
160+
const cacheExists = await cache.hit();
161161

162162
if (cacheExists) {
163163
spinner.succeed('job skipped, cache found for custom generators');

scripts/config.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import clientsConfig from '../config/clients.config.json' with { type: 'json' };
22

3-
import { CI } from './common.ts';
4-
import type { Language, LanguageConfig } from './types.ts';
3+
import { CI, createClientName } from './common.ts';
4+
import type { Generator, Language, LanguageConfig } from './types.ts';
55

66
export function getClientsConfigField(
77
language: Language,
@@ -45,6 +45,10 @@ export function getTestOutputFolder(language: Language): string {
4545
return getClientsConfigField(language, ['tests', 'outputFolder']);
4646
}
4747

48+
export function getSnippetFile(gen: Generator): string {
49+
return `docs/snippets/${gen.language}/${gen.snippets.outputFolder}/${createClientName(gen.client, gen.language)}${gen.snippets.extension}`;
50+
}
51+
4852
export function getDockerImage(language?: Language): string | undefined {
4953
if (CI || !language) {
5054
return undefined;

scripts/release/dart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export async function updateDartPackages(changelog: string, nextVersion: string)
1818
}
1919

2020
if (!nextVersion) {
21-
throw new Error(`Failed to bump '${gen.packageName}'.`);
21+
throw new Error(`Failed to bump '${gen.client}'.`);
2222
}
2323

2424
let currentVersion = await getPubspecField(gen.output, 'version');

scripts/specs/format.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ export async function lintCommon(useCache: boolean): Promise<void> {
1818
const cache = new Cache({
1919
folder: toAbsolutePath('specs/'),
2020
generatedFiles: [],
21-
filesToCache: ['common'],
21+
dependencies: ['common'],
2222
cacheFile: toAbsolutePath('specs/dist/common.cache'),
2323
});
2424

25-
if (useCache && (await cache.isValid())) {
25+
if (useCache && (await cache.hit())) {
2626
spinner.succeed("job skipped, cache found for 'common' spec");
2727
return;
2828
}

0 commit comments

Comments
 (0)