Skip to content

Draft: Simplify the OpenAPI parser

Erwan Rouchet requested to merge simplify-parser into master

Requires !248 (merged), closes #42

  • Removes many parts of the OpenAPI schema that were being parsed but not used in the client, such as license info, contact info, server variables, responses, examples, etc.
  • Removes the entire concepts of "sections"; those were grouping links (endpoints) by tag. We do not care about tags in the client, as we refer to everything through an operation ID, so this simplifies the schema parsing as well as looking up endpoints by operation ID, and reduces the memory footprint.
  • Bumps typesystem to 0.3.0, which provides its own JSON Schema support, removing an entire module from our client.

TODO

  • Use typesytem 0.3.0 to the fullest
    • Replace Object with Schema whenever possible
    • See what the improved error handling can do
    • See if we can validate request bodies using the parsed schema
  • typesystem 0.3.1
    • Replace URL strings with URLField
  • Bump to typesystem 0.4.1 — probably has no impact.
Edited by Erwan Rouchet

Merge request reports

Loading