Add property name as schema title (#289)

This commit is contained in:
Vlad Barosan 2018-08-10 14:04:08 -07:00 коммит произвёл Sergey Shandar
Родитель dc8d3df682
Коммит f1990b98b2
4 изменённых файлов: 29 добавлений и 17 удалений

Просмотреть файл

@ -1,6 +1,11 @@
# Changelog
### 08/01/2018 0.4.64
### 08/10/2018 0.4.65
- Include property name as schema title in the property object.
### 08/10/2018 0.4.64
- Include definition name as schema title in the definitions.
### 08/01/2018 0.4.63

Просмотреть файл

@ -12,6 +12,14 @@ export function transform(spec: SwaggerObject): SwaggerObject {
for (const [definitionName, definition] of Object.entries(spec.definitions)) {
insertSchemaTitle(definition, definitionName)
if (definition.properties) {
for (const [propertyName, property] of Object.entries(
definition.properties
)) {
insertSchemaTitle(property, propertyName)
}
}
}
return spec

19
package-lock.json сгенерированный
Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "oav",
"version": "0.4.64",
"version": "0.4.65",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -93,9 +93,9 @@
"dev": true
},
"@types/lodash": {
"version": "4.14.112",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.112.tgz",
"integrity": "sha512-jDD7sendv3V7iwyRXSlECOR8HCtMN2faVA9ngLdHHihSVIwY7nbfsKl2kA6fimUDU1i5l/zgpG3aevwWnN3zCQ=="
"version": "4.14.116",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.116.tgz",
"integrity": "sha512-lRnAtKnxMXcYYXqOiotTmJd74uawNWuPnsnPrrO7HiFuE3npE2iQhfABatbYDyxTNqZNuXzcKGhw37R7RjBFLg=="
},
"@types/minimatch": {
"version": "3.0.3",
@ -2157,9 +2157,9 @@
}
},
"moment": {
"version": "2.21.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.21.0.tgz",
"integrity": "sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ=="
"version": "2.22.2",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz",
"integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y="
},
"ms": {
"version": "2.0.0",
@ -6124,8 +6124,7 @@
"path-to-regexp": "^1.7.0",
"rewire": "^4.0.0",
"swagger-methods": "^1.0.0",
"swagger-schema-official": "2.0.0-bab6bed",
"z-schema": "github:vladbarosan/z-schema#1cb38cd7bc98e8a9f2632998dc921162cfec03f9"
"swagger-schema-official": "2.0.0-bab6bed"
},
"dependencies": {
"isarray": {
@ -6143,7 +6142,7 @@
},
"z-schema": {
"version": "github:vladbarosan/z-schema#1cb38cd7bc98e8a9f2632998dc921162cfec03f9",
"from": "github:vladbarosan/z-schema",
"from": "github:vladbarosan/z-schema#1cb38cd7bc98e8a9f2632998dc921162cfec03f9",
"requires": {
"commander": "^2.7.1",
"lodash.get": "^4.0.0",

Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "oav",
"version": "0.4.64",
"version": "0.4.65",
"author": {
"name": "Microsoft Corporation",
"email": "azsdkteam@microsoft.com",
@ -13,7 +13,7 @@
"@ts-common/iterator": "0.0.30",
"@ts-common/string-map": "0.0.5",
"@ts-common/tuple": "0.0.0",
"@types/lodash": "^4.14.109",
"@types/lodash": "^4.14.116",
"@types/request": "^2.47.1",
"azure-arm-resource": "^2.0.0-preview",
"glob": "^5.0.14",
@ -22,10 +22,10 @@
"jsonpath": "^1.0.0",
"linq": "^3.1.0",
"lodash": "^4.17.10",
"moment": "~2.21.0",
"ms-rest": "^2.3.3",
"ms-rest-azure": "^2.5.5",
"recursive-readdir": "^2.2.1",
"moment": "~2.22.2",
"ms-rest": "^2.3.6",
"ms-rest-azure": "^2.5.7",
"recursive-readdir": "^2.2.2",
"request": "^2.85.0",
"swagger-parser": "^3.4.1",
"swagger-tools": "^0.10.4",