We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using v0.12.11, when trying to document an API resource like this:
/** * @mixin MyModel */ class MyModelResource extends JsonResource { public function toArray(Request $request): array { return [ /** * The first field * @var string|null * @example "Some example value" */ 'field_one' => $this->field_one, /** * The second field * @var string|null|boolean * @example "Some other example" */ 'field_two' => $this->field_two, ]; } }
The generated documentation for field_one works as expected, and includes the description from the doc block as well as the given example:
field_one
{ "type": [ "string", "null" ], "description": "The first field", "examples": [ "Some example value" ] }
However field_two ignores the description and the example, and just documents that it can be any of string, null or boolean:
field_two
{ "anyOf": [ { "type": "string" }, { "type": "null" }, { "type": "boolean" } ] }
I'm not sure if I'm missing a way to annotate the field to make this work they way I would expect for field_two, or if this is a bug?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Using v0.12.11, when trying to document an API resource like this:
The generated documentation for
field_one
works as expected, and includes the description from the doc block as well as the given example:However
field_two
ignores the description and the example, and just documents that it can be any of string, null or boolean:I'm not sure if I'm missing a way to annotate the field to make this work they way I would expect for field_two, or if this is a bug?
The text was updated successfully, but these errors were encountered: