* add mapping features to julia generators
* additional changes required for mapped names (#16383)
---------
Co-authored-by: Tanmay Mohapatra <tanmaykm@gmail.com>
* adopt python3.5+ syntax
removing some residual python2 code, since it is not supported anymore, like:
- no need for `six` anymore
- no need for encoding utf8 in top file
- remove `object` inheritance in base model
- remove absolute import `__future__`
* generate samples
applying the new templates
* update python ignore pattern
ignore all the `.venv` folders
* Update go-gin-server templates to return a configurable library
Before this change, the user would be required to make changes in the
generated code. This makes it really hard to update the API and the
documentation at the same time. With this change, the generated code can
be imported as is and used. The user just needs to set the handler
functions for each endpoint.
* Use spaces instead of tabs for api files
* Use space instead of tab for ApiHandleFunctions in go-gin-server
* Update samples for go-gin-server
* Remove trailing underscore in security_controller_.py and base_model_.py
* Regenerating sample files
* Clean-up files with trailing underscore in samples
* Update security extension to use the new security_controller
* Regenerate unmaintained samples
* Partitally reverts #15185
* Remove unused import
* Set zero value if param is empty
* Refactor samples, add test config
* Add tests
* Clean up
* Fix test
* introduce useApachePekko flag into scala-akka-http-server
* useApachePekko flag in scala-akka-http-server templates
* introduce scala-pekko-http-server samples
* [haskell-servant][haskell-yesod] use table-based conversion for field name conversion
Current fieldLabelModifier implementation always produces uncapitalize
name, but it is inappropriate if the original JSON field name begins
with a capital letter.
* [haskell-servant][haskell-yesod] regenerate samples
* [haskell][haskell-yesod] remove fixOperatorChars()
fixOperatorChars() does not change input strings since special
characters have already been replaced in DefaultCodegen.fromModel().
* [haskell][haskell-yesod] do not prefix with quote ("'") when generating removeFieldLabelPrefix table
We switched from the conversion done by fixOperatorChars() to the
conversion done by DefaultCodegen.fromModel() and the latter does not
insert quote characters. So We modify the removeFieldLabelPrefix table
to conform the new mapping.
* [haskell][haskell-yesod] remove forParsing parameter from removeFieldLabelPrefix function
Aeson's fieldLabelModifier always convert Haskell field names to JSON
field names, whether at parse time or not. (Note that stripPrefix and
uncapitalize do not take such parameter)
* [haskell][haskell-yesod] perform replaceSpecialChars after stripping prefix
Because replaceSpecialChars can corrupt prefix if the prefix contains
a replacement string of a specfial character as a substring.
* [haskell][haskell-yesod] regenerate samples
This fixes#15043
The issue is that browsers like "text/html,...,*/*;q=0.8" (see for
instance https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_negotiation/List_of_default_Accept_values
)
Without this commit we end up with an array of accepted type like
`("text/html", "*/*;q=0.8)` so when we then check if the array contains
`*/*` the check fails, and we return a 406 even though the client is
able to get the response.
This commit fixes it by removing the `;q=0.8` part.
(Ideally we should not just discard that part, we should extract that
value, and order by it. See
https://developer.mozilla.org/en-US/docs/Glossary/Quality_values for
more info about that. However this could be done in a subsequent PR:
this already fixes the 406 error, which is pretty blocking)
* [Julia] update samples test and a minor fix
- updating samples test for Julia generated code to use the latest OpenAPI.jl Julia package, which includes tests for file uploads
- also including a fix where generated code duplicated the `mandatory` flag in one of the method calls
* add blank line, trigger build with julia workflow
* more updates to julia samples tests
* add samples changes
* [haskell] fix exampe code in generated README.md
Since create{{title}}Client is not a monadic action, we need to use
"let" instead of "<-".
* regenerate samples
- detect multipart and urlencoded post data formats correctly on the server side
- generate data types correctly for binary file uploads
- re-generated samples
* Update generatedAnnotation.mustache
Without this, it generates a jakarta annotation in the controllers of a spring boot 2 project.
* Updated examples
This fixes this Symfony warning:
User Deprecated: Method "Symfony\Component\HttpKernel\Bundle\Bundle::build()"
might add "void" as a native return type declaration in the future. Do the
same in child class "OpenAPI\Server\OpenAPIServerBundle" now to avoid errors
or add an explicit @return annotation to suppress this message
This fixes#15959
* make all unmaintained samples executable
* remove samples not generated by any config (not even unmaintained configs)
* remove deleted samples from github workflows
* Fix Java equals and hashCode methods to work with inheritence (#5756)
* Regenerate code samples with improved hashCode/equals
---------
Co-authored-by: Andrew Pikler <andrew.pikler@earnix.com>