-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
editor: add schema example in the demo application #249
Conversation
585124c
to
182a4ed
Compare
Model | ||
</div> | ||
<div class="card-body"> | ||
<pre>{{model | json}}</pre> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space after {
and before }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit message is fine.
Otherwise, it's juste a matter of coherence in the JSON schema.
{ | ||
"schema": "http://json-schema.org/draft-07/schema#", | ||
"type": "object", | ||
"title": "Test Editor", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"title": "Test Editor", | |
"title": "Test editor", |
"additionnalProperties": "false", | ||
"oneOf": [ | ||
{ | ||
"title": "prop1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"title": "prop1", | |
"title": "Proposition 1", |
], | ||
"properties": { | ||
"name": { | ||
"title": "name", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"title": "name", | |
"title": "Name", |
} | ||
}, | ||
"hidden": { | ||
"title": "hidden name", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"title": "hidden name", | |
"title": "Hidden name", |
} | ||
}, | ||
"type": { | ||
"title": "type", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"title": "type", | |
"title": "Type", |
} | ||
}, | ||
"array_of_array": { | ||
"title": "Array Of Array", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"title": "Array Of Array", | |
"title": "Array of array", |
} | ||
}, | ||
"array_of_object_of_object": { | ||
"title": "Array of Object of Object", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"title": "Array of Object of Object", | |
"title": "Array of object of object", |
"type": "array", | ||
"minItems": 0, | ||
"items": { | ||
"title": "Object of Object", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"title": "Object of Object", | |
"title": "Object of object", |
], | ||
"properties": { | ||
"object1": { | ||
"title": "Object1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"title": "Object1", | |
"title": "Object 1", |
@@ -0,0 +1,37 @@ | |||
import { HttpClientTestingModule } from '@angular/common/http/testing'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Header is missing
@Component({ | ||
selector: 'app-editor', | ||
templateUrl: './editor.component.html', | ||
styleUrls: ['./editor.component.scss'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove styleUrls
property as it's not used, and the scss
file, too.
58cffb2
to
7b4a995
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention #115 in the commit message please.
* Adds a new link in the application demo to show the editor with a specific JSONSchema to demonstrate all the possibilities of the editor. * Makes JSONSchema and editorSettings as Input for the editor component. * Cleans the empty values in the emitted model. * Set the defauls model and JSONSchema values if the URL do not contains the record type. * Closes rero#115. Co-Authored-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
7b4a995
to
0106b27
Compare
Mention added to commit message!
specific JSONSchema to demonstrate all the possibilities of the editor.
the record type.
Co-Authored-by: Johnny Mariéthoz Johnny.Mariethoz@rero.ch
Why are you opening this PR?
How to test?
Note: the editor component file has been re-indented. Sorry for the review.
Code review check list