Skip to content

Ideas about new functions: chi support, request/response validation #2

@kak-tus

Description

@kak-tus

I have some ideas to new functions and I am ready to code them.

  1. Add command line option to produce chi compatible server interface and handlers.
  2. Add support for full request validation.
    a) add middleware for chi router with params validation and secure validation;
    b) add secure validation to echo middleware.

For security validation there is needed for "AuthenticationFunc". I prefer to add it not as callback function, but as interface function.

  1. Add support for full response validation. There is two options.

a) validation may be added as on runtime basis as middleware: get generated response and validate it with openapi3filter. It is simple, but adds time to request processing;

b) static validation. We can generate boilerplate, so interface functions will be returns predefined genereated structs from boilerplate, these struct will be self-validated and produce from them json responses. It is more complicated, but will be more user-friendly to developer and gets better perfomance.

Please, say your opinion about this features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions