Uploaded image for project: 'FlightPath'
  1. FlightPath
  2. FLPATH-260

Notification GET response does not conform swagger

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • v1.0.10
    • None
    • parodos-backend
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      Recent GET /api/v1/notification result:

       
      {
      "_embedded" : {
      "notificationrecords" : [

      { "id" : "28be8050-690a-4f25-9a78-bc6723894123", "subject" : "My subject3 ", "createdOn" : "2023-03-29T10:28:02.397327Z", "messageType" : "My type3", "body" : "My body3", "fromuser" : "dev", "read" : false, "tags" : [ ] }

      , {
      "id" : "ab89451f-b6cc-4b4f-a24f-dd5b4cbf0f42",
      "subject" : "My subject2 ",
      "createdOn" : "2023-03-29T10:27:54.353982Z",
      "messageType" : "My type2",
      "body" : "My body2",
      "fromuser" : "dev",
      "read" : false,
      "tags" : [ ]
      }, {
      "id" : "72821ba4-8e20-4740-b9fa-d595bfa17ae5",
      "subject" : "My subject",
      "createdOn" : "2023-03-29T10:27:38.896264Z",
      "messageType" : "My type",
      "body" : "My body",
      "fromuser" : "dev",
      "read" : false,
      "tags" : [ ]
      } ]
      },
      "_links" : {
      "self" :

      { "href" : " [http://localhost:8081/api/v1/notifications?page=0&size=10&sort=NotificationMessage_createdOn,desc] " }

      },
      "page" : {
      "size" : 10,
      "totalElements" : 3,
      "totalPages" : 1,
      "number" : 0
      }
      }

      Structure expectated by swagger:

      { "links": [ \{ "rel": "string", "href": "string", "hreflang": "string", "media": "string", "title": "string", "type": "string", "deprecation": "string", "profile": "string", "name": "string" }

      ],
      "content": [
      {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "subject": "string",
      "createdOn": "2023-03-29T11:43:01.205Z",
      "messageType": "string",
      "body": "string",
      "fromuser": "string",
      "read": true,
      "tags": [
      "string"
      ],
      "folder": "string",
      "links": [

      { "rel": "string", "href": "string", "hreflang": "string", "media": "string", "title": "string", "type": "string", "deprecation": "string", "profile": "string", "name": "string" }

      ]
      }
      ],
      "page": {
      "size": 0,
      "totalElements": 0,
      "totalPages": 0,
      "number": 0
      }
      }

      Please mind "content" and "_embedded".

            rh-ee-nargaman Nir Argaman
            mlibra@redhat.com Marek Libra
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: