Swagger schema - anyone done this? non progress question - Forum - Community Groups - Progress Community

Swagger schema - anyone done this? non progress question

 Forum

Swagger schema - anyone done this? non progress question

  • In swagger I can add a schema by doing this:

    responses:
    200:
    description: "successful operation"
    schema:
    type: array
    items:
    $ref: '#/definitions/Organization'

    That will give me the following:

    [
      {
        "ClientNo": 0,
        "ClientID": "string",
        "Name": "string",
        "Address": "string",
        "PostOffice": "string",
        "Logo": "string",
        "InvoiceNo": 0,
    :
    :

    But if I want to add {"Organizations": in front of it, how can I do that?

    {"Organizations":[
      {
        "ClientNo": 0,
        "ClientID": "string",
        "Name": "string",
        "Address": "string",
        "PostOffice": "string",
        "Logo": "string",
        "InvoiceNo": 0,
    :
    :



  • I changed it so that I only return an array.

  • Will
    type: object
    work?
     
    You'll probably also need to change what $ref looks like.