Skip to content
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

Support @apiResource with missing @apiResourceModel #662

Merged
merged 6 commits into from
May 28, 2023
Merged

Support @apiResource with missing @apiResourceModel #662

merged 6 commits into from
May 28, 2023

Conversation

ccec1t91077
Copy link
Contributor

Update:

  • Allow generate document without @apiResourceModel tag (but will remind you didn't use the @apiResourceModel tag)

This is a little feature to allow the document generate when the JsonResource is working with empty resource which means won't have any model to specify on the @apiResourceModel tag.

This might help some project using JsonResource to manage the api response which like webhook api or none data response api.

From #652.

@shalvah
Copy link
Contributor

shalvah commented May 21, 2023

Can you add a test for the expected behaviour? You can look at the existing ApiResourceTests for an example.

@ccec1t91077
Copy link
Contributor Author

ccec1t91077 commented May 23, 2023

Hi, I've added tests but I'm not sure if I'm doing things correctly, because I don't have much experience for writing tests, so if I did something bad please correct me, ty. 🙂

@shalvah
Copy link
Contributor

shalvah commented May 28, 2023

Nice, thanks!

@shalvah shalvah changed the title Allow generate document without @apiResourceModel Support @apiResource with missing @apiResourceModel May 28, 2023
@shalvah shalvah merged commit 33b9f4e into knuckleswtf:master May 28, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants