Skip to content
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

出了一个莫名的错误,请大佬看看 #42

Closed
Darkhorse-Fraternity opened this issue Aug 15, 2020 · 11 comments
Closed

出了一个莫名的错误,请大佬看看 #42

Darkhorse-Fraternity opened this issue Aug 15, 2020 · 11 comments
Labels
enhancement New feature or request

Comments

@Darkhorse-Fraternity
Copy link

image
image

用的java to swagger 通过 数据同步 完全覆 进入yapi : https://123.57.61.2:7600/v2/api-docs
yapi:1.9.1
yapi-to-script:3.2.0

@Darkhorse-Fraternity
Copy link
Author

image
这边注释掉之后ji就好了。

@henryzp
Copy link

henryzp commented Aug 18, 2020

@fjc0k ,我们这边有前端工程也出现的类似现象,有没有从源码的方式去修改的,而不是说去改java代码啥的

@fjc0k fjc0k added the enhancement New feature or request label Aug 18, 2020
@fjc0k
Copy link
Owner

fjc0k commented Aug 18, 2020

3.4.0 测试正常,请尝试升级下 ytt 版本后看看问题是否还在。

@henryzp
Copy link

henryzp commented Aug 18, 2020

@fjc0k ,问题还在,经过调试,是这样的。。

var token = tokens[i];
    if (this.value[token] === undefined) {
      throw ono.syntax('Error resolving $ref pointer "%s". \nToken "%s" does not exist.', this.originalPath, token);
    }
    else {
      this.value = this.value[token];
    }

报错的代码是进到了if判断里面,然后

token的值是:BaseSchedule

this.value的值是:

{
	properties: {
		applyCustId: {
			type: 'integer',
			format: 'int64',
			additionalProperties: false
		},
		applyCustName: {
			type: 'string',
			additionalProperties: false
		},
		belongOrgId: {
			type: 'string',
			additionalProperties: false
		},
		commentList: {
			type: 'array',
			items: [Object],
			additionalProperties: false,
			minItems: 0
		},
		content: {
			type: 'string',
			additionalProperties: false
		},
		createrDate: {
			type: 'string',
			format: 'date-time',
			additionalProperties: false
		},
		createrUserId: {
			type: 'string',
			additionalProperties: false
		},
		createrUserName: {
			type: 'string',
			additionalProperties: false
		},
		custId: {
			type: 'integer',
			format: 'int64',
			additionalProperties: false
		},
		custName: {
			type: 'string',
			additionalProperties: false
		},
		date: {
			type: 'string',
			format: 'date-time',
			additionalProperties: false
		},
		endDate: {
			type: 'string',
			format: 'date-time',
			additionalProperties: false
		},
		entityColumns: {
			type: 'string',
			additionalProperties: false
		},
		executeUserId: {
			type: 'string',
			additionalProperties: false
		},
		groupByField: {
			type: 'string',
			additionalProperties: false
		},
		havingByField: {
			type: 'string',
			additionalProperties: false
		},
		id: {
			type: 'integer',
			format: 'int64',
			additionalProperties: false
		},
		leftJoinTable: {
			type: 'string',
			additionalProperties: false
		},
		orderByField: {
			type: 'string',
			additionalProperties: false
		},
		orgId: {
			type: 'string',
			additionalProperties: false
		},
		page: {
			type: 'integer',
			format: 'int32',
			additionalProperties: false
		},
		pageSize: {
			type: 'integer',
			format: 'int32',
			additionalProperties: false
		},
		resultCount: {
			type: 'integer',
			format: 'int64',
			additionalProperties: false
		},
		schedule: {
			'$ref': '#/definitions/BaseSchedule',
			additionalProperties: false
		},
		scheduleId: {
			type: 'integer',
			format: 'int64',
			additionalProperties: false
		},
		startDate: {
			type: 'string',
			format: 'date-time',
			additionalProperties: false
		},
		title: {
			type: 'string',
			additionalProperties: false
		},
		upNullColumnList: {
			type: 'array',
			items: [Object],
			additionalProperties: false,
			minItems: 0
		},
		upNullColumns: {
			type: 'string',
			additionalProperties: false
		},
		userIdList: {
			type: 'array',
			items: [Object],
			additionalProperties: false,
			minItems: 0
		}
	},
	'$$ref': '#/definitions/BaseWorkRecord',
	additionalProperties: false,
	required: undefined,
	id: 'THISISAFAKETYPENAME'
}

没有找到,所以抛错了。。。想问一下,大概是哪一步有问题了

@fjc0k
Copy link
Owner

fjc0k commented Aug 18, 2020

@henryzp 最好能给我一个可重现的 serverUrl,token,categories.id ,可私发我邮箱:fjc0kb#gmail.com

@henryzp
Copy link

henryzp commented Aug 18, 2020

额,serverUrl是内网的

@fjc0k
Copy link
Owner

fjc0k commented Aug 18, 2020

@henryzp 那可以把它的数据导一份出来 发我邮箱

@henryzp
Copy link

henryzp commented Aug 18, 2020

已发送

@fjc0k fjc0k closed this as completed in 82a5cbd Aug 24, 2020
@fjc0k
Copy link
Owner

fjc0k commented Aug 24, 2020

@Darkhorse-Fraternity @henryzp 试试最新版

@Darkhorse-Fraternity
Copy link
Author

@fjc0k ok

@henryzp
Copy link

henryzp commented Aug 26, 2020

让同事试了一下,没问题了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants