Skip to content

Commit

Permalink
Allow more keywords than type
Browse files Browse the repository at this point in the history
Like e.g. example
  • Loading branch information
w3nl committed Nov 21, 2023
1 parent 88e1a8a commit 07c0f88
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions 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,7 +1,7 @@
{
"name": "@hckrnews/openapi-model",
"description": "OpenAPI Model",
"version": "0.1.2",
"version": "0.2.0",
"author": {
"name": "Pieter Wigboldus",
"url": "https://hckr.news/"
Expand Down
4 changes: 3 additions & 1 deletion src/model.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Ajv from 'ajv'
const ajv = new Ajv()
const ajv = new Ajv({
strictSchema: false
})

/**
* @typedef {import('./schema.d.ts').OpenAPIV3.BaseSchemaObject} BaseSchemaObject
Expand Down
3 changes: 2 additions & 1 deletion src/model.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ test('Test the openapiToModel helpers', async (t) => {
properties: {
foo: {
type: 'string',
default: 'bar'
default: 'bar',
example: 'baz'
},
bar: {
type: 'number',
Expand Down

0 comments on commit 07c0f88

Please sign in to comment.