-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 a structured type to batchGet in OpenAPI V3 spec #10956
Changes from all commits
84375d2
e184bcd
73fb5e9
143554d
a26f3bb
e377b43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,5 +88,18 @@ public void testOpenApiSpecBuilder() throws Exception { | |
Schema fabricType = openAPI.getComponents().getSchemas().get("FabricType"); | ||
assertEquals("string", fabricType.getType()); | ||
assertFalse(fabricType.getEnum().isEmpty()); | ||
|
||
Map<String, Schema> batchProperties = | ||
openAPI | ||
.getComponents() | ||
.getSchemas() | ||
.get("BatchGetContainerEntityRequest_v3") | ||
.getProperties(); | ||
batchProperties.entrySet().stream() | ||
.filter(entry -> !entry.getKey().equals("urn")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably makes more sense to do this as a anyMatch() rather than filtering specific entries, no? Otherwise this test will likely need to be updated every time a new component gets added. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I specifically wanted to test all attributes in this |
||
.forEach( | ||
entry -> | ||
assertEquals( | ||
"#/components/schemas/BatchGetRequestBody", entry.getValue().get$ref())); | ||
} | ||
} |
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.
Please note this default behavior change in updating-datahub.md as this may change workflows built around this endpoint, it does make more sense to me as a default though.
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.
This was recently added in #10654 for us specifically and no one is using this afaik, but i will note it just in case
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.
Actually @RyanHolstien is that necessary if there was no release published between the changes?
This change (#10654) was implemented after v0.13.3 was released
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.
Nope! That's fine if it hasn't been released yet :)