34 Commits

Author SHA1 Message Date
William Cheng
0da60def01 update samples 2024-06-26 10:04:23 +08:00
Ween Jiann
cefbf62060
[go-server] Fix: missing quotes for string default value (#18546)
* Update controller mustache

* Add tests to openapi doc

* Regen
2024-05-06 14:17:44 +08:00
Ween Jiann
bf4c98a82a
[go-server] Add ability to handle nullable query param (#17321)
* Update

* Regen
2023-12-21 19:13:05 +08:00
Ween Jiann
b7f31ddda4
Regenerate (#17389) 2023-12-13 22:17:15 +08:00
Ian Cubbon
2f655f1a9c
Time parameters in the path resulted in code that would not compile (#17021)
This is probably a pretty rare case as it just seems weird to have a time
path parameter, but it's good to fix.
2023-11-13 10:01:32 +08:00
Ian Cubbon
291ce353ce
[Go][Server] FormParams - Generic Array Type Handling (#17001)
* If a form param is an array and isn't caught in the previous checks, treat it as a slice of strings.

* Add an example of a FormParam that is an array
2023-11-08 14:09:12 +08:00
Ian Cubbon
677b6e64c1
If parsing a boolean fails, return a ParsingError instead of a straight 500 (#16910)
Add an example endpoint that covers Required, Default, and Not Required cases
2023-10-28 20:32:04 +08:00
Ian Cubbon
bf9fae641e
[Go-Server] Add support for DateTime Query Parameters (#16749)
* Add support for DateTime objects in the Path, Query Params, and as a List

* Fix indentation

* Add an exaple that has dateTimes
Move the date parsing into a common util in the routers.go file.

* Fix compilation issue and regen

* Use the `RequiredError` to handle this case

* Only split on a "," and not an extra 'space' after the ",".
2023-10-22 21:07:13 +08:00
Ian Cubbon
e0738a6e42
[Go-Server] Support for an endpoint returning a file to the client - #15206 (#16748)
* Support for an endpoint returning a file to a client.

* Spaces to tabs conversion

* Add an example endpoint for download a file

* Regenerate after merging main
2023-10-17 11:42:27 +08:00
Ian Cubbon
1dd9590064
[Go-server] - Support for Enums in the Path and Query (#16781)
* Add support for Enums to be part of the Path and Query
Supports optional Query Enums and Lists of Enums as well
Add an example endpoint that covers the added scenarios
Added an import mapping for the GoServerCodegen for "fmt"
    when a model is an enum.
Expanded the Enum Model for the Go Server to have validation.
    Copied this logic from the Go Client Enum Model.

* Fix identation of examples

* Pre-allocate the capacity of the slice of Enums to be
the correct size.

* Formatting and updated examples

* Empty-Commit

* Switch to using a map to store the valid enum values

* Fixed pointer derefs missed from previous change in PR

* More fixing of pointer to not pointer

* Create a map for validation and a list of enums for messaging
2023-10-17 11:35:39 +08:00
William Cheng
ba367e60e8
[go-server] Add tests, minor format change (#16805)
* add tests for #16787, minor format change

* revert

* fix typo

* use pet instead of fake

* update samples
2023-10-12 19:23:02 +08:00
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
William Cheng
54c8bf8733
[go-server] Add tests for boolean query parameter (#15563)
* add tests for boolean query parameter

* fix test
2023-05-18 15:39:43 +08:00
Antoine Rey
917892db7d
#14141 Add externalDocs to @Operation to the JavaSpring generator (#14177)
* #14141 Add externalDocs to @Operation to the JavaSpring generator

* #14141 Add externalDocs to @Operation to the JavaSpring generator : fix mustache template with #hasExternalDocs

* #14141 Add externalDocs to @Operation to the JavaSpring generator: fix indentation

* #14141 Add externalDocs to @Operation to the JavaSpring generator: fix carriage return

* #14141 Add externalDocs to @Operation to the JavaSpring generator: regenerate the spring-boot-oas3.yaml sample

* #14141 Add externalDocs to @Operation to the JavaSpring generator: generate-samples.sh

* #14141 Add externalDocs to @Operation to the JavaSpring generator: remove hasExternalDocs

* Fix ExternalDocumentation import generation and order

* #14141 Add externalDocs to @Operation to the JavaSpring generator: generate-samples.sh
2023-01-04 10:15:23 +08:00
Nathan Baulch
9f1fa0e440
Fix another batch of spelling typos (#13915)
* Fix typos

* Remove repeated words

* Minor grammar fixes
2022-11-07 21:30:24 +08:00
William Cheng
ad3b5f7045
[Inline model resolver] various improvements (#12293)
* better handling of requestbody in the inline resolver

* remove commented code

* better request body naming

* fix unique naming

* minor code format change

* removed additional underscore from names, fix test

* more fixes, update tests

* fix all tests

* undo changes to default codegen

* update samples

* update python tests

* add new files

* update samples
2022-05-10 17:13:57 +08:00
William Cheng
df05e6f4bc
Update parser to 2.0.29 (#11388)
* update parser to 2.0.29

* better handling of null in dereferencing

* update parser to 2.0.30

* update core to newer version

* add new files

* rollback to previous stable version

* remove files

* Fixes for python-experimental NullableShape component

Co-authored-by: Justin Black <justin.a.black@gmail.com>
2022-02-21 18:37:52 +08:00
William Cheng
b6c445cdc3
update swagger core, jackson to newer version (#11545) 2022-02-08 13:31:20 +08:00
Nathan Baulch
5d68bd6a03
Fix thousands of spelling typos (#10272) 2021-08-28 22:58:24 +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
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
Jim Schubert
ea55968737
Evaluating https issues in CircleCI (on top of CiscoM31-maven-h… (#5034)
* replace http with https. Replace http://central.maven.org with https://repo1.maven.org

* replace http://www.apache.org/licenses/LICENSE-2.0 with https://www.apache.org/licenses/LICENSE-2.0

* Force HTTPS for mavenCentral gradle DSL

Co-authored-by: Sebastien Rosset <serosset@cisco.com>
2020-01-18 18:53:05 -05:00
William Cheng
50f7e14a99 update samples 2020-01-14 23:07:37 +08:00
sunn
600a81f76e
[golang] Regenerate all go samples (#3988)
* Regenerate all go samples

* Update API Key usage

* Add go-experimental script
2019-09-30 18:38:51 +02:00
Jochen Scheib
c918d7ad64 go-server: Support additional properties as command line arguments (#1555)
* Support additionalPorperties as command line arguments

* Move Readme into main dir

* Update Mustache

* Update sample

* Test coverage

* Move cli options

* Revert options

* Remove tabs

* openapi 3 examples

* Update readme

* serverPort to int

* Move package version cli option to AbstractGoCodegen

* Update samples

* Tab to spaces

* Update docs and sample with xml

* Manual update doc

* Another doc try

* Regenerate go-gin-server doc
2019-03-25 21:19:06 +08:00
alex-korobko
42544b8234 Issue 1766 Modified mustache files for Go to support nullable in the … (#1869)
* Issue 1766 Modified mustache files for Go to support nullable in the spec v3.0+; Updated model files running .sh scripts for Go.

* Add "nullable" to fake yaml

* Add sample script for OAS3

* Fix output folder (openapi3)

* Run bin/openapi3/go-petstore.sh

* Update samples

* Update jaxrs-jersey

* Update python and php samples

* Add bin/openapi3/go-gin-petstore-server.sh

* Run bin/openapi3/go-gin-petstore-server.sh

* Update bin/openapi3/go-petstore-server.sh to generate "nullable" samples

* Run bin/openapi3/go-petstore-server.sh

* Fix duplicated `import`
2019-02-15 11:08:52 +09:00
sunn
299527370e [go-server] Add dockerfile for building and run petstore service (#274)
* Add possibility to build and run go service in a container

* Remove tabs

* Update Pet Store server sample

* Add {{{packageName}}} instead of petstore
2018-06-13 16:55:04 +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
William Cheng
28a1255c0e
Update Go server petstore sample with OAS3 (#154)
* restore go server from codegen 2x

* update go server petstore with oas3
2018-04-20 12:05:27 +08:00
William Cheng
686ff6a502
Go server petstore update (OAS2, OAS3) (#146)
* restore go server petstore from codegen 2x

* update go server petstore (oas2) - no diff

* update go server samples (oas3)

* add go petstore server script
2018-04-19 21:57:22 +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
Ben Wells
6349e79a59 Fix typo in Petstore yaml (#7195) 2017-12-18 12:30:57 +08:00
Ben Wells
d25341d58d Output models for go-server #3851 (#7188)
* Output swagger models.

Fix route verbs and formatting

* Remove backup files

* Make postProcessOperations consistent with go client
2017-12-17 21:55:20 +08:00
Guo Huang
db9684ff19 issue#2970, [Go] add go server codeine template 2016-05-26 22:34:18 -07:00