WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 303124d

Browse files
committed
chore: Elaborate comment on rewriting models
1 parent dc99094 commit 303124d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/griffe_typedoc/_internal/models.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@
99
# from pydantic.dataclasses import dataclass, Field as field
1010

1111
# TODO: Use info from https://typedoc.org/api/modules/JSONOutput.html to rebuild models!
12-
# We could also use https://github.com/koxudaxi/datamodel-code-generator to generate the models, after generating a JSON Schema with
13-
# `npx ts-json-schema-generator --path src/**/*.ts --type ProjectReflection --no-type-check`.
12+
# We could also use https://github.com/koxudaxi/datamodel-code-generator to generate the models,
13+
# after generating a JSON Schema with ts-json-schema-generator:
14+
#
15+
# ```
16+
# git clone https://github.com/TypeStrong/typedoc
17+
# cd typedoc
18+
# npx ts-json-schema-generator -f tsconfig.json --path src/**.ts --type ProjectReflection --no-type-check
19+
# uvx --from datamodel-code-generator datamodel-codegen \
20+
# --input typedoc-schema.json --input-file-type jsonschema \
21+
# --output-model-type dataclasses.dataclass --output models/
22+
# ```
23+
#
1424
# Initially discussed in https://github.com/TypeStrong/typedoc/issues/2705.
1525
# See issue generating schema: https://github.com/vega/ts-json-schema-generator/issues/2197.
1626

0 commit comments

Comments
 (0)