-
Notifications
You must be signed in to change notification settings - Fork 258
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
[Bug] Support multiple same-level node types and improve items/array support #397
Conversation
Size Change: +21.9 kB (0%) Total Size: 4.46 MB
ℹ️ View Unchanged
|
Visit the preview URL for this PR (updated for commit 2b55d45): https://docusaurus-openapi-36b86--pr397-nr3rt8ms.web.app (expires Fri, 03 Mar 2023 21:44:00 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
96bf7d0
to
b308dc7
Compare
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.
Tested with the following specs to ensure the following:
- No breaking changes were introduced when generating docs via CLI command
- Rendering both Request and Response schemas that included
oneOf
+properties
Body
component withinApiDemoPanel
containedoneOf
andproperties
where applicable
Prisma Access Config
- Addresses
- AddressGroups
- AntiSpywareSignatures
- AntiSpywareProfiles
- ApplicationFilters
- Applications
- AuthenticationProfiles
- Certificates
- DecryptionRules
- DNSSecurityProfiles
- ExternalDynamicLists
- HIPObjects
- IKECryptoProfiles
- IKEGateways
- IPSecCryptoProfiles
- IPSecTunnels
- MFAServers
- QoSPolicyRules
- QoSProfiles
- RadiusServerProfiles
- SCEPProfiles
- Schedules
- Services
- TrafficSteering
- VulnerabilityProtectionProfiles
- VulnerabilityProtectionSignatures
CDL - Log Forwarding
- HTTPSProfiles
SASE - Subscription API
- Instance
Description
Some schemas can implement more than one node type at the same level, such as
oneOf
andproperties
, or any other combination. This change introduces changes to howcreateNodes
processes schemas. Previously, there was an ordered precedent applied whereby we exited after the first match. With these changes, now all node types will be collected in an array and returned together, in the order they were processed.Preview: https://docusaurus-openapi-36b86--pr397-nr3rt8ms.web.app/
Motivation and Context
Addresses issue observed in the following endpoint, whereby only the
oneOf
schema/node was processed and theproperties
were ignored: https://pan.dev/access/api/prisma-access-config/post-sse-config-v-1-address-groups/Preview with fix: https://docusaurus-openapi-36b86--pr397-nr3rt8ms.web.app/config/post-sse-config-v-1-address-groups/
How Has This Been Tested?
Tested with the Prisma Access Config
address-group
spec referenced above. Can be found here: https://raw.githubusercontent.com/PaloAltoNetworks/pan.dev/master/openapi-specs/access/prisma-access-config/AddressGroups.yamlAdditional testing is required to ensure no regression bugs are introduced.