-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: render missed parts of JSON Schema (#185)
- Loading branch information
1 parent
4e4f9ae
commit f38c0b1
Showing
14 changed files
with
6,779 additions
and
1,886 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ node_modules | |
test/output | ||
output | ||
sample | ||
__transpiled | ||
__transpiled | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Disable specific file since it would introduce more complexity to reduce it - mainly code complexity and complex template literals | ||
sonar.exclusions=components/Schema.js,helpers/schema.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
|
||
import { Schema } from './Schema'; | ||
|
||
import { SchemaHelpers } from '../helpers/schema'; | ||
|
||
export const Extensions = ({ name = 'Extensions', item }) => { | ||
const extensions = SchemaHelpers.getCustomExtensions(item); | ||
if (!extensions || !Object.keys(extensions).length) { | ||
return null; | ||
} | ||
|
||
const schema = SchemaHelpers.jsonToSchema(extensions); | ||
return ( | ||
<Schema schemaName={name} schema={schema} /> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.