/
servlamo
/
cue
Обзор
Документация
Войти
/
servlamo
/
cue
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
encoding/openapi/testdata/array.json
121 строка
3 KB
Roger Peppe
cue: open lists are still concrete
10 окт 2024, 11:17
10 окт 2024, 11:17
1eb6216
Код
Авторство
О чём код?
{ "openapi": "3.0.0", "info": { "title": "Generated by cue.", "version": "no version" }, "paths": {}, "components": { "schemas": { "Arrays": { "type": "object", "properties": { "bar": { "type": "array", "items": { "$ref": "#/components/schemas/MyEnum" } }, "foo": { "type": "array", "items": { "$ref": "#/components/schemas/MyStruct" } }, "baz": { "type": "array", "uniqueItems": true }, "qux": { "type": "array", "minItems": 1, "maxItems": 3 }, "closedConcreteList": { "type": "array", "items": [ { "type": "integer", "enum": [ 1 ] }, { "type": "integer", "enum": [ 2 ] }, { "type": "integer", "enum": [ 3 ] } ], "default": [ 1, 2, 3 ] }, "openConcreteList": { "type": "array", "minItems": 3, "items": [ { "type": "integer", "enum": [ 1 ] }, { "type": "integer", "enum": [ 2 ] }, { "type": "integer", "enum": [ 3 ] } ], "default": [ 1, 2, 3 ], "additionalItems": {} } } }, "MyEnum": { "description": "MyEnum", "type": "string", "enum": [ "1", "2", "3" ], "default": "1" }, "MyStruct": { "description": "MyStruct", "type": "object", "properties": { "a": { "type": "integer" }, "e": { "type": "array", "items": { "$ref": "#/components/schemas/MyEnum" } } } } } } }