Closed julianbirkett closed 2 years ago
Hi @julianbirkett, I believe I found the root cause.
Traced it back to this option in the json-schema-merge-allof
library:
https://user-images.githubusercontent.com/9343811/186950422-5db8e940-84c7-47d0-8eab-2d06c537beb6.mov
Still testing but I'll merge once the fix is verified.
Hi, canary release 0.0.0-434
is available to test now. Thanks!
I've tested the canary release and that is giving the output I'd expect. Thanks very much.
Describe the bug
I have a response schema that includes an allOf with an array and another referenced schema. For some reason the array part is not displaying in the Schema section of my API page. The schema definition looks like this.
Expected behavior
I would expect the array and the array and the common response collection to appear on the page
Current behavior
Currently the page looks like this
Possible solution
I think it may be the fact that this is either in an array or allOf is not being recognised by the parser
Steps to reproduce
customers.v3.txt
I have attached the customers yaml spec I used as a .txt file.
Copy the attached customers.v3.txt file onto your machine
Rename it to .yaml
Add the plugin for the spec into the docusaurus.config.js
id: "apiDocs", docsPluginId: "classic", config: { customer: { specPath: "apidocs/customer.v3.yaml", // Path to designated spec file outputDir: "docs/apis/customer", // Output directory for generated .mdx docs sidebarOptions: { groupPathsBy: "tag", categoryLinkSource: "tag", sidebarCollapsible: true, customProps: {}, }, }
Add the entry into a sidebar somewhere
{ type: "category", label: "Customer", link: { type: "generated-index", title: "Customer API", description: "This is a sample server Customer server. You can find out more about Swagger at http://swagger.io/ or on irc.freenode.net, #swagger. For this sample, you can use the api key special-key to test the authorization filters.", slug: "/category/customer-api" }, // @ts-ignore items: require("./docs/apis/customer/sidebar.js") }
Screenshots
Context
This style of definition covers a number of API specs we use so it would be really helpful to get this fixed
Your Environment