parseJson static method

OpenAPI parseJson(
  1. String content
)

Parses a JSON OpenAPI spec from a string. Throws FormatException if the content is not valid JSON.

Implementation

static OpenAPI parseJson(String content) {
  return OpenAPI.fromJson(json.decode(content) as Map<String, dynamic>);
}