It seems that MC APIs use swagger.
I was able to locate the swagger.json config file at ``/MobiControl/api/swagger/v2/swagger.json`` however I'm struggling to compile the client libraries for Kotlin.
I'm using:
swagger-codegen generate -l kotlin-client -v -i swagger.json --api-package dev.antoniocalabrese.mobicontrol.api --model-package dev.antoniocalabrese.mobicontrol.data
Also tried:
openapi-generator generate -i ./swagger.json -g kotlin
With the second command I get some errors with the config validation:
org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
| Error count: 3, Warning count: 297
Errors:
-attribute paths.'/devices/{deviceId}/profiles/{profileId}/actions'(post).[action].x-enumType is unexpected
-attribute paths.'/security/currentUser/eulaStatus'(put).[eulaStatus].x-enumType is unexpected
-attribute paths.'/devicegroups/{path}/icon'(put).[newIcon].x-enumType is unexpected
The first command executes but then gradle fails to build the library.
Has anyone ever successfully tried to do something similar?