-
Notifications
You must be signed in to change notification settings - Fork 34
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
Validating a collection #588
Comments
Well, as far as the service validator is concerned, it doesn't use OpenAPI at all to verify resources; it's designed around parsing CSDL for understanding the data model. In LogEntryCollection_v1.xml, the "Members" property is annotated with "OData.AutoExpand" to indicate the members are expanded inline the response. Members also points to the data type "LogEntry" to express what data to expect when following the references. In OpenAPI, we carry forward the OData.AutoExpand term as "x-autoExpand" to signify the references will have their payloads expanded:
Now... as I'm looking at that snippet, I'm realizing we made a decision a while ago to always turn references in OpenAPI to simply point to "odata-v4_idRef" to not inadvertently blow up code stubs and documentation... Pointing to the full definition everywhere is not correct.... But, I'm wondering if we need to be a bit more intelligent about this for auto-expanded definitions. Maybe we can point to the resource definition instead of odata-v4_idRef and remove the need for x-autoExpand? |
I guess proper defined autoexpand would look similar to Members:
description: The members of this collection.
items:
type: object
oneOf:
- $ref: http://redfish.dmtf.org/schemas/v1/odata-v4.yaml#/components/schemas/odata-v4_idRef
- $ref: "#/components/schemas/LogEntry" in OpenAPI and would be the required compatibility glue for the status quo. But this depends on if you want to stick to (odata) features which are inconvenient to specify in openapi. |
In this case it wouldn't be a oneOf; I would suggest it looking something like this:
|
Hi,
I'm wondering how to match this collection to the openapi description document:
The specialty is embedding the Members body into the collections Members.
https://github.com/DMTF/Redfish-Publications/blob/5b217908b5378b24e4f390c063427d7a707cd308/mockups/public-nvmeof-jbof/Managers/BMC/LogServices/Log/Entries/index.json#L6-L27
The text was updated successfully, but these errors were encountered: