# Validating OpenAPI / Swagger on https://docs.discourse.org/openapi.json

**URL:** <https://meta.discourse.org/t/validating-openapi-swagger-on-https-docs-discourse-org-openapi-json/169612>\
**Category:** Bug\
**Tags:** rest-api\
**Created:** [November 9, 2020, 2:47pm UTC](https://meta.discourse.org/t/validating-openapi-swagger-on-https-docs-discourse-org-openapi-json/169612 "2020-11-09T14:47:44Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)\
**Post date:** [November 9, 2020, 10:21pm UTC](https://meta.discourse.org/t/validating-openapi-swagger-on-https-docs-discourse-org-openapi-json/169612/3 "2020-11-09T22:21:24Z")

</div>

Thanks for bringing this up.

> [@guidoleenders](#):
>
> Is there an alternative (validating) swagger definition available?

No, this is the only spec file available.

I did make many change to bring the docs from swagger 2.0 to openapi 3.0 in this commit:

[https://github.com/discourse/discourse\_api\_docs/commit/9d688aaaf2484be7e6fcd139be5da0bef079e103](https://github.com/discourse/discourse_api_docs/commit/9d688aaaf2484be7e6fcd139be5da0bef079e103)

but looks like some things were overlooked or are possibly new changes to the spec.

I just verified again with the [openapi-cli](https://github.com/Redocly/openapi-cli) command line tool to check for errors and I’m able to reproduce similar errors as the swagger site:

```plaintext
blake@pop-os ~/code/discourse_api_docs (master) $ npx @redocly/openapi-cli lint openapi.json
...
❌ Validation failed with 647 errors and 579 warnings.

```

> [@guidoleenders](#):
>
> The following is a suggested patch sofar.

Looks good. If you’d like to [submit a patch](https://github.com/discourse/discourse_api_docs#contributing) with these fixes that would be very welcome, but I can also help clean up some of these.

---

_[View the full topic](https://meta.discourse.org/t/validating-openapi-swagger-on-https-docs-discourse-org-openapi-json/169612)._
