Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Multiple examples under example #165

Closed
mcupak opened this issue Apr 24, 2018 · 6 comments
Closed

Multiple examples under example #165

mcupak opened this issue Apr 24, 2018 · 6 comments
Assignees
Labels
Milestone

Comments

@mcupak
Copy link
Contributor

mcupak commented Apr 24, 2018

For some properties, there are multiple examples under a single example field, which is misleading. examples should be used instead.

@mcupak
Copy link
Contributor Author

mcupak commented Jun 19, 2018

I'm reopening this issue as this wasn't solved correctly in #189. Examples should be listed separately, not as a string containing "or". Such a string is still just a single example.

@mcupak mcupak reopened this Jun 19, 2018
@mcupak
Copy link
Contributor Author

mcupak commented Jun 19, 2018

To clarify, it should look like this:

examples:
  foobar:
    value:
      id: foo
      name: bar

@mcupak
Copy link
Contributor Author

mcupak commented Jun 19, 2018

This is actually a blocker for the release - the current content is not valid and breaks the build.

@sdelatorrep
Copy link
Contributor

sdelatorrep commented Jun 20, 2018

As noted by @juhtornr , examplescannot be used for schemas and properties (see here). So, we can fix the examples provided in the variantType parameter (see here) but the others cases (e.g. this one) will remain as they are (example with multiple examples specified in the string).

@juhtornr juhtornr modified the milestones: 0.4.1, 0.4.3 Jul 3, 2018
@sdelatorrep sdelatorrep self-assigned this Jul 5, 2018
@sdelatorrep
Copy link
Contributor

sdelatorrep commented Jul 5, 2018

Hi guys,
It seems that swagger-ui cannot render examples yet (see this). I suggest keeping the "Examples" within the description string so they can still be seen in the UI.

        - name: variantType
          description: |
            The `variantType` is used to denote e.g. structural variants. 
            
            Examples:
            * DUP: duplication of sequence following `start`; not necessarily in
            situ
            * DEL: deletion of sequence following `start`
            
            Optional: either `alternateBases` or `variantType` is required.
          in: query
          required: false
          schema:
            type: string
          examples:
            dup:
              value: DUP
              summary: duplication of sequence following `start`; not necessarily in
            del:
              value: DEL
              summary: deletion of sequence following `start`

WDYT?

@mbaudis
Copy link
Member

mbaudis commented Jul 5, 2018

@sdelatorrep +1 for keeping it in description (if this works in general).

sdelatorrep added a commit to sdelatorrep/beacon-team that referenced this issue Jul 30, 2018
juhtornr added a commit that referenced this issue Aug 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants