OpenAPIParameter.path constructor

OpenAPIParameter.path(
  1. String name, {
  2. OpenAPISchema? schema,
  3. Map<String, OpenAPIMediaType>? content,
  4. String? description,
  5. String? style,
  6. 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),
  });
}