feat(rendering): gate rendering based on valid version identifiers (#4614)
* create VersionPragmaFilter component * use VersionPragmaFilter in BaseLayout * tighten version idenitifier constraints * handle case where user specifies a valid `swagger` and `openapi` field * add traceable class names for each message * add tests * linter fixes! * UNRELATED CHANGE: remove travis short-circuit * add bypass switch to VersionPragmaFilter
This commit is contained in:
@@ -6,7 +6,7 @@ export function isOAS3(jsSpec) {
|
||||
return false
|
||||
}
|
||||
|
||||
return oasVersion.startsWith("3")
|
||||
return oasVersion.startsWith("3.0.")
|
||||
}
|
||||
|
||||
export function isSwagger2(jsSpec) {
|
||||
@@ -15,7 +15,7 @@ export function isSwagger2(jsSpec) {
|
||||
return false
|
||||
}
|
||||
|
||||
return swaggerVersion.startsWith("2")
|
||||
return swaggerVersion.startsWith("2.0")
|
||||
}
|
||||
|
||||
export function OAS3ComponentWrapFactory(Component) {
|
||||
|
||||
Reference in New Issue
Block a user