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

fix: bad request body simple in propertykey.md #135

Merged
merged 1 commit into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 47 additions & 39 deletions content/cn/docs/clients/restful-api/propertykey.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,9 @@ POST http://localhost:8080/graphs/hugegraph/schema/propertykeys

```json
{
"property_key" : {
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE"
},
"task_id": 0
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be a mistake to treat the request body as the response body, since the "task_id" response format was changed in version 0.12, could you also please update Response Body.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for remind, done.

}
```

Expand All @@ -50,12 +47,20 @@ POST http://localhost:8080/graphs/hugegraph/schema/propertykeys

```json
{
"id": 2,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"properties": [],
"user_data": {}
"property_key": {
"id": 1,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"aggregate_type": "NONE",
"write_type": "OLTP",
"properties": [],
"status": "CREATED",
"user_data": {
"~create_time": "2022-05-13 13:47:23.745"
}
},
"task_id": 0
}
```

Expand All @@ -75,14 +80,11 @@ PUT http://localhost:8080/graphs/hugegraph/schema/propertykeys/age?action=append

```json
{
"property_key" : {
"name": "age",
"user_data": {
"min": 0,
"max": 100
}
},
"task_id" : 0
"name": "age",
"user_data": {
"min": 0,
"max": 100
}
}
```

Expand All @@ -96,15 +98,22 @@ PUT http://localhost:8080/graphs/hugegraph/schema/propertykeys/age?action=append

```json
{
"id": 2,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"properties": [],
"user_data": {
"min": 0,
"max": 100
}
"property_key": {
"id": 1,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"aggregate_type": "NONE",
"write_type": "OLTP",
"properties": [],
"status": "CREATED",
"user_data": {
"min": 0,
"max": 100,
"~create_time": "2022-05-13 13:47:23.745"
}
},
"task_id": 0
}
```

Expand Down Expand Up @@ -207,12 +216,19 @@ GET http://localhost:8080/graphs/hugegraph/schema/propertykeys/age

```json
{
"id": 2,
"id": 1,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"aggregate_type": "NONE",
"write_type": "OLTP",
"properties": [],
"user_data": {}
"status": "CREATED",
"user_data": {
"min": 0,
"max": 100,
"~create_time": "2022-05-13 13:47:23.745"
}
}
```

Expand All @@ -236,14 +252,6 @@ DELETE http://localhost:8080/graphs/hugegraph/schema/propertykeys/age

```json
{
"property_key" : {
"id": 2,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"properties": [],
"user_data": {}
},
"task_id" : 0
}
```
86 changes: 47 additions & 39 deletions content/en/docs/clients/restful-api/propertykey.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,9 @@ POST http://localhost:8080/graphs/hugegraph/schema/propertykeys

```json
{
"property_key" : {
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE"
},
"task_id": 0
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE"
}
```

Expand All @@ -50,12 +47,20 @@ POST http://localhost:8080/graphs/hugegraph/schema/propertykeys

```json
{
"id": 2,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"properties": [],
"user_data": {}
"property_key": {
"id": 1,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"aggregate_type": "NONE",
"write_type": "OLTP",
"properties": [],
"status": "CREATED",
"user_data": {
"~create_time": "2022-05-13 13:47:23.745"
}
},
"task_id": 0
}
```

Expand All @@ -75,14 +80,11 @@ PUT http://localhost:8080/graphs/hugegraph/schema/propertykeys/age?action=append

```json
{
"property_key" : {
"name": "age",
"user_data": {
"min": 0,
"max": 100
}
},
"task_id" : 0
"name": "age",
"user_data": {
"min": 0,
"max": 100
}
}
```

Expand All @@ -96,15 +98,22 @@ PUT http://localhost:8080/graphs/hugegraph/schema/propertykeys/age?action=append

```json
{
"id": 2,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"properties": [],
"user_data": {
"min": 0,
"max": 100
}
"property_key": {
"id": 1,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"aggregate_type": "NONE",
"write_type": "OLTP",
"properties": [],
"status": "CREATED",
"user_data": {
"min": 0,
"max": 100,
"~create_time": "2022-05-13 13:47:23.745"
}
},
"task_id": 0
}
```

Expand Down Expand Up @@ -207,12 +216,19 @@ GET http://localhost:8080/graphs/hugegraph/schema/propertykeys/age

```json
{
"id": 2,
"id": 1,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"aggregate_type": "NONE",
"write_type": "OLTP",
"properties": [],
"user_data": {}
"status": "CREATED",
"user_data": {
"min": 0,
"max": 100,
"~create_time": "2022-05-13 13:47:23.745"
}
}
```

Expand All @@ -236,14 +252,6 @@ DELETE http://localhost:8080/graphs/hugegraph/schema/propertykeys/age

```json
{
"property_key" : {
"id": 2,
"name": "age",
"data_type": "INT",
"cardinality": "SINGLE",
"properties": [],
"user_data": {}
},
"task_id" : 0
}
```