oliyh / pedestal-api

Easily build APIs in Pedestal using Schema and Swagger
MIT License
110 stars 13 forks source link

can we add description to parameters? #21

Closed EMayej closed 6 years ago

oliyh commented 6 years ago

Hi @EMayej,

Yes, you can - you can add metadata to your schemas as follows:

{:parameters
  {:query-params 
    {:page-size (with-meta s/Int
                           {:json-schema
                              {:description "Use this to limit the number of records returned by the query"}})}}}

You can add other elements from the Swagger description into :json-schema as well, they get merged with the auto-generated description.

Hope this helps

EMayej commented 6 years ago

it works. thank you.