OpenAPILicense constructor

OpenAPILicense({
  1. required String name,
  2. String? identifier,
  3. String? url,
  4. Map<String, Object?>? extensions,
})

Creates an OpenAPI license object.

Implementation

factory OpenAPILicense({
  required String name,
  String? identifier,
  String? url,
  Map<String, Object?>? extensions,
}) {
  _validateExclusiveFields(
    identifier: identifier,
    url: url,
    scope: 'OpenAPILicense',
  );
  return OpenAPILicense._({
    'name': name,
    'identifier': ?identifier,
    'url': ?url,
    ...?prefixExtensions(extensions),
  });
}