KaiZen-OpenAPI-Editor icon indicating copy to clipboard operation
KaiZen-OpenAPI-Editor copied to clipboard

Extend code assist on $ref values to propose objects from all JSON or YAML files

Open tedepstein opened this issue 6 years ago • 0 comments

Extracted from #488. While editing an OpenAPI 2.0 (Swagger) or 3.0 file, extend the proposal list on $ref values to include valid objects from any JSON or YAML file in a designated scope, not just the reusable objects defined in OpenAPI files.

There are many design aspects to consider in a feature like this:

  • Built-in scopes: document, project, workspace
  • User-defined scopes:
    • path in the local filesystem
    • HTTP-accessible file collections (e.g. GitHub project, WebDAV)
  • How to locate recognizable objects within a file
    • root object only
    • common locations, e.g. /definitions
    • user-configurable JSON Pointer or JMESPath
      • Global: JSON Pointer or JMESPath, applies to all JSON or YAML files
      • File type-specific: JSON Pointer or JMESPath, applies to JSON or YAML files of a specific subtype, with criteria to recognize files of that subtype.
  • Scope cycling
    • Include with existing project and workspace scopes
    • Add new scopes
    • Make scope cycling user-configurable

tedepstein avatar Apr 06 '19 10:04 tedepstein