Skip to content

Commit

Permalink
feat: better support for polymorphism (#116)
Browse files Browse the repository at this point in the history
* fix: making adjustments to parameters-to-json-schema for newer RJSF versions

* chore: excluding the test coverage directory from npm

* feat: slight tweak to flatten-schema so it doesn't pass the OAS around everywhere

* test: we should be testing `allOf`, not `$allOf`

* style: loading in commitlint for enforcing commit consistency

* feat: support for allOf/oneOf/anyOf to flatten-schema

* docs: adding some better docs on our quirky oneOf and anyOf support

* docs: removing an extra space in a comment

* fix: updating find-schema-definition to handle escaped refs

* fix: flatten-schema will no longer treat non-objects as an object
  • Loading branch information
erunion authored Mar 6, 2020
1 parent b128204 commit 1975251
Show file tree
Hide file tree
Showing 14 changed files with 1,780 additions and 1,039 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
601 changes: 601 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,18 @@
"version": "auto-changelog --template compact -v $(node -e \"console.log('v' + require('./lerna.json').version)\") && git add CHANGELOG.md"
},
"devDependencies": {
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@readme/eslint-config": "^1.14.0",
"auto-changelog": "^1.16.2",
"eslint": "^6.8.0",
"husky": "^4.2.3",
"lerna": "^3.20.2",
"prettier": "^1.19.1"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
}
1 change: 1 addition & 0 deletions packages/tooling/.npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
__tests__/
coverage/
2 changes: 1 addition & 1 deletion packages/tooling/__tests__/__fixtures__/lib/json-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module.exports = {
[scenario]: getScenario(),
},
};
} else if (complexity === '$oneOf' || complexity === '$allOf' || complexity === '$anyOf') {
} else if (complexity === 'oneOf' || complexity === 'allOf' || complexity === 'anyOf') {
requestBody.content = {
'application/json': {
schema: {
Expand Down
Loading

0 comments on commit 1975251

Please sign in to comment.