|
|
@ -23,8 +23,9 @@ class OpenAPIBuilder implements Builder { |
|
|
|
) as Map<String, dynamic>, |
|
|
|
) as Map<String, dynamic>, |
|
|
|
); |
|
|
|
); |
|
|
|
final prefix = _toDartName(spec.info.title, uppercaseFirstCharacter: true); |
|
|
|
final prefix = _toDartName(spec.info.title, uppercaseFirstCharacter: true); |
|
|
|
if (spec.version != '3.1.0') { |
|
|
|
final supportedVersions = ['3.0.3', '3.1.0']; |
|
|
|
throw Exception('Only OpenAPI 3.1.0 is supported'); |
|
|
|
if (!supportedVersions.contains(spec.version)) { |
|
|
|
|
|
|
|
throw Exception('Only OpenAPI ${supportedVersions.join(', ')} are supported'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
final tags = <Tag?>[ |
|
|
|
final tags = <Tag?>[ |
|
|
|