Skip to content

Commit e326f54

Browse files
authored
chore: rewrite READMEs purpose-first and drop the build script for prepack (#12)
Rewrites every README to open with what the project and each package are for, and lines them up with the orpc README shape: centered title, badge block (codecov, npm downloads, MIT license, Discord, DeepWiki), package table, and a License footer. Also removes the redundant `build` script from the downgrader so `prepack` alone drives publishing, and adds the MIT LICENSE file the packages already declared. ## Docs - Root README explains the project and lists both packages with one-line purposes, replacing a bare "OAS" title over the sponsors list. - Package READMEs lead with the package name and purpose. Downgrader mappings use shorter table cells and bullet lists, and document two behaviors the old text missed: path parameters gain `required: true`, and empty `required` arrays are dropped. - Generated sponsors sections are byte-identical. `sync-sponsors` runs end to end and reports zero changes with the new License section after it. ## Packaging - `pnpm pack` on the downgrader still runs unbuild via `prepack`; nothing in docs or CI referenced `build`. - LICENSE makes the shields license badge resolve. npm download badges read "not found" until first publish. - CodSpeed badge left out: the repo has no benchmarks or CodSpeed project yet. ## Testing - ESLint passes on all READMEs. - README code samples verified: the types example type-checks, the downgrader example produces the documented output.
1 parent e86d61b commit e326f54

6 files changed

Lines changed: 227 additions & 79 deletions

File tree

‎LICENSE‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 MiddleAPI
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md‎

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,38 @@
1-
# OAS
1+
<h1 align="center">OpenAPI Spec</h1>
2+
3+
<div align="center">
4+
<a href="https://codecov.io/gh/middleapi/openapi-spec">
5+
<img alt="codecov" src="https://codecov.io/gh/middleapi/openapi-spec/branch/main/graph/badge.svg">
6+
</a>
7+
<a href="https://www.npmjs.com/package/@openapi-spec/types">
8+
<img alt="weekly downloads" src="https://img.shields.io/npm/dw/%40openapi-spec%2Ftypes?logo=npm" />
9+
</a>
10+
<a href="https://github.com/middleapi/openapi-spec/blob/main/LICENSE">
11+
<img alt="MIT License" src="https://img.shields.io/github/license/middleapi/openapi-spec?logo=open-source-initiative" />
12+
</a>
13+
<a href="https://discord.gg/TXEbwRBvQn">
14+
<img alt="Discord" src="https://img.shields.io/discord/1308966753044398161?color=7389D8&label&logo=discord&logoColor=ffffff" />
15+
</a>
16+
<a href="https://deepwiki.com/middleapi/openapi-spec">
17+
<img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki">
18+
</a>
19+
</div>
20+
21+
TypeScript tooling for the [OpenAPI Specification](https://spec.openapis.org/), maintained by [middleapi](https://github.com/middleapi). It lets you work with OpenAPI 3.0, 3.1, and 3.2 documents from one place: precise types for each version, and converters that move a document from a newer version to an older one without losing anything the older version can still express.
22+
23+
| Package | Description |
24+
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
25+
| [`@openapi-spec/types`](https://github.com/middleapi/openapi-spec/blob/main/packages/types/README.md) | TypeScript types for OpenAPI 3.0, 3.1, and 3.2, with the specification text as JSDoc on every field |
26+
| [`@openapi-spec/downgrader`](https://github.com/middleapi/openapi-spec/blob/main/packages/downgrader/README.md) | Downgrade documents and Schema Objects one minor version at a time: 3.2 to 3.1 and 3.1 to 3.0 |
27+
28+
## Development
29+
30+
```bash
31+
pnpm install
32+
pnpm test
33+
pnpm lint
34+
pnpm type:check
35+
```
236

337
## Sponsors
438

@@ -83,3 +117,7 @@ Like what we build over at [middleapi](https://github.com/middleapi)? You can he
83117
</table>
84118

85119
With thanks to [36 past sponsors](https://htmlpreview.github.io/?https://github.com/middleapi/static/blob/main/sponsors.svg) who helped get openapi-spec here.
120+
121+
## License
122+
123+
Distributed under the MIT License. See [LICENSE](https://github.com/middleapi/openapi-spec/blob/main/LICENSE) for more information.

0 commit comments

Comments
 (0)