- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
94 lines
2.3 KiB
Handlebars
94 lines
2.3 KiB
Handlebars
# json-schema-deref-sync
|
|
|
|
[](https://www.npmjs.com/package/json-schema-deref-sync)
|
|
[](https://travis-ci.org/bojand/json-schema-deref-sync)
|
|
[](https://standardjs.com)
|
|
[](https://raw.githubusercontent.com/bojand/json-schema-deref-sync/master/LICENSE)
|
|
|
|
Dereference JSON pointers in a JSON schemas with their true resolved values.
|
|
Basically a lighter, synchronous version of [json-schema-deref](https://github.com/bojand/json-schema-deref) but omits web references.
|
|
|
|
## Installation
|
|
|
|
`npm install json-schema-deref-sync`
|
|
|
|
## Overview
|
|
|
|
Let's say you have the following JSON Schema:
|
|
|
|
```json
|
|
{
|
|
"description": "Just some JSON schema.",
|
|
"title": "Basic Widget",
|
|
"type": "object",
|
|
"definitions": {
|
|
"id": {
|
|
"description": "unique identifier",
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"readOnly": true
|
|
}
|
|
},
|
|
"properties": {
|
|
"id": {
|
|
"$ref": "#/definitions/id"
|
|
},
|
|
"foo": {
|
|
"$ref": "http://www.mysite.com/myschema.json#/definitions/foo"
|
|
},
|
|
"bar": {
|
|
"$ref": "bar.json"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
Sometimes you just want that schema to be fully expanded, with `$ref`'s being their (true) resolved values:
|
|
|
|
```json
|
|
{
|
|
"description": "Just some JSON schema.",
|
|
"title": "Basic Widget",
|
|
"type": "object",
|
|
"definitions": {
|
|
"id": {
|
|
"description": "unique identifier",
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"readOnly": true
|
|
}
|
|
},
|
|
"properties": {
|
|
"id": {
|
|
"description": "unique identifier",
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"readOnly": true
|
|
},
|
|
"foo": {
|
|
"description": "foo property",
|
|
"readOnly": true,
|
|
"type": "number"
|
|
},
|
|
"bar": {
|
|
"description": "bar property",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
This utility lets you do that:
|
|
|
|
|
|
```js
|
|
var deref = require('json-schema-deref-sync');
|
|
var myschema = require('schema.json');
|
|
|
|
var fullSchema = deref(myschema);
|
|
```
|
|
|
|
## API Reference
|
|
|
|
{{>all-docs~}}
|