File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -81,3 +81,37 @@ const ConvertorFactory = require('index')
81
81
82
82
const convertedSchema = ConvertorFactory.convert(jsonSchema)
83
83
```
84
+
85
+ If you already have a referenced schema named "main", it will append a uuid to "main" like thus:
86
+
87
+ ```
88
+ {
89
+ schemas: {
90
+ main: {
91
+ "type": "string"
92
+ }
93
+ "main-547d55a5-87e9-444e-8783-e64f6863d20e": {
94
+ "title": "JSON API Schema",
95
+ "description": "This is a schema for responses in the JSON API format. For more, see http://jsonapi.org",
96
+ "type": "object",
97
+ "required": [
98
+ "errors"
99
+ ],
100
+ "properties": {
101
+ "errors": {
102
+ "type": "object",
103
+ "properties": {
104
+ "message": {
105
+ "allOf": [
106
+ {
107
+ "$ref": "#/components/schemas/main"
108
+ }
109
+ ]
110
+ }
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
117
+ ```
You can’t perform that action at this time.
0 commit comments