Skip to content

Commit 186a354

Browse files
committed
chore(readme): remove HTML and quick access links
except for star history chart
1 parent 52bb35b commit 186a354

File tree

1 file changed

+15
-52
lines changed

1 file changed

+15
-52
lines changed

README.md

Lines changed: 15 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,18 @@
1-
<h1 align="center">
2-
<br>
3-
API Doc Parser
4-
</h1>
5-
6-
<p align="center">
7-
<b>
8-
Effortlessly turn Hydra, Swagger/OpenAPI, and GraphQL specs into actionable data for your tools and apps.
9-
</b>
10-
</p>
11-
12-
<p align="center">
13-
<a href="https://github.com/api-platform/api-doc-parser/actions/workflows/ci.yml">
14-
<img src="https://github.com/api-platform/api-doc-parser/actions/workflows/ci.yml/badge.svg" alt="CI">
15-
</a>
16-
<a href="https://github.com/api-platform/api-doc-parser/blob/main/LICENSE">
17-
<img src="https://img.shields.io/github/license/api-platform/api-doc-parser" alt="GitHub License">
18-
</a>
19-
<a href="https://bundlephobia.com/package/@api-platform/api-doc-parser">
20-
<img src="https://img.shields.io/bundlephobia/minzip/@api-platform/api-doc-parser" alt="npm bundle size">
21-
</a>
22-
<a href="https://badge.fury.io/js/%40api-platform%2Fapi-doc-parser">
23-
<img src="https://badge.fury.io/js/%40api-platform%2Fapi-doc-parser.svg" alt="npm version">
24-
</a>
25-
<a href="https://img.shields.io/npm/dw/%40api-platform%2Fapi-doc-parser">
26-
<img src="https://img.shields.io/npm/dw/%40api-platform%2Fapi-doc-parser" alt="NPM Downloads">
27-
</a>
28-
</p>
29-
30-
<p align="center">
31-
<a href="#installation">Installation</a> •
32-
<a href="#usage">Usage</a> •
33-
<a href="#type-definitions">Type definitions</a> •
34-
<a href="#contributing">Contributing</a> •
35-
<a href="#credits">Credits</a> •
36-
<a href="#license">License</a>
37-
</p>
1+
# API Doc Parser
2+
3+
**Effortlessly turn Hydra, Swagger/OpenAPI, and GraphQL specs into actionable data for your tools and apps.**
4+
5+
[![CI](https://github.com/api-platform/api-doc-parser/actions/workflows/ci.yml/badge.svg)](https://github.com/api-platform/api-doc-parser/actions/workflows/ci.yml)
6+
[![GitHub License](https://img.shields.io/github/license/api-platform/api-doc-parser)](https://github.com/api-platform/api-doc-parser/blob/main/LICENSE)
7+
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/@api-platform/api-doc-parser)](https://bundlephobia.com/package/@api-platform/api-doc-parser)
8+
[![npm version](https://badge.fury.io/js/%40api-platform%2Fapi-doc-parser.svg)](https://badge.fury.io/js/%40api-platform%2Fapi-doc-parser)
9+
[![NPM Downloads](https://img.shields.io/npm/dw/%40api-platform%2Fapi-doc-parser)](https://img.shields.io/npm/dw/%40api-platform%2Fapi-doc-parser)
3810

3911
---
4012

41-
<br>
42-
<p align="center">
43-
<code>api-doc-parser</code> is a standalone TypeScript library that parses
44-
<a href="https://www.hydra-cg.com/">Hydra</a>,
45-
<a href="https://swagger.io/specification/v2/">Swagger</a>,
46-
<a href="https://github.com/OAI/OpenAPI-Specification#the-openapi-specification">OpenAPI</a>,
47-
and <a href="https://graphql.org/">GraphQL</a> documentation into a unified, intermediate representation.<br>
48-
This normalized structure enables smart API clients, code generators, admin interfaces, and more.<br>
49-
It integrates seamlessly with the <a href="https://api-platform.com/">API Platform</a> framework.
50-
</p>
13+
**`api-doc-parser` is a standalone TypeScript library that parses [Hydra](https://www.hydra-cg.com/), [Swagger](https://swagger.io/specification/v2/), [OpenAPI](https://github.com/OAI/OpenAPI-Specification#the-openapi-specification), and [GraphQL](https://graphql.org/) documentation into a unified, intermediate representation.**
14+
This normalized structure enables smart API clients, code generators, admin interfaces, and more.
15+
It integrates seamlessly with the [API Platform](https://api-platform.com/) framework.
5116

5217
## ✨ Key Features
5318

@@ -117,7 +82,7 @@ parseGraphQl("https://demo.api-platform.com/graphql").then(({ api }) =>
11782
);
11883
```
11984

120-
## <img src="https://www.typescriptlang.org/icons/icon-48x48.png" alt="TypeScript" width="24" height="24" style="vertical-align:top; padding-right:4px;" /> Type definitions
85+
## ![TypeScript](https://api.iconify.design/vscode-icons:file-type-typescript-official.svg?color=%23888888&wdith=26&height=26) Type definitions
12186

12287
Each parse function returns a Promise that resolves to an object containing the normalized API structure, the raw documentation, and the HTTP status code:
12388

@@ -298,7 +263,7 @@ If a rule is not met, the resource concerned is silently skipped.
298263
| **Schema discovery** | **GET** → first searches `responses → 200 → content → application/json`; if missing, falls back to `components` (component name must be singular, e.g. `Book`).<br/>**PUT/PATCH** → only `requestBody → content → application/json` is considered.<br/>If both GET & PUT/PATCH schemas exist, their fields are **merged**. |
299264
| **Collection paths** | A create (`POST`) or list (`GET`) endpoint **must** be plural:<br/>`/books`. |
300265
| **Deletion path** | `DELETE` must live under the single-item GET path (`/books/{id}`). |
301-
| **Relations & Embeddeds** | Links between resources are inferred from property names and their JSON schema:<br/>• **Plural object/array properties** (e.g. `reviews`, `authors`) become **embedded** resources when their item schema matches an existing resource (`Review`, `Author`).<br/>• **ID-like properties** (e.g. `review_id`, `reviewId`, `review_ids`, `reviewIds`, `authorId`) are treated as **references** to that resource.<br/>• Matching algorithm: `camelize` → strip trailing `Id`/`Ids``classify` (singular PascalCase) → exact compare with resource titles. This effectively handles both plural and ID variants, regardless of original casing.<br/>• As a result, fields such as **`reviews`** (object/array) and **`review_ids`** (scalar/array of IDs) each point to the **same** `Review` resource, one flagged _embedded_, the other _reference_. |
266+
| **Relations & Embeddeds** | Links between resources are inferred from property names and their JSON schema:<br/>• **Plural object/array properties** (e.g. `reviews`, `authors`) become **embedded** resources when their item schema matches an existing resource (`Review`, `Author`).<br/>• **ID-like properties** (e.g. `review_id`, `reviewId`, `review_ids`, `reviewIds`, `authorId`) are treated as **references** to that resource.<br/>• As a result, fields such as **`reviews`** (object/array) and **`review_ids`** (scalar/array of IDs) each point to the **same** `Review` resource, one flagged _embedded_, the other _reference_. |
302267
| **Parameter extraction** | Parameters are read **only** from the list path (`/books`). |
303268

304269
## 🧩 Support for other formats (JSON:API, AsyncAPI...)
@@ -347,9 +312,7 @@ Contributions are welcome! To contribute:
347312

348313
## 👥 Contributors
349314

350-
<a href="https://github.com/api-platform/api-doc-parser/graphs/contributors">
351-
<img src="https://contrib.rocks/image?repo=api-platform/api-doc-parser" />
352-
</a>
315+
[![Contributors](https://contrib.rocks/image?repo=api-platform/api-doc-parser)](https://github.com/api-platform/api-doc-parser/graphs/contributors)
353316

354317
## 🌟 Star History
355318

0 commit comments

Comments
 (0)