Skip to content

`examples` not working for query parameter

the following schema should generate correct examples in the json

{
      schema: {
        summary: 'my method',
        querystring: {
          type: 'object',
          properties: {
            include: {
              type: 'string',
              description:
                'something to include',
              examples: [
                {
                  name: 'sample 1',
                  summary: 'the first sample',
                  value: 'sample1',
                },
                {
                  name: 'sample 2',
                  summary: 'the second sample',
                  value: 'sample2',
                },
              ],
            },
        },
      },

however currently this is produced:

          {
            "name": "include",
            "in": "query",
            "description": "something to include",
            "schema": {
              "type": "string",
              "description": "something to include",
              "examples": [
                {},
                {}
              ]
            }
          },
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information