zalando / intellij-swagger

A plugin to help you easily edit Swagger and OpenAPI specification files inside IntelliJ IDEA

Home Page:https://plugins.jetbrains.com/plugin/8347

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Examples are not properly resolved and doesn't show up in hints

danie1k opened this issue · comments

Description

OpenApi/Swagger specs: https://swagger.io/docs/specification/adding-examples/

I've prepared' very simple specs, based on much more complex structure from my current project:

openapi: 3.0.0

info:
  version: development
  title: Hello World

paths:
  /hello_world/:
    get:
      operationId: api.views.hello_world
      responses:
        200:
          description: OK
          content:
            text/plain:
              schema:
                type: string
              example:
                $ref: "#/components/examples/objectExample/value"

components:
  examples:
    objectExample:
      value: world

Actual behaviour

  1. Examples do not resolve usages:
    image
  2. Examples does not show up in $ref hints:
    image
    image

Related issues:

Plugin version:

1.0.27

Related but possibly different issue I'm also having: the plugin seems to think the examples key is not allowed in schema definitions (components/schemas/{schemaName}/examples) but the old example key is allowed.