[Enhancement] Add support for discriminators#174
Conversation
|
Size Change: +73.2 kB (+2%) Total Size: 3.51 MB
ℹ️ View Unchanged
|
|
Visit the preview URL for this PR (updated for commit 10268b4): https://docusaurus-openapi-36b86--pr174-3t1vn2no.web.app (expires Sat, 27 Aug 2022 18:15:50 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
packages/docusaurus-plugin-openapi-docs/src/openapi/utils/loadAndResolveSpec.ts
Outdated
Show resolved
Hide resolved
|
I reordered the description and qualifier and removed the margin-top for consistency. I also took one more pass at ensuring there will be nested support for discriminators. Since it's basically handled in |
…ocusaurus-openapi-docs into handle-discriminators
|
Initially, we were only handling discriminators that mapped directly to a property at the same level as the discriminator. The recent push adds support for discriminators that map to a property inside the discriminator mapping schema itself. Example 1: Screen.Recording.2022-07-28.at.7.32.28.AM.movExample 2: Screen.Recording.2022-07-28.at.7.33.39.AM.mov |

Description
Addresses FR #156
Motivation and Context
We should do our best to support all polymorphism types, including discriminators.
How Has This Been Tested?
See deploy preview Petstore API for examples.
Screenshots (if appropriate)