Skip to content

Commit f5a3596

Browse files
docs: Initial specification + install guide (#1)
* docs: Initial specification + install guide * fix: Switch to redocly validator for GHA --------- Co-authored-by: CodeGraphTheory <[email protected]>
1 parent 037584a commit f5a3596

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

.github/workflows/validate.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Validate OpenAPI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
validate:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup Node
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
20+
- name: Validate OpenAPI spec
21+
run: npx --yes @redocly/cli lint openapi.yaml
22+

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,35 @@
11
# Supermodel OpenAPI Specification
2-
Read more: [https://docs.supermodeltools.com](https://docs.supermodeltools.com)
2+
3+
[![npm](https://img.shields.io/npm/v/@supermodeltools/openapi-spec)](https://www.npmjs.com/package/@supermodeltools/openapi-spec)
4+
[![OpenAPI](https://img.shields.io/badge/OpenAPI-3.0-green)](https://spec.openapis.org/oas/v3.0.0)
5+
6+
OpenAPI 3.0 specification for the [Supermodel API](https://docs.supermodeltools.com) - code graphing and static analysis.
7+
8+
## Install
9+
10+
```bash
11+
npm install @supermodeltools/openapi-spec
12+
```
13+
14+
The spec is available at `node_modules/@supermodeltools/openapi-spec/openapi.yaml`.
15+
16+
## Endpoints
17+
18+
| Method | Path | Description |
19+
|--------|------|-------------|
20+
| POST | `/v1/graphs/dependency` | File-level dependency graph |
21+
| POST | `/v1/graphs/call` | Function-level call graph |
22+
| POST | `/v1/graphs/domain` | Domain model classification |
23+
| POST | `/v1/graphs/parse` | AST parse tree relationships |
24+
| POST | `/v1/graphs/supermodel` | Full Supermodel IR bundle |
25+
26+
All endpoints accept a zipped repository snapshot and return graph data as JSON.
27+
28+
## Authentication
29+
30+
Requests require an API key via `X-Api-Key` header.
31+
32+
## Links
33+
34+
- [API Documentation](https://docs.supermodeltools.com)
35+
- [API Terms of Service](https://supermodeltools.com/legal/api-terms)

package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@
1010
"type": "git",
1111
"url": "git+https://github.com/supermodeltools/openapi-spec.git"
1212
},
13+
"homepage": "https://docs.supermodeltools.com",
14+
"bugs": {
15+
"url": "https://github.com/supermodeltools/openapi-spec/issues"
16+
},
17+
"keywords": [
18+
"openapi",
19+
"api",
20+
"code-graph",
21+
"dependency-graph",
22+
"call-graph",
23+
"static-analysis",
24+
"code-analysis",
25+
"supermodel"
26+
],
1327
"author": "Supermodel <[email protected]>",
1428
"license": "UNLICENSED"
1529
}

0 commit comments

Comments
 (0)