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?
Solved
Download openapi spec in CI
Best answer by kelvin
Hello! As we are continuously updating our API, relying on the live spec will potentially break things without any obvious reason (we see that parsers of openapi spec are behaving in very different ways). You should rather download it once, check it in, and keep it as part of the controlled environment (i.e. in git) 😊
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.