Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] OpenApi definition not valid #439

Open
pearnaly opened this issue Dec 4, 2023 · 4 comments
Open

[Bug] OpenApi definition not valid #439

pearnaly opened this issue Dec 4, 2023 · 4 comments

Comments

@pearnaly
Copy link

pearnaly commented Dec 4, 2023

The OpenApi definition seems to have several errors

To Reproduce Steps to reproduce the behavior:

  1. Import OpenApi definition from https://developer.sailpoint.com/iiq/api/identityiq-scim-rest-api/ in Postman. You can review this ticket directly in the OpenApi file, but Postman is much easier. (Of course set-up the BasicAuth ahd baseUrl variables)

1.1. Try the GET LaunchedWorkflow endpoint (GET {{baseUrl}}/LaunchedWorkflow).
1.2. You get a 404 error. It's because the correct endpoint is {{baseUrl}}/LaunchedWorkflows with an "s" at the end

2.1 Try the POST LaunchedWorkflows endpoint. You have to edit the following provided template with your own data.

{
  "schemas": [
    {
      "example": [
        "urn:ietf:params:scim:schemas:sailpoint:1.0:LaunchedWorkflow",
        "urn:ietf:params:scim:schemas:sailpoint:1.0:TaskResult"
      ]
    },
    {
      "example": [
        "urn:ietf:params:scim:schemas:sailpoint:1.0:LaunchedWorkflow",
        "urn:ietf:params:scim:schemas:sailpoint:1.0:TaskResult"
      ]
    }
  ],
  "workflowName": "<string>",
  "input": [
    {
      "key": "<string>",
      "value": "<string>",
      "type": "<string>"
    },
    {
      "key": "<string>",
      "value": "<string>",
      "type": "<string>"
    }
  ]
}

2.2. You get a 404 error "Resource Workflow null not found.". it is because the correct template would be:

{
  "schemas": [
    "urn:ietf:params:scim:schemas:sailpoint:1.0:LaunchedWorkflow",
    "urn:ietf:params:scim:schemas:sailpoint:1.0:TaskResult"
  ],
  "urn:ietf:params:scim:schemas:sailpoint:1.0:LaunchedWorkflow": {
    "workflowName": "<string>",
    "input": [
      {
        "value": "<string>",
        "key": "<string>",
        "type": "<string>"
      },
      {
        "value": "<string>",
        "key": "<string>",
        "type": "<string>"
      }
    ]
  }
}

i.e. schemas as a list and not list of list and "urn:ietf:params:scim:schemas:sailpoint:1.0:LaunchedWorkflow" wrapping level for the data.

2.3. Please note that I can live with a wrong template since I can replace it easilly. The problem is that the structural definition of the OpenApi file is also wrong and I cannot generate a correct client with OpenApiGenerator.

Operating System (please complete the following information):

  • OS: Windows 10
  • CLI Environment: Postman
  • PoenApi Version: 8.3

Thank you!

@pearnaly
Copy link
Author

pearnaly commented Dec 4, 2023

aaaand i'm sorry it seems to be at least partially a duplicate of #429

@pearnaly
Copy link
Author

pearnaly commented Dec 4, 2023

Here is my change:

    post:
      ...
      requestBody:
        required: true
        content:
          application/scim+json:
            schema:
              properties:
                schemas:
                  type: array
                  description: Schemas related to Launched Workflows.
                  items:
                    type: string
                  example:
                    - 'urn:ietf:params:scim:schemas:sailpoint:1.0:LaunchedWorkflow'
                    - 'urn:ietf:params:scim:schemas:sailpoint:1.0:TaskResult'
                urn:ietf:params:scim:schemas:sailpoint:1.0:LaunchedWorkflow:
                  type: object
                  properties:
                    workflowName:
                      type: string
                      description: Name of the Workflow to launch.
                      example: LCM Manage Passwords
                    input:
                    ...

@pearnaly
Copy link
Author

pearnaly commented Dec 7, 2023

ok it goes on... with other errors:

  • it is "pendingSignoffs" with lowercase "o"
  • meta is not an array
  • is is "attributes" with lowercase "a"
  • "attributes" is an array

@pearnaly
Copy link
Author

Please another point:
The body return type of the 3 LaunchedWorkflow endpoints (get one, embedded object of get list, post one) should be exactly equal and point to a single object definition in the yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant