dingo / api-docs Goto Github PK
View Code? Open in Web Editor NEWDocumentation for the API package.
Documentation for the API package.
Originally posted over at dingo/api dingo/api#655
I want to send a Pull Request, but I just want to make sure that it's fine
Hi,
I've been using dingo/api in many applications and I noticed that users of dingo/api might need to know about the following issues in the wiki (and maybe at least about their workarounds or a link to the github issue):
withoutMiddleware
in tests returns 404 - This is something that can't be fixed, but I think it's worth noting. #571This is the only thing mentioned in the wiki page
The API will generally work with all other packages, however, some Laravel specific packages may conflict with the API as it integrates itself heavily with the Laravel router to provide the needed functionality.
Let me know what you think!
In Wiki: Responding With An Error it states:
return $this->response->errorUnauthorized();
However, all the method does is throws an error. The method itself has no return statement. Isn't the return
redundant?
Consider the following controller method as example. If a return is added to the errorResponse, it does nothing except adds a warning to the IDE because there's a conflict between return void
and the declared return type. (Adding |void
to @return
causes a warning too.)
/**
* Display the specified resource.
*
* @param \App\Letter $letter
* @return \Dingo\Api\Http\Response
*/
public function show(Letter $letter)
{
/** @var User $user */
$user = $this->auth->user();
if( $user->cannot('view', $letter) ) {
$this->response->errorUnauthorized();
}
return $this->response->item($letter, new LetterTransformer);
}
Hi there,
Transformers Wiki page contains wrong links to previous/next Wiki page in the footer.
use @Response(200, body={"data":[{"id":1, "name":"foo"},{"id":1, "name":"bar"}]})
will give a exception like Expected PlainValue, got '['
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.