PathItem.fromJson constructor

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

Creates a PathItem from a JSON object.

Implementation

factory PathItem.fromJson(Map<String, dynamic> json) {
  final extensions = <String, dynamic>{};
  json.forEach((key, value) {
    if (key.startsWith('x-')) {
      extensions[key] = value;
    }
  });
  return _$PathItemFromJson(json).copyWith(extensions: extensions);
}