eclipse / microprofile-starter

MicroProfile project generator source code
Apache License 2.0
74 stars 51 forks source link

fix the app and remove the warning #414

Closed Emily-Jiang closed 3 years ago

Emily-Jiang commented 3 years ago

Signed-off-by: Emily Jiang emijiang6@googlemail.com Fixes: #413

rdebusscher commented 3 years ago
openAPI compare
Emily-Jiang commented 3 years ago

@rdebusscher I did test against Open Liberty. Prior to the change, I did not see the referenced schema.

paths:
  /data/booking/{bookingId}:
    get:
      operationId: getBooking
      parameters:
      - name: bookingId
        in: path
        required: true
        style: simple
        schema:
          type: string
      responses:
        "200":
          description: Booking for id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Booking'
        "404":
          description: No booking found for the id.

I then tested payara micro before my change (out of box) on MP 3.3 as MP 4.0 is not working (start.microprofile.io). I got the following:

paths:
  /data/booking/{bookingId}:
    get:
      operationId: getBooking
      parameters:
      - name: bookingId
        in: path
        required: true
        style: simple
        schema:
          type: string
      responses:
        "200":
          description: Booking for id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Booking'
        "404":
          description: No booking found for the id.
rdebusscher commented 3 years ago

See #416

Emily-Jiang commented 3 years ago

I've tested against the runtimes Payara, Wildfly and they are ok. The change demonstrates the usage based on the mp openapi spec.