Commit 91c5dcc
feat: support schema.examples array in example generator (PaloAltoNetworks#1270)
Adds support for the OpenAPI 3.1 / JSON Schema 'examples' array in the
schema example generator (createSchemaExample.ts):
- Check schema.examples after schema.example in sampleFromSchema
- Check property.examples after property.example in sampleFromProp
- Uses first example from array when examples is non-empty
- Guards against empty arrays to prevent fallback issues
Closes PaloAltoNetworks#1219
Co-authored-by: Jens Claes <[email protected]>1 parent 98c3f4a commit 91c5dcc
File tree
1 file changed
+12
-1
lines changed- packages/docusaurus-plugin-openapi-docs/src/openapi
1 file changed
+12
-1
lines changedLines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
| 122 | + | |
117 | 123 | | |
118 | 124 | | |
119 | 125 | | |
| |||
126 | 132 | | |
127 | 133 | | |
128 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
129 | 140 | | |
130 | 141 | | |
131 | 142 | | |
| |||
0 commit comments