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

fix(capabilities): Generate default scope even without routes when ca… #81

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

nickvergessen
Copy link
Member

…pabilities exist

Fix #79

@nickvergessen nickvergessen added the bug Something isn't working label Jan 18, 2024
@nickvergessen nickvergessen self-assigned this Jan 18, 2024
Comment on lines +785 to +786
} else {
Logger::panic('app', 'No routes or capabilities defined');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also remove this, but I think it's helpful notifying that openapi is run uselessly

@provokateurin
Copy link
Member

Testing this with the comments app still doesn't generate a new openapi.json

@nickvergessen
Copy link
Member Author

Testing this with the comments app still doesn't generate a new openapi.json

Well server does not regenerate if the file is absent. But if you add a complete empty openapi.json for comments and sharebymail both will be filled correctly.

https://github.com/nextcloud/server/blob/5a74f4ac398dda764d59952436bd7d36fbb84cf0/build/openapi-checker.sh#L3-L5

@nickvergessen
Copy link
Member Author

That being said, something for later, but we should change server and just loop over all non-excluded directories and add a .noopenapi ignore file where we don't want to have it instead.
E.g. I noticed workflowengine and systemtags do/did not have it although providing capabilties and/or OCS endpoints

@provokateurin
Copy link
Member

Yes, that's also relevant for #82 after which it is not given that a openapi.json file exists (without any scope suffix).

@provokateurin
Copy link
Member

Well server does not regenerate if the file is absent

My bad I thought I tested it correctly.

@provokateurin provokateurin merged commit ee8e8c3 into main Jan 18, 2024
10 checks passed
@provokateurin provokateurin deleted the bugfix/79/generate-default-when-capabilities branch January 18, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

App without any routes generates no openapi.json despite having schemas
2 participants