Ween Jiann
2b44d4ed93
[go-server] Partially reverts and fix #15185 ( #16258 )
...
* Partitally reverts #15185
* Remove unused import
* Set zero value if param is empty
* Refactor samples, add test config
* Add tests
* Clean up
* Fix test
2023-08-07 20:43:30 +08:00
rledisez
44ad6d5eac
[go-server] Support min/max/defaults for values ( #15185 )
...
* [go-server] Support min/max/defaults for values
Enforce, for the go-server, to check the minimum and maximum values
specified in the openapi description. Also apply the default if the
parameter is not passed.
Fix #14013
* Fix merge conflict
Co-authored-by: Ween Jiann <16207788+lwj5@users.noreply.github.com>
* Improve UnmarshalJSON implementation
Co-authored-by: Ween Jiann <16207788+lwj5@users.noreply.github.com>
* Improve default value handling for string
Co-authored-by: Ween Jiann <16207788+lwj5@users.noreply.github.com>
* Fix suggested changes
* rework option pattern
* add imports based on types/min max values
---------
Co-authored-by: Ween Jiann <16207788+lwj5@users.noreply.github.com>
2023-05-17 01:58:28 +08:00
Ween Jiann
78bffff8f3
[Go] Update API naming to follow Golang standard pkg (1 line change) ( #15331 )
...
* Add apiNameSuffix to AbstractGoCodegen
* Regenerate files
* Update tests
* Regenerate files
* Update test files
* Regenerate for CI test
* Regenerate for CI test
* Remove some docs
* Add files back
2023-05-13 09:40:26 +08:00
Ween Jiann
1163b9cd3b
[go-server] Fix: name declared and not used ( #15201 )
...
* Fix: name declared and not used
* Update samples
* Re-enable workflow
2023-04-13 11:04:00 +08:00
William Cheng
935146d187
Merge remote-tracking branch 'origin/master' into 7.0.x
2023-04-12 17:51:47 +08:00
Ween Jiann
04441188c6
[go-server] Update dependencies and use generics ( #15087 )
...
* Update dependecies and go version
* Use generics for recurse
* Fix helpers.mustache
* Regenerate samples
2023-04-12 16:37:39 +08:00
Ween Jiann
792c49a0ce
[go-server] Change Routes type from []Route
to map[string]Route
( #15084 )
...
* Change Routes to map[string]Route
* Fix linting issues
* Regenerate samples
2023-04-11 15:40:06 +08:00
Ween Jiann
8ce990d3d7
[go-server] Add ability to handle parameters of number
type ( #15079 )
...
* Add ability to handle parameters of number type
* Generate samples
* Add handling for number without format
* Regenerate samples
* Fix indentation
2023-04-11 15:38:58 +08:00
William Cheng
7968349991
go server - use tabs instead of spaces ( #14740 )
2023-02-18 00:37:53 +08:00
Rodrigo Cebrián González
612dc4dbcb
[BUG][Go] Remove "null" body value when body is empty #13927 ( #13934 )
...
* only write reponse body if not nil
* update go samples
* golang style convention
2023-02-18 00:29:12 +08:00
Sebastian Cevallos
8540c82d30
Add handling for parsing optional bool params & regenerate samples ( #14550 )
2023-01-30 16:35:19 +08:00
Ian Cubbon
74073df27c
[GO][Client] Use a *os.File
for the API Client when uploading and downloading ( #14340 )
...
* Change the return type of a file back to a pointer
* Change the api template to handle not double pointer-ing return types of os.File
* Fix unit tests
* Couple more unit test fixes
2023-01-16 16:51:04 +08:00
Ian Cubbon
63629ad51c
[Go] File Download Fix Return Type ( #14046 )
...
* Changes manually cherry-picked (for the most part) from https://github.com/OpenAPITools/openapi-generator/pull/12685/files
* Examples updated post changes
* Missed a change in the mustache template
* Update examples after last fix
* Missed dereference for required files
* Update unit tests
* Missed another test case update
* `f := *f` isn't quite the same as `*f, err = ...`
2022-12-06 12:21:39 +08:00
William Cheng
8330e16d66
Better inline model resolver to handle inline schema in array item ( #12104 )
...
* better support of inline schema in array item
* update tests
* update samples
* regenerate samples
* fix allof naming, remove files
* add files
* update samples
* update readme
* fix tests
* update samples
* update samples
* add new files
* update test spec
* add back tests
* remove unused files
* comment out python test
* update js test using own spec
* remove files
* remove unused files
* remove files
* remove unused files
* better handling of allOf with a single type
* comment out go test
* remove test_all_of_with_single_ref_single_ref_type.py
* fix inline resolver, uncomment go test
2022-04-20 10:28:15 +08:00
Aliaksei Zhuk
9c3d4ef2a6
Parse integer array query parameters. Fix typos ( #11105 )
2022-01-04 17:55:18 +08:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos ( #10272 )
2021-08-28 22:58:24 +08:00
Ween Jiann
3b8f66cd1f
[go-server] Fix: param names clash with variables, added suffix ( #10243 )
...
* Postfix "Param" to param names in controller
* Regen samples
2021-08-27 13:07:31 +08:00
William Cheng
0204bf4ae2
Squashed commit of the following:
...
commit c5a0d0f7394aa742fa336fff7e7c1d3049761868
Merge: 8c4991ba3ed f8ff8c87609
Author: William Cheng <wing328hk@gmail.com>
Date: Tue Aug 17 18:28:12 2021 +0800
Merge branch 'mustache-linting' of https://github.com/NathanBaulch/openapi-generator into NathanBaulch-mustache-linting
commit f8ff8c87609b1ca36fa26fb8474806999638195e
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 14:12:47 2021 +1000
Reorder tags that handle missing values
commit f5d8a33709d6a3f846a9fe4520b78c3d637051d9
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 14:08:59 2021 +1000
Use dot notation where possible
commit 493d14921e2333f3ae19ef6fc89318b7e263a80c
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 14:10:49 2021 +1000
Remove empty tags
commit 32480dc53f48227d55531b94e307d72671373737
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Thu Aug 5 10:41:58 2021 +1000
Remove redundant sections
commit a8edabd722c34aa094b4aeb11c22664529c3a219
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Wed Aug 4 22:02:22 2021 +1000
Trim extra EOF new lines
commit e89bd7458e3594bf0d30e580bc9408e45b018a57
Author: Nathan Baulch <nathan.baulch@gmail.com>
Date: Wed Aug 4 21:59:26 2021 +1000
Trim trailing whitespace
2021-08-17 18:37:51 +08:00
Ween Jiann
11d29eb22b
[go-server] Feat: add required assertions to models ( #10068 )
...
* Add RequiredError
* Add IsZeroValue helper
* Add AssertRequired method to all models
* Add AssertRequired call for body param
* Regenerate files
* Add DisallowUnknownFields
* Regenerate samples
* Use hasRequired in model to remove unnecessary code
* Revert disallowUnknownFields
* Use isAdditionalPropertiesTrue for disallowing unknown fields
* Updated samples
* Fix indent
* Add require checks for nested slices
* Add new tests
* Regenerate samples
* Regenerate samples after merging
2021-08-07 21:29:14 +08:00