Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recursive expansion doesn't seem to work #1725

Closed
iambingoNJU opened this issue Mar 27, 2018 · 2 comments
Closed

recursive expansion doesn't seem to work #1725

iambingoNJU opened this issue Mar 27, 2018 · 2 comments

Comments

@iambingoNJU
Copy link

I want to define a tree structure in swagger. Here is the main definitions:

openapi: '3.0.0'
info:
  version: 1.0.0
  title: xxx
servers:
  - url: http://localhost:80/ddddd

paths:
  /catalog/{catalogId}/advanced-search:
    post:
      summary: Advanced search a catalog.
      parameters:
        - $ref: '#/components/parameters/catalogId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdvancedSearchOption'
      responses:
        '200':
          description: OK
        '500':
          description: NOT FOUND

components:
  parameters:
    catalogId:
      name: catalogId
      in: path
      description: catalog ID
      required: true
      schema:
        type: string

  schemas:
    AdvancedFtsQuery:
      type: object
      properties:
        Operator:
          type: string
        LeftOperand:
          $ref: '#/components/schemas/FtsQuery'
        RightOperand:
          $ref: '#/components/schemas/FtsQuery'
    FtsQuery:
      type: object
      properties:
        AdvancedQuery:
          $ref: '#/components/schemas/AdvancedFtsQuery'
    AdvancedSearchOption:
      type: object
      properties:
        Query:
          $ref: '#/components/schemas/FtsQuery'

And the screenshot:
capture

The result is that when I expand the LeftOperand and the RightOperand, it's just empty. If it can't expand recursively, it should at least give a type hint.

environment: Windows 10, Chrome 65.0.3325.181, Swagger Editor online.

Could anybody help?

@hkosova
Copy link
Contributor

hkosova commented Mar 27, 2018

This looks related to (or duplicate of) swagger-api/swagger-ui#3325.

@iambingoNJU
Copy link
Author

Thanks! Sorry for my mispost.

@webron webron closed this as completed Apr 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants