Comments (4)
Could you share the specifications of CreateProjectFromSfyun
operation (endpoint) as well as the specification of the object that you need to pass as data
?
From the exception I believe that this might be the signal of some validation issue (even if not nicely surfaced).
If you provide the specs I can try to have a look to at least provide guidance on what the underlying issue is
from bravado.
First of all, thank you for your reply, my swagger.json original file is relatively large, I have extracted the main part as follows, you can have a look, thank you for your help
{ "schemes": [], "swagger": "2.0", "info": { "description": "engineering api", "title": "engineering-api", "contact": { "name": "cjc" }, "license": { "name": "aiplat" }, "version": "1.0" }, "host": "127.0.0.0:8080", "basePath": "/", "paths": { "/v1/api/project/sfyun": { "post": { "description": "创建项目", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "project" ], "operationId": "CreateProjectFromSfyun", "parameters": [ { "description": "the project info", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.ProjectInfo" } } ], "responses": { "200": { "description": "ok", "schema": { "$ref": "#/definitions/model.Response" } }, "400": { "description": "bad request", "schema": { "$ref": "#/definitions/common.ApiHttpResponse" } }, "403": { "description": "permission denied", "schema": { "$ref": "#/definitions/common.ApiHttpResponse" } }, "500": { "description": "fail", "schema": { "$ref": "#/definitions/common.ApiHttpResponse" } } } } } }, "definitions": { "model.ProjectUser": { "type": "object", "properties": { "e_authority": { "description": "工程权限", "type": "boolean" }, "emp_name": { "description": "用户名", "type": "string" }, "emp_num": { "description": "用户工号", "type": "string" }, "p_authority": { "description": "工作流权限", "type": "boolean" }, "role_code": { "description": "用户角色", "type": "string" }, "s_authority": { "description": "沙盒权限", "type": "boolean" } } }, "model.ResPoolType": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-comments": { "DefaultResType": "默认资源池", "ExclusiveResType": "专属资源池", "PublicResType": "公共资源池" }, "x-enum-varnames": [ "DefaultResType", "PublicResType", "ExclusiveResType" ] }, "model.ResTag": { "type": "string", "enum": [ "cpu", "gpu", "memory", "disk" ], "x-enum-varnames": [ "CpuTag", "GpuTag", "MemoryTag", "DiskTag" ] }, "model.ResUsage": { "type": "string", "enum": [ "sandbox", "pipeline", "modelService", "disk" ], "x-enum-varnames": [ "SandboxRes", "PipelineRes", "ModelServiceRes", "DiskRes" ] }, "common.ApiHttpResponse": { "type": "object", "properties": { "code": { "description": "错误业务代码", "type": "integer" }, "error": { "description": "错误提示信息", "type": "string" }, "message": { "description": "错误详细信息", "type": "string" } } }, "model.Response": { "type": "object", "properties": { "code": { "type": "integer" }, "error": { "type": "string" }, "message": { "type": "string" } } }, "model.PvcInfo": { "type": "object", "properties": { "name": { "type": "string" }, "namespace": { "type": "string" } } }, "model.PackageInfo": { "type": "object", "properties": { "capacity": { "type": "integer" }, "id": { "type": "integer" }, "num": { "type": "integer" } } }, "model.AiProjectJuicefs": { "type": "object", "properties": { "ak_gw": { "type": "string" }, "capacity": { "description": "卷容量GB", "type": "integer" }, "desc_info": { "description": "卷描述", "type": "string" }, "id": { "description": "卷id", "type": "integer" }, "is_deleted": { "type": "integer" }, "package_id_list": { "type": "array", "items": { "$ref": "#/definitions/model.PackageInfo" } }, "project_id": { "description": "项目id", "type": "integer" }, "pvc_list": { "type": "array", "items": { "$ref": "#/definitions/model.PvcInfo" } }, "region": { "type": "string" }, "sk_gw": { "type": "string" }, "url_s3": { "type": "string" }, "used_space_byte": { "description": "已用空间", "type": "integer" }, "vol_name": { "description": "卷名", "type": "string" } } }, "model.ResPoolRefPackageInfo": { "type": "object", "properties": { "cpu": { "description": "资源池 汇总的CPU", "type": "integer" }, "gpu_a100": { "description": "资源池 汇总的GPUA100", "type": "integer" }, "gpu_v100": { "description": "资源池 汇总的GPUV100", "type": "integer" }, "label": { "description": "资源池包的label", "type": "string" }, "memory": { "description": "资源池 汇总的内存", "type": "integer" }, "model_name": { "description": "计价因子名称", "type": "string" }, "model_num": { "description": "该资源包中对应计价因子的数量", "type": "integer" }, "name": { "description": "资源池名称", "type": "string" }, "nas": { "description": "资源池 nas存储", "type": "integer" }, "num": { "description": "资源包数量* model数量计算的总的资源数量", "type": "integer" }, "package_id": { "description": "资源包名称", "type": "integer" }, "package_num": { "description": "资源包数量", "type": "integer" }, "pool_type": { "description": "资源类型:0 默认资源池 1 公共资源池 2 专属资源池", "allOf": [ { "$ref": "#/definitions/model.ResPoolType" } ] }, "price_model_id": { "description": "计价因子id", "type": "integer" }, "project_id": { "description": "项目id", "type": "integer" }, "res_pool_id": { "description": "ai_project_resource_pool表id", "type": "integer" }, "res_total_id": { "description": "ai_project_resource_total表id", "type": "integer" }, "resource_tag": { "description": "资源类型 disk, cpu, memory, gpu 4种", "allOf": [ { "$ref": "#/definitions/model.ResTag" } ] }, "resource_type": { "description": "资源类型 1 计算资源 2 存储资源", "type": "integer" }, "specs": { "description": "规格", "type": "string" }, "type": { "description": "资源池类型 0 默认 1 公共 2专属", "type": "integer" }, "usage": { "description": "使用方类型:sandbox 沙盒 pipeline 工作流 modelService 模型服务 4种", "allOf": [ { "$ref": "#/definitions/model.ResUsage" } ] } } }, "model.ResourceTotal": { "type": "object", "properties": { "id": { "type": "integer" }, "label": { "description": "指定包的使用label", "type": "string" }, "model_name": { "type": "string" }, "model_num": { "description": "包中对于的model数量", "type": "integer" }, "num": { "description": "资源包数量* model数量计算的总的资源数量", "type": "integer" }, "package_id": { "type": "integer" }, "package_num": { "description": "资源包数量", "type": "integer" }, "pool_type": { "description": "资源池类型:0 默认资源池 1 公共资源池 2 专属资源池", "allOf": [ { "$ref": "#/definitions/model.ResPoolType" } ] }, "price_model_id": { "description": "计价因子id", "type": "integer" }, "project_id": { "type": "integer" }, "resource_tag": { "description": "资源类型 disk, cpu, memory, gpu 4种", "allOf": [ { "$ref": "#/definitions/model.ResTag" } ] }, "resource_type": { "description": "资源类型 1 计算资源 2 存储资源", "type": "integer" }, "specs": { "description": "规格", "type": "string" }, "title": { "type": "string" }, "usage": { "description": "使用方类型:sandbox 沙盒 pipeline 工作流 modelService 模型服务 4种", "allOf": [ { "$ref": "#/definitions/model.ResUsage" } ] } } }, "model.ProjectResource": { "type": "object", "properties": { "package_info": { "description": "项目所包含的资源包信息", "type": "array", "items": { "$ref": "#/definitions/model.ResourceTotal" } }, "pool_ref_package": { "description": "资源池所包含的资源包信息", "type": "array", "items": { "$ref": "#/definitions/model.ResPoolRefPackageInfo" } }, "res_juicefs_volumes": { "description": "juicefs卷信息", "type": "array", "items": { "$ref": "#/definitions/model.AiProjectJuicefs" } } } }, "model.ProjectInfo": { "type": "object", "properties": { "description": { "type": "string" }, "disc": { "type": "integer" }, "disc_used": { "type": "integer" }, "e_cpu": { "type": "number" }, "e_gpu": { "type": "integer" }, "e_memory": { "type": "integer" }, "enableRecycle": { "type": "integer" }, "id": { "type": "integer" }, "idleTimeout": { "type": "integer" }, "image_count": { "type": "integer" }, "is_default": { "type": "integer" }, "m_cpu": { "type": "number" }, "m_gpu": { "type": "integer" }, "m_memory": { "type": "integer" }, "owner": { "type": "string" }, "p_cpu": { "type": "number" }, "p_gpu": { "type": "integer" }, "p_memory": { "type": "integer" }, "project_tag": { "description": "项目属性", "type": "string" }, "resource_package": { "description": "资源包", "allOf": [ { "$ref": "#/definitions/model.ProjectResource" } ] }, "s_cpu": { "type": "number" }, "s_gpu": { "type": "integer" }, "s_memory": { "type": "integer" }, "sf_sys_code": { "type": "string" }, "sys_code": { "type": "string" }, "title": { "type": "string" }, "users": { "type": "array", "items": { "$ref": "#/definitions/model.ProjectUser" } } } } } }
from bravado.
Could you share the specifications of
CreateProjectFromSfyun
operation (endpoint) as well as the specification of the object that you need to pass asdata
? From the exception I believe that this might be the signal of some validation issue (even if not nicely surfaced).If you provide the specs I can try to have a look to at least provide guidance on what the underlying issue is
You can check the message I sent above to see if it is what you need @macisamuele
from bravado.
this question like #490 ,so i close this one
from bravado.
Related Issues (20)
- Plans for an async-native version of Bravado? HOT 1
- Redirects should not be considered errors
- Content-Type in swagger spec is ignored HOT 1
- Question: How to increase connection pool? HOT 2
- SwaggerClient.from_url should have timeout HOT 2
- follow_redirects config option seems to have no effect HOT 2
- ValueError: Duplicate model found HOT 2
- Is SSL two-way authentication supported?
- OverflowError: timeout value is too large HOT 1
- Implement serialization protocol in SwaggerClient class? HOT 2
- Severe performance degradation in uWSGI preforking mode starting from v10.1.0 HOT 2
- Nanosecond datetime precision lost when SwaggerClient parses it HOT 1
- jsonschema 4.0.0 removes `compat` module HOT 6
- bravado.exception.HPPTFound 302 HOT 1
- About the problem of non-200 status code processing HOT 1
- About the request header, how to set multiple request header information, hope to get the answer, preferably covered with examples,thanks HOT 1
- I have a new problem, actually I'm the return value is a standard dictionary, in dealing with the dictionary and bravado, tip me en error HOT 13
- How do I make a request with a sanitizing name `async`? HOT 2
- Attempting to use as Accela client HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bravado.