parseJson static method
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>);
}