OpenAPIParameter.path constructor
OpenAPIParameter.path(
- String name, {
- OpenAPISchema? schema,
- Map<
String, OpenAPIMediaType> ? content, - String? description,
- String? style,
- Map<
String, Object?> ? extensions,
Creates a path parameter.
Implementation
factory OpenAPIParameter.path(
String name, {
OpenAPISchema? schema,
Map<String, OpenAPIMediaType>? content,
String? description,
String? style,
Map<String, Object?>? extensions,
}) {
validateSchemaOrContent(
schema: schema,
content: content,
scope: 'OpenAPIParameter.path',
);
return OpenAPIParameter._({
'name': name,
'in': 'path',
'required': true,
'schema': ?schema,
'content': ?content,
'description': ?description,
'style': ?style,
...?prefixExtensions(extensions),
});
}