创建物料
开发中
POST
/components
请求参数
Body 参数application/json
object {0}
示例
{
"component": {
"type": "component",
"projectName": "asd",
"projectVersion": "1.0.0",
"projectTemplate": "@js-cli/react-component",
"componentDescription": "sadsad",
"name": "asd",
"className": "asd",
"version": "1.0.0",
"description": "sadsad",
"buildPath": "dist",
"examplePath": "example/dist",
"npmName": "@js-cli/react-component",
"npmVersion": "1.0.3",
"exampleList": [
"index.html"
],
"exampleRealPath": "/Users/gjs/Desktop/test1/example/dist"
},
"git": {
"remote": "git@github.com:GongJS/asd.git",
"version": "1.0.0",
"branch": "dev/1.0.0",
"login": "GongJS",
"owner": "user"
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://material.ooaaoo.top/api/v1/components' \
--header 'Content-Type: application/json' \
--data-raw '{
"component": {
"type": "component",
"projectName": "asd",
"projectVersion": "1.0.0",
"projectTemplate": "@js-cli/react-component",
"componentDescription": "sadsad",
"name": "asd",
"className": "asd",
"version": "1.0.0",
"description": "sadsad",
"buildPath": "dist",
"examplePath": "example/dist",
"npmName": "@js-cli/react-component",
"npmVersion": "1.0.3",
"exampleList": [
"index.html"
],
"exampleRealPath": "/Users/gjs/Desktop/test1/example/dist"
},
"git": {
"remote": "git@github.com:GongJS/asd.git",
"version": "1.0.0",
"branch": "dev/1.0.0",
"login": "GongJS",
"owner": "user"
}
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{}