kuzznya / exposer Goto Github PK
View Code? Open in Web Editor NEWBootstrap API creator
License: MIT License
Bootstrap API creator
License: MIT License
Check if all method params are mapped & throw exception if not
or use default principle (params['<name>'] ?: pathVars['<name']
)
Handle Set & other types of collections
Now the attempt causes IllegalArgumentException
EndpointPropertyBuilder sets empty map for endpoint params leading to error with EndpointHandler when it tries to get value for key
Set null instead of empty map
Syntax $(...) is redundant
Better use : params['val'] without $(...)
Originally posted by @kuzznya in #5 (comment)
args: params['somevalue'], pathVars['test']
syntax to simplify params definition (maybe too difficult)Add logging for each request & response, especially errors (if required, because Spring Boot also logs errors)
Recursive bean resolving for endpoints isn't working
Test cast from various params to method params, e.g. request param (always String) to double
EndpointHandler cannot load correct names of method it calls
Solution: use ParameterNameDiscoverer
Consider making it a bean to avoid creating it for each EndpointHandler
Add path parameter to endpoint configuration to enable defining some part of the path directly for the endpoint & simplify some config, e.g.:
exposer:
endpoints:
- path: /test/v1
...
- path: /test/v2
For more complex request handling actions, such as getting data from body, new syntax is required
Some ideas:
params:
arg0: textArg
arg1: {{ params.someVal }}
user: {{ body.username }}
data: {{ body }}
Use .getMethods() instead of .useDeclaredMethods() to allow use superclass methods
EndpointHandler cannot return non-String values because no JSON converter set for core module
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.