Skip to content

Commit

Permalink
chore(release): v0.1.3 (#102)
Browse files Browse the repository at this point in the history
chore(release): v0.1.3
  • Loading branch information
asyncapi-bot authored Feb 24, 2021
1 parent 1d60ac1 commit 0e21f49
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 2 deletions.
76 changes: 76 additions & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,21 @@
<dt><a href="#simplifyTypes">simplifyTypes(schema, seenSchemas)</a></dt>
<dd><p>Find the types for a simplified version of a schema</p>
</dd>
<dt><a href="#inferTypeFromValue">inferTypeFromValue(value)</a></dt>
<dd><p>Infers the JSON Schema type from value</p>
</dd>
<dt><a href="#inferTypes">inferTypes(schema, currentOutput)</a></dt>
<dd><p>Infer types from enum and const values.</p>
</dd>
<dt><a href="#inferNotTypes">inferNotTypes(schema, currentOutput, seenSchemas)</a></dt>
<dd><p>Infer which types the model should NOT be.</p>
</dd>
<dt><a href="#addToTypes">addToTypes(typesToAdd, currentOutput)</a></dt>
<dd><p>Adds missing types to the array.</p>
</dd>
<dt><a href="#combineSchemas">combineSchemas(schema, currentOutput, seenSchemas)</a></dt>
<dd><p>Go through schema(s) and combine the simplified types together.</p>
</dd>
<dt><a href="#isModelObject">isModelObject()</a></dt>
<dd><p>check if CommonModel is a separate model or a simple model.</p>
</dd>
Expand Down Expand Up @@ -577,6 +592,67 @@ Find the types for a simplified version of a schema
| schema | to find the simplified types for |
| seenSchemas | already seen schemas and their corresponding output, this is to avoid circular schemas |

<a name="inferTypeFromValue"></a>

## inferTypeFromValue(value)
Infers the JSON Schema type from value

**Kind**: global function

| Param | Description |
| --- | --- |
| value | to infer type of |

<a name="inferTypes"></a>

## inferTypes(schema, currentOutput)
Infer types from enum and const values.

**Kind**: global function

| Param | Description |
| --- | --- |
| schema | to go through |
| currentOutput | the current output |

<a name="inferNotTypes"></a>

## inferNotTypes(schema, currentOutput, seenSchemas)
Infer which types the model should NOT be.

**Kind**: global function

| Param | Description |
| --- | --- |
| schema | to go through |
| currentOutput | the current output |
| seenSchemas | schemas which we already have outputs for |

<a name="addToTypes"></a>

## addToTypes(typesToAdd, currentOutput)
Adds missing types to the array.

**Kind**: global function

| Param | Description |
| --- | --- |
| typesToAdd | which types we should try and add to the existing output |
| currentOutput | the current output |

<a name="combineSchemas"></a>

## combineSchemas(schema, currentOutput, seenSchemas)
Go through schema(s) and combine the simplified types together.

**Kind**: global function

| Param | Description |
| --- | --- |
| schema | to go through |
| currentOutput | the current output |
| seenSchemas | schemas which we already have outputs for |

<a name="isModelObject"></a>

## isModelObject()
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@asyncapi/generator-model-sdk",
"version": "0.1.2",
"version": "0.1.3",
"description": "The Model SDK for generating data models",
"license": "Apache-2.0",
"homepage": "https://github.com/asyncapi/generator-model-sdk",
Expand Down

0 comments on commit 0e21f49

Please sign in to comment.