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 @@ -331,6 +331,40 @@ becomes
331331 ...
332332` ` `
333333
334+ # ## Rename `$comment` as `x-comment`
335+
336+ The tool renames the `$comment` keyword in schema objects as `x-comment`
337+ as `$comment` is not supported in OAS 3.0 JSON Schema Draft 4
338+ used in OAS 3.0. and can cause problems with some tools.
339+ ` x-comment` is more easily ignored since it does not start with `$`.
340+
341+ For exmample,
342+ ` ` ` yaml
343+ Problems:
344+ title: Problems
345+ description: Problem Items
346+ type: array
347+ maxItems: 1000
348+ $comment: >-
349+ The value 1000 here must match ` maxItems` in the ProblemList schema.
350+ items :
351+ $ref : ' #/components/schemas/apiProblem'
352+ ` ` `
353+
354+ becomes
355+
356+ ` ` ` yaml
357+ Problems :
358+ title : Problems
359+ description : Problem Items
360+ type : array
361+ maxItems : 1000
362+ x-comment : >-
363+ The value 1000 here must match `maxItems` in the ProblemList schema.
364+ items :
365+ $ref : ' #/components/schemas/apiProblem'
366+ ` ` `
367+
334368### Remove schema ` $id` and `$schema`
335369
336370The tool removes any `$id` or `$schema` keywords that may appear
You can’t perform that action at this time.
0 commit comments