contributte / api Goto Github PK
View Code? Open in Web Editor NEW๐ Powerful, documented, validated, built-in API to Nette Framework. (@nette)
Home Page: https://contributte.org/packages/contributte/api.html
License: MIT License
๐ Powerful, documented, validated, built-in API to Nette Framework. (@nette)
Home Page: https://contributte.org/packages/contributte/api.html
License: MIT License
@RootPath
might contains only a-z, A-Z, 0-9, -, _Can you please fix typing error in Contributte\Api\Schema\Endpoint,php
correct name of method is OPTIONS with "S" on rows 15 , 22
To separater controllers to sections/modules.
I am using this bundle for creating docs on Symfony:
https://symfony.com/doc/master/bundles/NelmioApiDocBundle/index.html
do you think that support for something like this could be possible?
Add attributes under meta key.
@Mapping(App\Model\UserEntity)
middleware.api:
class: Contributte\Api\Bridges\Middlewares\ApiDataMiddleware([
Contributte\Api\Bridges\Middlewares\ApiRouter("^/franta/{api}{?format:\\.json|.debug}$"),
Contributte\Api\Bridges\Middlewares\ApiContentNegotiation([
Contributte\Api\Bridges\Middlewares\Negotiation\UrlNegotiator([
"json": Contributte\Api\Bridges\Middlewares\Negotiation\Transformer\JsonTransformer(),
"debug": Contributte\Api\Bridges\Tracy\Negotiation\Transformer\DebugTransformer(),
"*": Contributte\Api\Bridges\Middlewares\Negotiation\Transformer\JsonTransformer()
])
]),
Contributte\Api\Bridges\Middlewares\ApiEmitter()
])
to
middleware.api:
class: Contributte\Api\Bridges\Middlewares\ApiDataMiddleware([
Contributte\Api\Bridges\Middlewares\ApiPrefix("/franta"),
Contributte\Api\Bridges\Middlewares\ApiContentNegotiation([
Contributte\Api\Bridges\Middlewares\Negotiation\UrlNegotiator([
"json": Contributte\Api\Bridges\Middlewares\Negotiation\Transformer\JsonTransformer(),
"debug": Contributte\Api\Bridges\Tracy\Negotiation\Transformer\DebugTransformer(),
"*": Contributte\Api\Bridges\Middlewares\Negotiation\Transformer\JsonTransformer()
])
]),
Contributte\Api\Bridges\Middlewares\ApiEmitter()
])
Add request cycle/event. It solves #7
Must start with slash /
.
@Parameter(name, desc)
Allow define fallback controller or handler.
Variables should have a generic regex.
It would be nice to be able to set in config something like
api:
prefix: /api/v1
and then @RootPath("/foo")
would mean url https://<host>/api/v1/foo
/**
* @Path("/user/{id}")
* @Method("POST")
* @Mapping({
* @Request(My/Entity),
* @Response(My/Entity2),
* })
* @param ApiRequest $request
* @param ApiDataResponse $response
* @return ApiResponse
*/
public function detail(ApiRequest $request, ApiDataResponse $response) {
}
Hi,
I was surprised that @Path
does not support PATCH method. Why is that?
FYI happy to send PR
Thanks
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.