-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
wrap $ref in allOf when readonly is set #1034
wrap $ref in allOf when readonly is set #1034
Conversation
I added a simple test confirming that setting Can someone point me in the right direction as to a full test for this feature? |
Codecov Report
@@ Coverage Diff @@
## master #1034 +/- ##
==========================================
+ Coverage 93.01% 93.02% +0.01%
==========================================
Files 7 7
Lines 2005 2008 +3
==========================================
+ Hits 1865 1868 +3
Misses 77 77
Partials 63 63
Continue to review full report at Codecov.
|
@josephzidell, you need to write an additional unit test that will call |
@josephzidell We can't merge this PR until we have the unit tests and code coverage passing. |
@ubogdan Understood. Unfortunately, I am feeling lost w/r to the style of unit tests in this repo. If someone can offer some guidance, I'd be happy to wrap this up. |
@ubogdan Is this test in the right vicinity? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@josephzidell Yes, it looks good enough to me. 😃 |
Describe the PR
This PR adds functionality to support readonly
$ref
s. It is supported by swagger, yet requires it to be wrapped in anallOf
.Relation issue
#1033
Additional context
Unfortunately, using
readonly
as a sibling to a$ref
is ignored. The workaround is to wrap the$ref
in anallOf
. See this StackOverflow answer. I have confirmed that manually changing the swagger.json makes this work as expected.