Aliaksei Zhuk
9c3d4ef2a6
Parse integer array query parameters. Fix typos ( #11105 )
2022-01-04 17:55:18 +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
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
Nathan Baulch
c1c5775271
[go] More idiomatic godoc comments ( #10044 )
...
* [go] More idiomatic godoc comments
* [go] Mark deprecated fields and functions
* [go] Minor mustache readability/consistency fixes
* [go] Mark deprecated operation parameters
* [go] Deprecate a petstore component property for testing
* [go] Apply deprecated godoc in Go servers also
2021-08-03 17:11:16 +08:00
Ween Jiann
870ef3a87a
[go-server] Allow user to specify how errors are handled ( #9764 )
...
* Added error.go
* Updated controller to use error
* Fix redeclared func
* Add generated files
* Merge
* Added docs
* Remove variadic
* Regenerate files
* Updated go doc to meet standard
* Updated doc to meet go standard
* Updated
2021-07-28 17:19:47 +08:00
Aliaksei Zhuk
53e5986800
[Go] Parse int arrays and respect the 'required' property ( #9120 )
...
* Added int arrays parsing in parameters. Respect the 'required' property.
* Replaced spaces with tabs
* Generate samples with new spacing
* Removed unused import
* Merged with latest master
2021-04-11 23:43:53 +08:00
William Cheng
5dae270c3e
[Go][server] parse bool in query parameter ( #9171 )
...
* Add bool query in example
* Add parseBoolParameter
* test with boolean parameter
* add endpiont for testing boolean
* remove bool parameter test
Co-authored-by: Stéphane Guillemot <gmtstephane@gmail.com>
2021-04-05 16:45:38 +08:00
William Cheng
c79d056935
Allow to specify response headers (needed for redirecting clients) ( #9170 )
...
* Allow to specify response headers (needed for redirecting clients) (#8148 )
Co-authored-by: Bernardo Pastorelli <13519917+randomswdev@users.noreply.github.com>
* add addResponseHeaders option
* enable addResponseHeaders
* fix comma
Co-authored-by: randomswdev <randomswdev@users.noreply.github.com>
Co-authored-by: Bernardo Pastorelli <13519917+randomswdev@users.noreply.github.com>
2021-04-05 16:27:41 +08:00
randomswdev
d1dcdad3d5
[Go][Server] Use the correct parameter name ( #8144 )
...
* Use the correct parameter name
* Minor changes
Co-authored-by: Bernardo Pastorelli <13519917-randomswdev@users.noreply.github.com>
2020-12-20 15:32:57 +08:00
Gmtstephane
4e05912ae7
[GO][SERVER] Implement response code ( #7397 )
...
* Feature(template) add response with status code generation
* Generate Samples
* update samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-09-14 23:14:53 +08:00
ryutah
b3b4526bf7
[go-server] Modified go-server templates to allow services to receive http request's context. ( #7214 )
...
* adds context arguments to go-server templates (#6657 )
* updates go-api-server samples (#6657 )
2020-08-15 00:11:44 +08:00
debugman
742b8bd650
added int32 support for go-server ( #7123 )
2020-08-06 17:17:07 +08:00
William Cheng
52fcdd5974
Migrate Go server samples to OAS 3 only ( #6471 )
...
* migrate go server samples to oas3
* add back pom.xml
2020-05-29 11:42:07 +08:00
William Cheng
db729be7df
[Go][Server] minor enhancement to the template ( #4417 )
...
* minor enhancement to the go server template
* update samples
2019-11-09 11:24:12 +08:00
Jesse Michael
00c6e0a64b
Return Router interface from controller constructor. ( #4196 )
...
Update the go server api controller template to return the Router interface instead of the api specific router.
The Router interface type has the Routes function, which is what the generated `NewRouter` function needs. (not the api specific interface).
2019-10-22 15:27:08 +08:00
William Cheng
f43c720b08
replace 4-space with tab ( #4188 )
2019-10-20 00:46:25 +08:00
Jesse Michael
0abb910dbc
[go-server] Enhance Go API server with interfaces router binding and services ( #4038 )
...
* Enhance go api server with interfaces router binding and services
Enhance the default go api server generation to define interfaces for an API's routes and services. Handle an endpoint's http binding in the generated router and the skeleton for the service logic in an API service.
* Include interface documentation in Go Server generation.
2019-10-19 23:32:52 +08:00
Ben Wells
c51986d657
Go server clean up ( #328 )
2018-06-18 01:09:48 +08:00
William Cheng
0dbb6dcaa6
Update Go generators' default value ( #362 )
...
* udpate go client default value
* update go generators' default value
2018-05-08 10:16:38 +08:00
antihax
72abb20f2e
[Go] Fix operation files clobbering model files. [2.4.0] ( #7337 )
...
* Prevent operation files clobbering model files.
* Update Tests
2018-01-14 17:00:17 +08:00