feat(sample-gen): infer implicit type and validation constraint types (#7117)

* this closes some dead ends of sample generation where no sample can be generated
This commit is contained in:
Mahtis Michel
2021-03-30 23:28:51 +02:00
committed by GitHub
parent 75865f31ec
commit 032bd71e0a
4 changed files with 127 additions and 151 deletions

View File

@@ -130,7 +130,7 @@ export default class Response extends React.Component {
// Goal: find an example value for `sampleResponse`
if(isOAS3) {
sampleSchema = activeMediaType.get("schema", Map({})).toJS()
sampleSchema = activeMediaType.get("schema")?.toJS()
if(examplesForMediaType) {
const targetExamplesKey = this.getTargetExamplesKey()
const targetExample = examplesForMediaType