Hello falcoframework,
Thank you firstly for the hard-work and dedication you put into this project, it is greatly appreciated! We are trying to use the framework to generate documentation for a public API server we are working towards, with full documentation and the ability to test from SwaggerUI, but seem to be hitting a wall on the exposing of request body properties conveyed correctly.
We have the following type, for Greeting, where one field would be an option and the other is required. When generating the documentation, it will always state that the field is nullable when defining a simple type. The goal is to have the API docs not show any complex F# types such as wrapped options with the values represented to the end user correctly (MessageRequired shows as required in the schema definition), so that other people who want to integrate with our API can send a DTO shaped accordingly, and have the values mapped and validated on the server.
EndPoint Request Type and EndPoint handler:
Configuration of Services and application:
main:
Produced on the frontend:
When using an optional value, the request value gets wrapped into FSharpOption with the underlying data being wrapped in an object as a value such as, with no way to control when a field in the body is required, they are always nullable when in the request body:
Thank you for your time and effort! Any insights into what corrections or changes need to be made or configured would be a tremendous help!
Hello falcoframework,
Thank you firstly for the hard-work and dedication you put into this project, it is greatly appreciated! We are trying to use the framework to generate documentation for a public API server we are working towards, with full documentation and the ability to test from SwaggerUI, but seem to be hitting a wall on the exposing of request body properties conveyed correctly.
We have the following type, for Greeting, where one field would be an option and the other is required. When generating the documentation, it will always state that the field is nullable when defining a simple type. The goal is to have the API docs not show any complex F# types such as wrapped options with the values represented to the end user correctly (MessageRequired shows as required in the schema definition), so that other people who want to integrate with our API can send a DTO shaped accordingly, and have the values mapped and validated on the server.
EndPoint Request Type and EndPoint handler:
Configuration of Services and application:
main:
Produced on the frontend:
When using an optional value, the request value gets wrapped into FSharpOption with the underlying data being wrapped in an object as a value such as, with no way to control when a field in the body is required, they are always nullable when in the request body:
Thank you for your time and effort! Any insights into what corrections or changes need to be made or configured would be a tremendous help!