File tree Expand file tree Collapse file tree 9 files changed +18
-11
lines changed
generators/src/main/java/com/algolia/codegen Expand file tree Collapse file tree 9 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ public void processOpts() {
41
41
// Generation notice, added on every generated files
42
42
Helpers .setGenerationBanner (additionalProperties );
43
43
44
+ typeMapping .put ("object" , "map[string]any" );
45
+ typeMapping .put ("AnyType" , "any" );
46
+
44
47
apiTestTemplateFiles .clear ();
45
48
modelTestTemplateFiles .clear ();
46
49
apiDocTemplateFiles .clear ();
Original file line number Diff line number Diff line change 10
10
import com .samskivert .mustache .Mustache ;
11
11
import io .swagger .v3 .oas .models .OpenAPI ;
12
12
import io .swagger .v3 .oas .models .Operation ;
13
- import io .swagger .v3 .oas .models .media .ArraySchema ;
14
13
import io .swagger .v3 .oas .models .media .ComposedSchema ;
15
14
import io .swagger .v3 .oas .models .media .Schema ;
16
15
import io .swagger .v3 .oas .models .media .StringSchema ;
@@ -374,7 +373,7 @@ public String getTypeDeclaration(Schema p) {
374
373
Schema <?> schema = ModelUtils .unaliasSchema (this .openAPI , p , importMapping );
375
374
Schema <?> target = ModelUtils .isGenerateAliasAsModel () ? p : schema ;
376
375
if (ModelUtils .isArraySchema (target )) {
377
- Schema <?> items = getSchemaItems (( ArraySchema ) schema );
376
+ Schema <?> items = ModelUtils . getSchemaItems (schema );
378
377
return ModelUtils .isSet (target ) && ModelUtils .isObjectSchema (items )
379
378
? "Set<" + getTypeDeclaration (items ) + ">"
380
379
: "[" + getTypeDeclaration (items ) + "]" ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ require (
13
13
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
14
14
github.com/go-playground/locales v0.14.1 // indirect
15
15
github.com/go-playground/universal-translator v0.18.1 // indirect
16
- github.com/go-playground/validator/v10 v10.21 .0 // indirect
16
+ github.com/go-playground/validator/v10 v10.22 .0 // indirect
17
17
github.com/leodido/go-urn v1.4.0 // indirect
18
18
golang.org/x/crypto v0.22.0 // indirect
19
19
golang.org/x/net v0.24.0 // indirect
Original file line number Diff line number Diff line change @@ -8,9 +8,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o
8
8
github.com/go-playground/locales v0.14.1 /go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY =
9
9
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY =
10
10
github.com/go-playground/universal-translator v0.18.1 /go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY =
11
- github.com/go-playground/validator/v10 v10.19.0 h1:ol+5Fu+cSq9JD7SoSqe04GMI92cbn0+wvQ3bZ8b/AU4 =
12
- github.com/go-playground/validator/v10 v10.19.0 /go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM =
13
- github.com/go-playground/validator/v10 v10.21.0 /go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM =
11
+ github.com/go-playground/validator/v10 v10.22.0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4Bx7ia+JlgcnOao =
12
+ github.com/go-playground/validator/v10 v10.22.0 /go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM =
14
13
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0 =
15
14
github.com/joho/godotenv v1.5.1 /go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4 =
16
15
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ =
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ func testSearch(appID, apiKey string) int {
17
17
searchClient .NewApiAddOrUpdateObjectRequest (
18
18
indexName ,
19
19
"1" ,
20
- map [string ]interface {} {
20
+ map [string ]any {
21
21
"name" : "Foo" ,
22
22
"age" : 42 ,
23
23
"city" : "Paris" ,
Original file line number Diff line number Diff line change 4
4
# You can install this by running `source scripts/install.sh` or by adding this to your .bashrc/.zshrc:
5
5
# [[ -s "$HOME/<path to api-clients-automation>/scripts/install.sh" ]] && source "$HOME/<path to api-clients-automation>/scripts/install.sh"
6
6
7
+ # for extra DX you could also add the following shortcuts to your .bashrc/.zshrc:
8
+ # alias ag="apic generate"
9
+ # alias acg="apic cts generate"
10
+ # alias acr="apic cts run"
11
+
7
12
ROOT=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null && pwd) "
8
13
9
14
apic () {
Original file line number Diff line number Diff line change @@ -778,13 +778,14 @@ hitsPerPage:
778
778
- Pagination
779
779
780
780
userData :
781
+ type : object
781
782
example :
782
783
settingID : f2a7b51e3503acc6a39b3784ffb84300
783
784
pluginVersion : 1.6.0
784
785
description : |
785
786
An object with custom data.
786
787
787
- You can store up to 32 kB as custom data.
788
+ You can store up to 32kB as custom data.
788
789
default : {}
789
790
x-categories :
790
791
- Advanced
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ require (
16
16
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
17
17
github.com/go-playground/locales v0.14.1 // indirect
18
18
github.com/go-playground/universal-translator v0.18.1 // indirect
19
- github.com/go-playground/validator/v10 v10.21 .0 // indirect
19
+ github.com/go-playground/validator/v10 v10.22 .0 // indirect
20
20
github.com/leodido/go-urn v1.4.0 // indirect
21
21
github.com/pmezard/go-difflib v1.0.0 // indirect
22
22
golang.org/x/crypto v0.22.0 // indirect
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o
8
8
github.com/go-playground/locales v0.14.1 /go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY =
9
9
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY =
10
10
github.com/go-playground/universal-translator v0.18.1 /go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY =
11
- github.com/go-playground/validator/v10 v10.21 .0 h1:4fZA11ovvtkdgaeev9RGWPgc1uj3H8W+rNYyH/ySBb0 =
12
- github.com/go-playground/validator/v10 v10.21 .0 /go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM =
11
+ github.com/go-playground/validator/v10 v10.22 .0 h1:k6HsTZ0sTnROkhS//R0O+55JgM8C4Bx7ia+JlgcnOao =
12
+ github.com/go-playground/validator/v10 v10.22 .0 /go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM =
13
13
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0 =
14
14
github.com/joho/godotenv v1.5.1 /go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4 =
15
15
github.com/kinbiko/jsonassert v1.1.1 h1:DB12divY+YB+cVpHULLuKePSi6+ui4M/shHSzJISkSE =
You can’t perform that action at this time.
0 commit comments