Skip to content

Commit 62d0c24

Browse files
committed
update README
1 parent 304638c commit 62d0c24

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,37 @@ const ConvertorFactory = require('index')
8181
8282
const convertedSchema = ConvertorFactory.convert(jsonSchema)
8383
```
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+
```

0 commit comments

Comments
 (0)