swagger-autogen-ast 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +4 -2
  2. package/package.json +49 -49
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # swagger-autogen-ast
2
2
 
3
- A zero-config OpenAPI 3.0 generator for Express. The AST-based spiritual successor to `swagger-autogen` with automatic type inference.
3
+ A zero-config OpenAPI 3.0 generator for Express.
4
+
5
+ The AST-based spiritual successor to [swagger-autogen](https://www.npmjs.com/package/swagger-autogen), leveraging the TypeScript Compiler API for faster, more accurate schema generation.
4
6
 
5
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
8
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/)
@@ -19,9 +21,9 @@ Unlike other tools that require extensive JSDoc decorators, this library uses th
19
21
  - Infers schema from `req.body` and `req.query` type assertions (`as MyType`).
20
22
  - Infers schema from Express Generics: `Request<{}, {}, MyBodyType>`.
21
23
  - **Response Body Inference:** automatically generates schemas from `res.json(data)` and `res.send(data)` calls.
22
- - **Smart Path Resolution:** Resolves paths from string literals (`"/users"`) as well as constants and variables (`USER_ROUTE`).
23
24
  - **Automatic Status Codes:** Scans controller logic to automatically register response codes.
24
25
  - **Comment Overrides:** Supports JSDoc and `#swagger` inline comments for when you need manual control.
26
+ - **Example-Driven Tests:** The entire feature set is covered by integration tests that also serve as usage examples. See the /tests directory for details.
25
27
 
26
28
  ## Installation
27
29
 
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
- {
2
- "name": "swagger-autogen-ast",
3
- "version": "1.0.0",
4
- "description": "A zero-config OpenAPI 3.0 generator for Express. The AST-based spiritual successor to swagger-autogen with automatic type inference.",
5
- "homepage": "https://github.com/anthfgreco/swagger-autogen-ast#readme",
6
- "bugs": {
7
- "url": "https://github.com/anthfgreco/swagger-autogen-ast/issues"
8
- },
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/anthfgreco/swagger-autogen-ast.git"
12
- },
13
- "license": "MIT",
14
- "author": "Anthony Greco",
15
- "type": "module",
16
- "main": "./dist/index.js",
17
- "types": "./dist/index.d.ts",
18
- "bin": {
19
- "swagger-autogen-ast": "./dist/index.js"
20
- },
21
- "files": [
22
- "dist",
23
- "README.md"
24
- ],
25
- "scripts": {
26
- "build": "tsc",
27
- "prepublishOnly": "npm run build",
28
- "prettier": "prettier src --write",
29
- "sort-package-json": "npx sort-package-json",
30
- "test": "vitest run",
31
- "test:slow": "cross-env RUN_SLOW_TESTS=1 vitest run",
32
- "test:watch": "vitest watch",
33
- "test:watch:slow": "cross-env RUN_SLOW_TESTS=1 vitest watch"
34
- },
35
- "dependencies": {
36
- "ora": "^9.0.0",
37
- "typescript": "^5.9.3"
38
- },
39
- "devDependencies": {
40
- "@types/express": "^5.0.6",
41
- "@types/node": "^25.0.2",
42
- "cross-env": "^10.1.0",
43
- "dotenv": "^17.2.3",
44
- "express": "^5.2.1",
45
- "prettier": "^3.7.4",
46
- "prettier-plugin-organize-imports": "^4.2.0",
47
- "vitest": "^4.0.15"
48
- }
49
- }
1
+ {
2
+ "name": "swagger-autogen-ast",
3
+ "version": "1.0.1",
4
+ "description": "A zero-config OpenAPI 3.0 generator for Express. The AST-based spiritual successor to swagger-autogen with automatic type inference.",
5
+ "homepage": "https://github.com/anthfgreco/swagger-autogen-ast#readme",
6
+ "bugs": {
7
+ "url": "https://github.com/anthfgreco/swagger-autogen-ast/issues"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/anthfgreco/swagger-autogen-ast.git"
12
+ },
13
+ "license": "MIT",
14
+ "author": "Anthony Greco",
15
+ "type": "module",
16
+ "main": "./dist/index.js",
17
+ "types": "./dist/index.d.ts",
18
+ "bin": {
19
+ "swagger-autogen-ast": "./dist/index.js"
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "README.md"
24
+ ],
25
+ "scripts": {
26
+ "build": "tsc",
27
+ "prepublishOnly": "npm run build",
28
+ "prettier": "prettier src --write",
29
+ "sort-package-json": "npx sort-package-json",
30
+ "test": "vitest run",
31
+ "test:slow": "cross-env RUN_SLOW_TESTS=1 vitest run",
32
+ "test:watch": "vitest watch",
33
+ "test:watch:slow": "cross-env RUN_SLOW_TESTS=1 vitest watch"
34
+ },
35
+ "dependencies": {
36
+ "ora": "^9.0.0",
37
+ "typescript": "^5.9.3"
38
+ },
39
+ "devDependencies": {
40
+ "@types/express": "^5.0.6",
41
+ "@types/node": "^25.0.2",
42
+ "cross-env": "^10.1.0",
43
+ "dotenv": "^17.2.3",
44
+ "express": "^5.2.1",
45
+ "prettier": "^3.7.4",
46
+ "prettier-plugin-organize-imports": "^4.2.0",
47
+ "vitest": "^4.0.15"
48
+ }
49
+ }