Impact 2024: The Industrial Data and AI Conference for and by Users | Nominate Speakers Now for a Ch...
Trying to download the openapi spec over at https://api-docs.cognite.com/20230101/ by using the URL in the “download” link fails with 404 when trying to use the URL with wget/curl and “ADD” in a dockerfile. It seems like the link is generated behind the scenes during pageload by javascript. Is there a way to download the openapi spec in scripts e.g for use in CI pipelines and similar?
I am unable to generate client code for the CDF openapi spec at https://api-docs.cognite.com/20230101/ using deepmap/oapi-codegen for Go, seemingly because the spec contains some errors. Do anyone know of a way to generate an api-client in go for the CDF-api spec? Both commands below rely on having openapi spec downloaded to the current directory from https://api-docs.cognite.com/20230101/ Testing the spec for errors with redocly/cli: docker run --rm -it -v $PWD/swagger.json:/swagger.json redocly/cli lint /swagger.jsonFor me this results in “Validation failed with 25 errors and 382 warnings” Generating the client library using deepmap/oapi-codegen: go run github.com/deepmap/oapi-codegen/v2/cmd/oapi-codegen@v2.0.0 --config oapi-codegen-config.yaml swagger.jsonwith the this config file:package: "cdf_api"output: "cdf_api.gen.go"generate: models: true client: truecompatibility: circular-reference-limit: 100For me this results in the message “error generating code: error creating operat
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.