A simple usage example:
import 'package:openapi_parser_builder/builder.dart';
main() {
var awesome = new Awesome();
}For faster iterations, we save the html string generated when running the builder. If the markdown changes, a new html string should be saved for the tests.
- a quick way to do this is to change the
client_builder.dartto usehtmlin place ofcombinedOutputinbuildStep.writeAsString, then copy the html fromschema_classes.darttotest/data/openapi_spec_html.dart.
Each data cleaning listed below was committed separately, with a commit message of the form: 'Data clean: -subheading-' (referring to the subheadings below)
I made some assumptions about the contents of OpenAPI-Specification-3.0.1
eg. items in tables are always separated with ' | '
I had to edit the md file to make this true.
- added spaces to items in 'OAuth Flows Object' table
When the markdown is converted to html, the /| separator (used to indicate union types) becomes just '|' nd is thus indistinguidable from the table separator in the markdown ('|' in markdown which also becomes '|' in the html).
- 'summary' member of Path Item Object
- 'securitySchemes' member of Components Object