fix(oas31): avoid capitalizing first character of components.schemas (#8710)

Refs #8611
This commit is contained in:
Vladimír Gorej
2023-05-24 15:43:08 +02:00
committed by GitHub
parent 1931b45eb0
commit 4ad45f855d
2 changed files with 5 additions and 7 deletions

View File

@@ -11,8 +11,10 @@ export const upperFirst = (value) => {
}
export const getTitle = (schema) => {
if (schema?.title) return upperFirst(schema.title)
if (schema?.$anchor) return upperFirst(schema.$anchor)
const fn = useFn()
if (schema?.title) return fn.upperFirst(schema.title)
if (schema?.$anchor) return fn.upperFirst(schema.$anchor)
if (schema?.$id) return schema.$id
return ""