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

turn off json request examples, or customize them? URGENT #157

Closed
andrewjtech123 opened this issue Dec 7, 2016 · 7 comments
Closed

turn off json request examples, or customize them? URGENT #157

andrewjtech123 opened this issue Dec 7, 2016 · 7 comments
Labels

Comments

@andrewjtech123
Copy link

Is there a way we can stop the json request examples from outputting. They are incorrect (do not include root object) so people using our API are using these examples and getting 404s.

@RomanHotsiy
Copy link
Member

If you don't use code samples in your documentation you can hide them with css.
In the other case, there is no way to turn off samples at the moment.

@andrewjtech123
Copy link
Author

we are using curl and ruby examples so this wont work for us.

@RomanHotsiy
Copy link
Member

you can add example to the request body param json-schema.
It will be used by ReDoc

@RomanHotsiy
Copy link
Member

RomanHotsiy commented Dec 7, 2016

Let me know if you need assistance or example

@andrewjtech123
Copy link
Author

could you provide an example of where i need to put this?

 tags:
        - Create
      parameters:
        - name: draft_order
          in: body
          description: |
            draft_order to create.
             | `Note`| JSON Request sample in right panel must also include the root draft order element.  |
            |---|-------------|
          schema:
            allOf:
              - $ref: '#/definitions/customerDraftOrder'
            required:
              - line_items
              ```
              

@RomanHotsiy
Copy link
Member

tags:
  - Create
parameters:
  - name: draft_order
     in: body
     description: |
            draft_order to create.
             | `Note`| JSON Request sample in right panel must also include the root draft order element.  |
            |---|-------------|
     schema:
        allOf:
          - $ref: '#/definitions/customerDraftOrder'
        required:
           - line_items
        example: 
          draft_orders:
            prop1: something
            .....

@andrewjtech123
Copy link
Author

it works ! thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants