syndesisio / syndesis

A flexible, customizable, open source platform that provides core integration capabilities as a service.
https://syndesis.io/
Apache License 2.0
592 stars 205 forks source link

Valid OpenAPI spec not parsed correctly when creating an API Connector #9860

Open dannybaggett opened 2 years ago

dannybaggett commented 2 years ago

This is a...


[ ] Feature request
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x] Bug report  
[ ] Documentation issue or request

The problem

I have syndesis (1.13.2) running on locally via CRC. When I attempt to create an API Connector given a valid OpenAPI spec, it appears the UI is unable to parse the contents correctly. I get no operations listed and when I attempt to continue (click next button), I get a blank screen.

Expected behavior

Correctly list operations.

Screenshot

Main issue:

Screen Shot 2022-01-14 at 1 52 04 PM

Secondary problem (not sure if related to the first)

Screen Shot 2022-01-14 at 1 52 19 PM

Request and Response Data

API Endpoints and Schemas

Tasks involved / Steps to Reproduce

  1. Click Customizations -> API Client Connectors on left nav
  2. Click Create API Connector
  3. Upload a valid OpenAPI spec file
  4. Click Next
dannybaggett commented 2 years ago

Here's a copy of the specification:

openapi: 3.0.2
info:
    title: New API
    version: 1.0.0
    description: Product System API
paths:
    /products:
        summary: Products
        description: Product Collection
        get:
            responses:
                '200':
                    $ref: '#/components/responses/ProductCollection'
            operationId: all-products
            summary: Product Collection
            description: Retrieve Product Collection
components:
    schemas:
        Product:
            title: Root Type for Product
            description: Product Resource
            required:
                - description
                - id
            type: object
            properties:
                id:
                    description: Product id
                    type: string
                name:
                    description: Product name
                    type: string
                description:
                    description: Product description
                    type: string
                isPublic:
                    format: int32
                    description: Flag to determine whether this is public
                    type: integer
            example:
                id: ajjkas-232n-asdnkkl-2223
                name: Product 1
                description: Product No. 1
                isPublic: 1
    responses:
        ProductCollection:
            content:
                application/json:
                    schema:
                        type: array
                        items:
                            $ref: '#/components/schemas/Product'
                    examples:
                        Product Collection:
                            value:
                                -
                                    id: 1231-2sdf-2esdvwe-fdger345
                                    name: Some Product
                                    description: This is some product
                                    isPublic: 1
                                -
                                    id: scwd2-2sdf-3e2wcd-23rcdw
                                    name: Another Product
                                    description: This is another product
            description: Product Collection Resource
zregvart commented 2 years ago

Thanks for reporting this and providing the steps to reproduce with the OpenAPI document. I'm unable to reproduce this with 1.13.2 (3a4b315ba968e2e4a7ca511249b3b867f6a97d47), for me the custom API client connector is created without an issue. Can you check the syndesis-server-* pod logs and the Network tab in the developer tools of your browser to see if there are any errors reported there?