# CH Public Data API OpenAPI specification refs refer to localhost

**URL:** <http://forum.companieshouse.gov.uk/t/ch-public-data-api-openapi-specification-refs-refer-to-localhost/4253>\
**Category:** API Issues\
**Created:** [August 10, 2021, 1:01pm UTC](http://forum.companieshouse.gov.uk/t/ch-public-data-api-openapi-specification-refs-refer-to-localhost/4253 "2021-08-10T13:01:46Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![x11](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/x11/32/2149_2.png) [@x11](http://forum.companieshouse.gov.uk/u/x11)\
**Post date:** [July 14, 2026, 12:54pm UTC](http://forum.companieshouse.gov.uk/t/ch-public-data-api-openapi-specification-refs-refer-to-localhost/4253/7 "2026-07-14T12:54:46Z")

</div>

> [@A corrected OpenAPI 3.1 spec for the Public Data API (MIT licensed), plus a generated TypeScript client](https://forum.companieshouse.gov.uk/t/a-corrected-openapi-3-1-spec-for-the-public-data-api-mit-licensed-plus-a-generated-typescript-client/12878):
>
> Like several people here (the localhost $ref threads especially), we hit problems generating a client from the official Swagger 2.0 spec. We ended up with hundreds of lines of repair code fixing recurring classes of defect. Patching the spec forever wasn’t sustainable, so we took a different approach: we now maintain a corrected OpenAPI 3.1 document for the Public Data API, built from the Developer Hub documentation and cross-checked against the API’s actual behaviour. 34 endpoints. To keep it …

---

_[View the full topic](http://forum.companieshouse.gov.uk/t/ch-public-data-api-openapi-specification-refs-refer-to-localhost/4253)._
