Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/satohshi/pocketbase-ts-schema-generator
JS hooks for PocketBase to help you with schema generation for pocketbase-ts
https://github.com/satohshi/pocketbase-ts-schema-generator
pocketbase typescript
Last synced: 2 days ago
JSON representation
JS hooks for PocketBase to help you with schema generation for pocketbase-ts
- Host: GitHub
- URL: https://github.com/satohshi/pocketbase-ts-schema-generator
- Owner: satohshi
- License: mit
- Created: 2024-11-15T19:18:09.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2025-01-11T08:18:17.000Z (about 1 month ago)
- Last Synced: 2025-01-11T09:25:46.944Z (about 1 month ago)
- Topics: pocketbase, typescript
- Language: TypeScript
- Homepage:
- Size: 327 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# pocketbase-ts-schema-generator
JS hook for PocketBase to help you with schema generation for [pocketbase-ts](https://github.com/satohshi/pocketbase-ts).
## Usage
1. Download `pb_hooks.zip` from [releases](https://github.com/satohshi/pocketbase-ts-schema-generator/releases) and extract it to the directory where you have the PocketBase executable.
2. Update `config.json` if necessary.
3. Run `pocketbase serve`, and the hooks will automatically generate/update the schema file on bootstrap, and every time you make changes to the collections.The generated schema will have field options in docstrings, so you will get additional info like `required`, `min`, and `max` when you hover over properties in your IDE.
## Configuration Options
| Key | Description | Default |
| ------------------ | ----------------------------------------------- | :-----------: |
| `output` | Where to save the generated schema file. | `./schema.ts` |
| `includeDocstring` | Whether to include field options in docstrings. | `true` |