42Crunch / intellij-openapi-editor

OpenAPI (Swagger) Editor plugin for IntelliJ
10 stars 0 forks source link

External file references do not work #4

Open pmarcovici opened 3 years ago

pmarcovici commented 3 years ago

PSA sample files. Archive.zip

ak1394 commented 3 years ago

Thanks a lot!

ak1394 commented 3 years ago

We do indeed have an issue handling paths quoted with single quotes, we'll fix this in the next release. In the meantime you could use unquoted paths or paths quoted with double quotes, for example:

  - $ref: components.yaml#/components/parameters/include
  - $ref: "components.yaml#/components/parameters/include"
marden commented 3 years ago

Ran into a problem with ref too.

I have 2 files:

index.yaml

openapi: 3.0.2
info:
  version: 1.0.0
  title: API
servers:
  - url: 'https://server.org/api/'
    description: Production server
paths:
  /v1/abtest:
    $ref: ./paths/v1/abtest.yaml

paths/v1/abtest.yaml

get:
  summary: 
 ....

Swagger successfully renders, also IDE can easily go to the definition via right-click on the ref in the index.yaml. But the plugin doesn't show any operations from abtest.yaml. Screenshot from 2021-02-15 17-30-43

evll commented 3 years ago

But the plugin doesn't show any operations from abtest.yaml.

I think this is a different issue, could you open it separately? Also, related to that - autocompletion does not work in referenced files either. Basically they are not detected as a part of the specs.