SecurityScheme.fromJson constructor

SecurityScheme.fromJson(
  1. Map<String, dynamic> json
)

Creates a SecurityScheme from a JSON object.

Implementation

factory SecurityScheme.fromJson(Map<String, dynamic> json) {
  final extensions = <String, dynamic>{};
  json.forEach((key, value) {
    if (key.startsWith('x-')) {
      extensions[key] = value;
    }
  });

  return _$SecuritySchemeFromJson(json).copyWith(extensions: extensions);
}