Skip to content

Commit

Permalink
Configure api extractor for json schema and add docs and refactor (#4732
Browse files Browse the repository at this point in the history
)

Configure api extractor and add docs. Additionally refactored to use
some newer pattern of decorator declaration.
  • Loading branch information
timotheeguerin authored Oct 15, 2024
1 parent 657d4a0 commit e9a65ca
Show file tree
Hide file tree
Showing 14 changed files with 375 additions and 230 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: fix
packages:
- "@typespec/json-schema"
---

Document exported types
4 changes: 4 additions & 0 deletions packages/json-schema/api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "../../api-extractor.base.json"
}
5 changes: 3 additions & 2 deletions packages/json-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"scripts": {
"clean": "rimraf ./dist ./temp",
"build": "npm run gen-extern-signature && tsc -p . && npm run lint-typespec-library",
"build": "npm run gen-extern-signature && tsc -p . && npm run lint-typespec-library && pnpm api-extractor",
"watch": "tsc -p . --watch",
"gen-extern-signature": "tspd --enable-experimental gen-extern-signature .",
"lint-typespec-library": "tsp compile . --warn-as-error --import @typespec/library-linter --no-emit",
Expand All @@ -45,7 +45,8 @@
"test:ci": "vitest run --coverage --reporter=junit --reporter=default",
"lint": "eslint . --max-warnings=0",
"lint:fix": "eslint . --fix",
"regen-docs": "tspd doc . --enable-experimental --output-dir ../../docs/emitters/json-schema/reference"
"regen-docs": "tspd doc . --enable-experimental --output-dir ../../docs/emitters/json-schema/reference",
"api-extractor": "api-extractor run --local --verbose"
},
"files": [
"lib/*.tsp",
Expand Down
Loading

0 comments on commit e9a65ca

Please sign in to comment.