# ember-cli-uncharted-describe-models

> Generating ember-data schema from a backend definition. Meant to be used with the ember-schema gem.

Latest version **1.0.3** (published 2020-04-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-cli-uncharted-describe-models
pnpm add ember-cli-uncharted-describe-models
yarn add ember-cli-uncharted-describe-models
bun add ember-cli-uncharted-describe-models
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-04-30 |
| First published | 2015-02-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 8.* \|\| >= 10.* |
| Dependencies | 1 |
| Unpacked size | 12.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | nathanpalmer |
| Keywords | ember-addon |

## Links

- npm: https://www.npmjs.com/package/ember-cli-uncharted-describe-models
- npm.io page: https://npm.io/package/ember-cli-uncharted-describe-models

## Dependencies (1)

- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^7.7.3

## Recent versions

- 1.0.3 (latest) — 2020-04-30
- 1.0.2 — 2020-02-27
- 1.0.1 — 2019-06-05
- 1.0.0 — 2019-06-05
- 0.0.6 — 2015-05-21
- 0.0.5 — 2015-04-07
- 0.0.4 — 2015-02-25
- 0.0.3 — 2015-02-19
- 0.0.2 — 2015-02-11
- 0.0.1 — 2015-02-11

## README

# UnchartedCode Describe Models [![Build Status][travis-badge]][travis-badge-url]
==============================================================================

Please note, this is mainly used internally at the moment. We are making certain decisions based on our needs.
If you would like to use this in your application then open an issue with your use case.

Generating ember-data schema from a backend definition. Meant to be used with the [ember-schema](https://rubygems.org/gems/ember-schema) gem.

Compatibility
------------------------------------------------------------------------------

* Ember.js v2.18 or above
* Ember CLI v2.13 or above
* Node.js v8 or above

## Installation

```bash
ember install ember-cli-uncharted-describe-models
```

## Usage

**Users**: If you are using this library I'd love to hear from you. This project is used "internally" for several projects and the direction is currently driven by those. We'd be happy to see others using it as well.

There are two main pieces to this library.

  1. Automatically building model schema using a backend definition
  2. Extending DS.Model with some helpful mixins


### Automatically Defined Models

For the first part it is assumed that you generate a model for every backend model. However it's not necessary to define each field. What you need before any of this is a `schema.json`. It can be generated via the command line.

```bash
ember update-models --proxy http://localhost:5000
```

This assumes you have exposed `/api/models/describe` through the _ember-schema_ gem. It will write out `app/schema.json`.

Once you have that you can generate a model which will automatically pull field level and associations from the schema.

```bash
ember generate model User
```

Contributing
------------------------------------------------------------------------------

See the [Contributing](CONTRIBUTING.md) guide for details.


License
------------------------------------------------------------------------------

This project is licensed under the [MIT License](LICENSE.md).

[travis-badge]: https://travis-ci.org/unchartedcode/describe-models.svg?branch=master
[travis-badge-url]: https://travis-ci.org/unchartedcode/describe-models

---
_Source: https://npm.io/package/ember-cli-uncharted-describe-models · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
