OpenAPI Validation Errors

I have been hand writing a powershell module by hand for all of the available Sailpoint API endpoints for our internal use. I think i’ve finished like 50 so far, with many many to go.

While working on this I stumbled across a tool called AutoRest ( autorest.powershell/readme.md at main · Azure/autorest.powershell · GitHub ). After getting it installed and setup I have been trying to run it against your OpenAPI doc and getting all kinds of errors:

Error: Invalid Reference ~1search -- #/paths/~1search/post/parameters/1

I tried dereferencing the file to avoid these issues in specific, but now i am running into:

error   | PreCheck/PropertyRedeclaration | Schema 'IdentityDocument' has a property 'displayName' that is conflicting with a property in the parent schema 'components·1on98e3·schemas·identitydocument·allof·0·allof·1' differs more than just description : [example => '<removed>']

I found this thread that talks about your OpenAPI being broken out into multiple files OpenAPI Spec 3.0 Validation Errors. I am assuming this is why i am running into so many issues.

Is there anyway to get a fully single file export of your OpenAPI spec?

Hi Brian,

You might want to check out the PowerShell client library created by @darrenjrobinson . It is manually built, but very well done.

In regards to the errors you are seeing. This is a problem I have run into as well when trying to use the OpenAPI generator tool on our specs. What tool are you using to de-reference the spec?

I honestly can’t recall which tool I used to deference, something random online during my wild flailing :slight_smile:

What I ended up doing was actually importing/exporting your Postman Collection to file. Then I used postman-to-openapi | 🛸 Convert postman collection to OpenAPI to convert that to an OpenAPI spec file. It had a single issue in it that was easy to fix (a random 401 was missing its application/json content-type). At that point I was able to ingest the file into AutoRest. Figured with Postman you cant really have hidden backend references.

Sadly the way that AutoRest created the modules it came out reeeeaaaaallllllllll funky, but I haven’t had time to play with it and see what I messed up. I also found another generator (GitHub - OpenAPITools/openapi-generator: OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)) I will give a go when time permits.

I have seen GitHub - darrenjrobinson/powershell_module_identitynow: SailPoint IdentityNow PowerShell Module and it is pretty great. It does seem like it might be abandoned though as the most recent update was last year? Also some of the update/set/new cmdlets require you to have vast amounts of understanding/data prepping to leverage them, which to me feels like it defeats the whole value/purpose a bit, for instance: GitHub - darrenjrobinson/powershell_module_identitynow: SailPoint IdentityNow PowerShell Module

My dream is to make some of these functions more… accessible by allow for a raw json input like that, but also have all the parameters needed to assisted the user a bit in creating it with no lead up data formatting, etc knowledge. Tall order, but I’d love to try.