Git Product home page Git Product logo

maverick's People

Contributors

bbalser avatar jeffgrunewald avatar mhanberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mhanberg

maverick's Issues

Set global response headers from Api module

Users should be able to provide a set of global response headers from the Api module. The module should implement a behaviour that returns response headers that are merged with any headers coming from the return value of a function.

Allow body_params to be any valid json when arg_type is request

By default, the body_params argument for incoming requests is deserialized to a map or is placed into a map with the top-level key of _json_body. However, when the arg_type is request (the user is explicitly selecting to receive the entire %Maverick.Request{} struct as the argument to the internal function), it should be possible to override this behavior and allow the body_params to be any valid json.

In this scenario, the body_params is not coerced to a map and thus not merged into the params map. It will be up to the user to handle the type received in this instance.

The default behavior should still be to coerce the body a map and merge it into the params value.

Enforce required_params are non-nil

Required params should also enforce they are non-nil and return an error to the client if not all values supplied when arg_type is set to required_params are sent on the incoming request.

Set global "root scope" path from Api module

Currently, user modules can declare a shared path "scope" on a per-module basis by passing the scope: "/some/path" argument to the use Maverick macro. This is fine and should still be supported but gets redundant with multiple modules that implement Maverick routes and should also support defining a "root scope" that all routes handled by a Maverick will serve.

Define this root scope functionality from the Api module with no default value. The best solution is likely another argument to the use Maverick.Api macro like root_scope: "/some/route/prefix"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.