Updated OpenApiDocs to use Cloud shared storage if available, #PG-4593#27
Merged
Conversation
…if on Cloud, it will use CloudDistributedCachePath, else, it will use /tmp in the plugin
There was a problem hiding this comment.
Looks good to me from a Cloud perspective! 👍
May want is_dir() + is_writable() checks within getSharedArtifactDirectory() just in case the folder didn't exist or permissions weren't incorrectly set. Either would be highly unlikely given how much it's used though.
AltamashShaikh
previously approved these changes
Apr 8, 2026
Contributor
AltamashShaikh
left a comment
There was a problem hiding this comment.
LGTM and I can see the files being stored in plugins/OpenApiDocs/tmp/specs when Cloud plugin is disabled and in cache/distributed/OpenApiDocs/specs/ folder when Cloud plugin is enabled.
AltamashShaikh
approved these changes
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updated to use a path resolver instead of hardcoding paths for specs and annotations, if Cloud plugin is enabled and
CloudDistributedCachePathis available we use that. If not, we default back to/tmp/Also cleaned up file writing into it's own class, if we need to make some changes to support anything cloud related this should make it simpler.
If cloud is enabled and you run:
openapidocs:generate-spec-file --plugin Funnels --not-dry-run --add-annotationsYour files will appear in
/var/www/html/cache/distributed/OpenApiDocsIf cloud is disabled they'll just appear as usual
Issue No
Steps to Replicate the Issue
Checklist