Commit 6f9e7bd
Strict server generation (oapi-codegen#499)
* Added strict server generation that does automatic marshaling of request and response bodies, meaning less manual code and forced schema compliance
* Support any content type by using io.Reader
* removed generating marshalling code from client for content types other than JSON
* Multipart and formdata are now passed as forms without any binding
* run make generate to fix the build
* added sorting of request bodies to reduce number of random changes in generated code, fixed content type in RequestBody's comment
* Implemented basic formdata binder (not yet integrated into strict server)
* Added tests for strict generation, support for form marshalling, client improvements
* Fixed incorrect referencing of request bodies, added sorting of response definitions
* Added sorting of content types in responses
* Support multipart responses using callback function, added header example
* Added sorting of headers in response objects
* Added proper testing to strict servers
* Fix after master merge
* Reuse responses defined in components section, moved strict test to tests
* When multiple responses ref to a single reusable response, only the first one will use an alias, all others will generate new structs
* Update generated code after merge
* Some documentation for strict server
* Support for AdditionalProperties when binding forms
Co-authored-by: ilya.bogdanov <ilya.bogdanov@ispringsolutions.com>
Co-authored-by: ilya.bogdanov <ilya.bogdanov@ispring.com>1 parent 7da811e commit 6f9e7bd
56 files changed
Lines changed: 7863 additions & 62 deletions
File tree
- cmd/oapi-codegen
- examples
- authenticated-api/echo/api
- petstore-expanded
- chi/api
- echo/api/models
- gin/api
- gorilla/api
- strict
- api
- internal/test
- client
- components
- issues/issue-312
- schemas
- server
- strict-server
- chi
- client
- echo
- gin
- pkg
- codegen
- templates
- strict
- runtime
- types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
263 | 304 | | |
264 | 305 | | |
265 | 306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| 326 | + | |
| 327 | + | |
326 | 328 | | |
327 | 329 | | |
328 | 330 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments