File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,13 @@ class SchemaGenerator extends BaseGenerator {
160160 enumeration: (schema) {
161161 _writeEnumeration (name: name, schema: schema);
162162 },
163+ string: (value) {
164+ _writeTypedef (
165+ name: name,
166+ description: value.description,
167+ def: 'String' ,
168+ );
169+ },
163170 array: (schema) {
164171 final iType = schema.items.toDartType ();
165172 _writeTypedef (
Original file line number Diff line number Diff line change 3131 }
3232 },
3333 "components" : {
34+ "securitySchemes" : {
35+ "HTTPBearer" : {
36+ "type" : " http" ,
37+ "scheme" : " bearer"
38+ }
39+ },
3440 "schemas" : {
3541 "MapResult" : {
3642 "properties" : {},
3743 "additionalProperties" : true ,
3844 "type" : " object" ,
3945 "title" : " MapResult" ,
4046 "description" : " A MapResult"
47+ },
48+ "StringAlias" : {
49+ "type" : " string"
50+ },
51+ "MyObject" : {
52+ "type" : " object" ,
53+ "properties" : {
54+ "myField" : {
55+ "$ref" : " #/components/schemas/StringAlias"
56+ }
57+ }
4158 }
4259 }
4360 }
You can’t perform that action at this time.
0 commit comments