19 Commits

Author SHA1 Message Date
Ingars Ribners
3f6c3de029
Updated README.mustache template for the Erlang server generator (#20138)
* Updated README.mustache file for the Erlang server generator. Fixed one error and updated the usage instructions

Changes made to the Erlang server generator's user instructions ("README.mustache" file):

1. Corrected the argument in section 4.1 of the user instructions.
   In openapi_server:start/2, the second argument for the generated Erlang code must now be in a different format than proposed in the instructions (see lines 13-16 of the "server.mustache" file).
   Initially, the server failed to start, and after some debugging, I discovered that the argument format did not match the server's expectations, causing the port number not to be passed to cowboy:start_clear/3. This has now been fixed.

2. Reviewed and updated the text of the user instructions to remove any ambiguities.

3. Tested the user instructions for accuracy and completeness.

* erlang-server sample recompiled

* README fix

* Fixed README.mustache template markdown for erlang-server. Re-generated erlang-server sample.

* Update README.mustache

* Sample 'erlang-server' re-generated

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
2024-11-30 17:31:56 +08:00
Nelson Vides
f8ca36b97e
Erlang server – minor fix to return type and generated doc (#20197)
* erlang-server: add jesse to app.up release

* erlang-server: remove dialyzer errors that might not be related to the program

* erlang-server: minor fixes to return types and generated docs
2024-11-27 22:09:21 +08:00
William Cheng
654f62ce3c
Prepare 7.11.0 (#20130)
* Revert "prepare 7.10.0 release (#20128)"

This reverts commit 12dfe8fe74a1515d1e69e00df9abe4128aa44160.

* update to 7.11.0-SNAPSHOT, update samples

* update docs
2024-11-18 20:15:29 +08:00
Nelson Vides
86a18bfb62
erlang-server: add jesse to app.up release (#20120)
* erlang-server: add jesse to app.up release

* erlang-server: remove dialyzer errors that might not be related to the program
2024-11-17 10:07:03 +08:00
Nelson Vides
a95ea1f519
erlang-server: Extend provided return and make the type available (#20088) 2024-11-12 22:27:37 +08:00
Nelson Vides
20b5059aa5
Erlang server (#20087)
* erlang-server: Extend provided return

* Regenerate erlang-server handlers
2024-11-12 21:26:58 +08:00
William Cheng
e2c458b9ea
Prepare 7.10.0 (#19809)
* Revert "prepare 7.9.0 release (#19808)"

This reverts commit 4145000dfebe7a9edea4555c8515383da7602458.

* prepare 7.10.0 snapshot

* update doc

* update samples
2024-10-08 11:21:54 +08:00
Nelson Vides
77e8346fd7
[Erlang Server] Add more type information and fix minor bugs (#19792)
* Add type information about classes and operation-ids

* Remove unused logger included header

* Bugfix badmatch in delete_resource handler

* Bugfix: respect original indentation of operation_ids

* Bugfix json schema correct refs

* Add a bit more documentation

* Regenerate erlang-server handlers
2024-10-07 15:28:14 +08:00
Nelson Vides
83f6d592a2
Erlang server validation bugfixes and capability extensions (#19750)
* Bugfix: exclusiveMinimum/Maximum must be booleans

* Add support for validating and decoding base64 byte strings

* Add support for validating RFC3339 datetime

* Simplify validate function for performance

* Regenerate erlang-server handlers
2024-10-03 14:24:00 +08:00
Nelson Vides
7e1ebe6404
Erlang server (#19722)
* Add documentation to server and handlers

* Respond to at least one path-server

* Let url servers override base path

* Handle reading bigger bodies in cowboy

* Improve json error handling

* Regenerate erlang-server handlers

* Rework API module for performance and completion

* Regenerate erlang-server handlers
2024-10-01 14:51:12 +08:00
Stefan Koppier
df22ca6dcc
[BUG] Kotlin wiremock query params are incorrect (#19720) 2024-09-30 11:44:08 +01:00
Nelson Vides
d02aae7469
Erlang Server – cowboy return types improvements (#19561)
* Declare the correct types for cowboy rest requests

* Adding myself to the erlang team
2024-09-12 16:59:06 +08:00
Nelson Vides
596d446f54
Erlang server overhaul (#19465)
* Upgrade erlang-server code generation and fix is_authorized crashes

* Introduce structured logging

* Improve general formatting

* Update generated files

* Enable erlang server on CI

* Add echo-server testing to CI

* Require OTP27 explicitly in the generated rebar.config file

* Rework handler and API

With this work, json validation becomes optional, fully implemented in
the `_api` module as it was before, but without being forcibly called by
the `_handler`. It is instead left as optional for the user to take
advantage of the exposed callbacks. Jesse also chooses draft-06 as a
default, but these can be chosen manually by the user too, as long as
jesse implements them.

`_handler` also becomes lighter, it now handles all mime types
transparently by forwarding to a user-given module that must implement
`accept_callback/4` and `provide_callback/4` as described in the
`_logic_handler` callbacks. These will simply be the return values of
cowboy_rest's `content_types_accepted` and `content_types_provided`
respectively, and should simply comply with their defined APIs. They
only get two parameters extending the behaviour, so that the user-given
callback can pattern-match on them: the path prefix of the logic
handler, and the operationID of the call.

* Fix return types for provide_callbacks

* Upgrade jesse to incur no dependencies

The less dependencies the built code requires the better.

* Fix dialyzer errors in the generated code

* Apply stronger dialyzer checks
2024-09-07 16:45:42 +08:00
William Cheng
91da2fd240
Prepare 7.9.0 snapshot (#19386)
* Revert "v7.8.0 release (#19385)"

This reverts commit 6bdc452f92d49dcac7ac21dfe8751c8cc4267b98.

* update samples for v7.9.0-snapshot
2024-08-19 16:14:51 +08:00
Stefan Koppier
aea536027c
[bugfix][kotlin-wiremock] fix problems with range responses (#19309)
* [kotlin] Target correct library in jvm-spring-webclient sample

* [kotlin] Fixed warning in jvm-spring-restclient

* [kotlin-wiremock] fixed issue 7193

* [kotlin-wiremock] fixed wrong implementation of fromResponse

* [kotlin-wiremock] forbidden API

* [kotlin-wiremock] fixed wrong workflow trigger
2024-08-07 18:04:05 +08:00
Tolga Akkiraz
7f01a354a5
[Kotlin] Fix invalid gradlew.bat templates (#19165)
* Fix invalid gradlew.bat templates

* Update samples
2024-07-15 20:57:58 +08:00
William Cheng
20cfce0b4a
Prepare v7.8.0 (#19048)
* Revert "v7.7.0 release"

This reverts commit f3dd32385e02065ad298801ca11b8871bcb3a92a.

* prepare v7.8.0

* update readme

* update doc

* update samples
2024-07-02 16:45:53 +08:00
William Cheng
9398c6444a update samples 2024-05-21 14:58:21 +08:00
Stefan Koppier
27120357aa
[kotlin-wiremock] New generator for generating WireMock stubs using Kotlin (#18705)
* [kotlin] Target correct library in jvm-spring-webclient sample

* [kotlin] Fixed warning in jvm-spring-restclient

* [kotlin-wiremock] added generator and sample

* [kotlin-wiremock] First version with petstore

* [kotlin-wiremock] Small typo

* [kotlin-wiremock] Added echo-api test

* [kotlin-wiremock] Split stub and stub builder

* [kotlin-wiremock] Added default values and jackson annotations to models

* [kotlin-wiremock] Small default value fix

* [kotlin-wiremock] Use Gradle wrapper version in samples-kotlin-server GitHub workflow

* [kotlin-wiremock] Added default artifact name

* [kotlin-wiremock] Added kotlin docs

* [kotlin-wiremock] Fixed capitalization in kotlin docs

* [kotlin-wiremock] Added kotlin-wiremock echo_api sample to GitHub workflow

* [kotlin-wiremock] Added new generator to README.md

* [kotlin-wiremock] Generated docs

* [kotlin-wiremock] Generated docs (missed commit)

* [kotlin-wiremock] Explicit Gradle wrapper version in kotlin server generators

* Revert "[kotlin-wiremock] Explicit Gradle wrapper version in kotlin server generators"

This reverts commit 71e1c47def93fdcb9c7e4efe999fc34e21d7518c.

* [kotlin-wiremock] Revert Gradle in workflow samples-kotlin-server and moved kotlin-wiremock samples to separate workflow

* [kotlin-wiremock] Use Java 11 instead of Java 8

* [kotlin-wiremock] ensure-up-to-date
2024-05-21 13:53:44 +08:00