-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
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
Add the requestBody for the post endpoints #11
Comments
Great spot! I'm not at my laptop at the moment, but I'll get this fixed when I'm back. |
I had a quick look at this earlier and it's caused by us switching to We'll need to write a custom Scribe strategy to pull the data from Laravel Data, pretty gnarly. |
Actually, pinging @joelbutcher (refactored Cachet into |
@jbrooksuk I'm working on a Scribe strategy specifically for Laravel Data for work. I'm hoping to publish this soon. If you assign this to me, I'll make sure to create a PR once this is done. 👍 |
Hah, no way @joelbutcher! I'll make the PR in Cachet itself that installs, configures and generates the Scribe docs. |
@joelbutcher I've tested this out (cachethq/cachet#4449) but it's not generating everything. A good example is the |
@jbrooksuk That's odd, by the looks of it, Laravel Data itself isn't returning any rules for the properties with default values. Might have to dig a bit deeper into laravel-data as to why this is occurring. An alternative is to scrap using PHP attributes and define a static public static function rules(ValidationContext $context): array
{
return [
//...
];
} |
@jbrooksuk I'll send in a PR today that uses the |
Amazing, thanks @joelbutcher! |
@jbrooksuk at one point we had Method Illuminate\Validation\Validator::validateFloat does not exist. Is there an alternative rule we can use? I was thinking |
Yeah, |
The post endpoints in the API doc doesn't have a requestBody example or specification. Would be nice to have it.
If added to the openapi.yaml should be enough
https://learn.openapis.org/specification/parameters.html
The text was updated successfully, but these errors were encountered: