# spring-data-rest-json-schema-to-typescript-definitions

> npm package that allows you to generate TypeScript definitions from JSON Schema metadata supplied by Spring Data REST endpoints.

Latest version **0.1.7** (published 2019-09-09) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install spring-data-rest-json-schema-to-typescript-definitions
pnpm add spring-data-rest-json-schema-to-typescript-definitions
yarn add spring-data-rest-json-schema-to-typescript-definitions
bun add spring-data-rest-json-schema-to-typescript-definitions
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.7 |
| Published | 2019-09-09 |
| First published | 2018-08-06 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 29 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Björn Wilmsmann |
| Maintainers | bjoernkw |
| Keywords | typescript, json-schema, spring-data-rest, spring, spring-data |

## Links

- npm: https://www.npmjs.com/package/spring-data-rest-json-schema-to-typescript-definitions
- Repository: https://github.com/BjoernKW/spring-data-rest-json-schema-to-typescript-definitions
- Homepage: https://bjoernkw.github.io/spring-data-rest-json-schema-to-typescript-definitions/
- Issues: https://github.com/BjoernKW/spring-data-rest-json-schema-to-typescript-definitions/issues
- npm.io page: https://npm.io/package/spring-data-rest-json-schema-to-typescript-definitions

## Dependencies (1)

- [json-schema-to-typescript](https://npm.io/package/json-schema-to-typescript.md) ^5.5.0

## Alternatives

- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K weekly downloads
- [persona-harness](https://npm.io/package/persona-harness.md) — 4.7K weekly downloads
- [@tsparticles/effect-bubble](https://npm.io/package/@tsparticles/effect-bubble.md) — 4.6K weekly downloads
- [f3d](https://npm.io/package/f3d.md) — 730 weekly downloads
- [spark-html-motion](https://npm.io/package/spark-html-motion.md) — 298 weekly downloads

## Recent versions

- 0.1.7 (latest) — 2019-09-09
- 0.1.6 — 2018-08-07
- 0.1.5 — 2018-08-07
- 0.1.4 — 2018-08-07
- 0.1.3 — 2018-08-07
- 0.1.2 — 2018-08-07
- 0.1.1 — 2018-08-06
- 0.1.0 — 2018-08-06

## README

# spring-data-rest-json-schema-to-typescript-definitions

npm package that allows you to generate TypeScript declaration files from JSON Schema metadata supplied by [Spring Data REST](https://projects.spring.io/spring-data-rest/) endpoints.

## Getting Started

### Installing

`npm install spring-data-rest-json-schema-to-typescript-definitions --save-dev`

### Usage

Add a script named *generate-model* to your project's *package.json*, e.g.:

~~~~~~~~
{
  ...
  "scripts": {
    ...
    "generate-model": "node node_modules/spring-data-rest-json-schema-to-typescript-definitions/dist/index.js http://localhost:8080 ./src/app/generated-model"
    ...
  },
  ...
}

~~~~~~~~

The main *index.js* takes two arguments:

1. The root URL of the API (*http://localhost:8080* in the example above; the script automatically appends the */profile* part to the URL) generated by Spring Data REST (see https://docs.spring.io/spring-data/rest/docs/current/reference/html/#metadata.json-schema for more information).
2. The directory to which the TypeScript declaration files will be written (*./src/app/generated-model* in the example above).

Now you can generate TypeScript declaration files from your [Spring Data REST](https://projects.spring.io/spring-data-rest/) endpoints by using this command from your project's root directory:

`npm run generate-model`

## Built With

* [TypeScript](https://www.typescriptlang.org/)
* [Node.js](https://nodejs.org/en/)
* [npm](https://www.npmjs.com/)

## Authors

* **[Björn Wilmsmann](https://bjoernkw.com)**

## License

[Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)

## Acknowledgements

Thanks to [Boris Cherny](https://github.com/bcherny) whose [json-schema-to-typescript](https://github.com/bcherny/json-schema-to-typescript) package I could draw upon for creating this package.

---
_Source: https://npm.io/package/spring-data-rest-json-schema-to-typescript-definitions · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
