diff --git a/CI/prepare_openapi_json.py b/CI/prepare_openapi_json.py index 5a3a9b5a669d23d8947348f3b579facaeb2438db..63d37cf6a33484a14c922f09923ed7f47cb5a400 100644 --- a/CI/prepare_openapi_json.py +++ b/CI/prepare_openapi_json.py @@ -6,11 +6,11 @@ if len(sys.argv) == 2: with open(sys.argv[1]) as f: fastapi = json.load(f) - # do not show "post" commands in user documentation + # do not show "post" or "patch" commands in user documentation paths = deepcopy(fastapi['paths']) for path in fastapi['paths'].keys(): for key in fastapi['paths'][path].keys(): - if (key == 'post'): + if (key == 'post' or key == 'patch'): paths[path].pop(key) # do not show "create" objects in user documentation diff --git a/docs/toardb_fastapi.md b/docs/toardb_fastapi.md index 3469362e280d2c34031b46ed0d7c2c1dec089ec2..fdc666cf50d3270f0b033cf9108e9bc133170a78 100644 --- a/docs/toardb_fastapi.md +++ b/docs/toardb_fastapi.md @@ -983,25 +983,6 @@ Get Stationmeta | 200 | Successful Response | | 422 | Validation Error | -#### PATCH -##### Summary: - -Patch Stationmeta Core - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ---- | -| station_code | path | | Yes | string | -| description | query | | Yes | string | - -##### Responses - -| Code | Description | -| ---- | ----------- | -| 200 | Successful Response | -| 422 | Validation Error | - ### /stationmeta_changelog/{station_id} #### GET @@ -1024,25 +1005,6 @@ Get Stationmeta Changelog ### /stationmeta/delete_field/{station_code} -#### PATCH -##### Summary: - -Patch Stationmeta Core - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ---- | -| station_code | path | | Yes | string | -| field | query | | Yes | string | - -##### Responses - -| Code | Description | -| ---- | ----------- | -| 200 | Successful Response | -| 422 | Validation Error | - ### /timeseries/ #### GET @@ -1084,25 +1046,6 @@ Get Timeseries | 200 | Successful Response | | 422 | Validation Error | -#### PATCH -##### Summary: - -Patch Timeseries - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ---- | -| timeseries_id | path | | Yes | integer | -| description | query | | Yes | string | - -##### Responses - -| Code | Description | -| ---- | ----------- | -| 200 | Successful Response | -| 422 | Validation Error | - ### /timeseries/unique/ #### GET @@ -1148,25 +1091,6 @@ Get Timeseries Changelog ### /timeseries/delete_field/{timeseries_id} -#### PATCH -##### Summary: - -Patch Timeseries - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ---- | -| timeseries_id | path | | Yes | integer | -| field | query | | Yes | string | - -##### Responses - -| Code | Description | -| ---- | ----------- | -| 200 | Successful Response | -| 422 | Validation Error | - ### /data/ #### GET @@ -1188,25 +1112,6 @@ Get All Data | 200 | Successful Response | | 422 | Validation Error | -#### PATCH -##### Summary: - -Patch Data - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ---- | -| description | query | | Yes | string | -| version | query | | Yes | string | - -##### Responses - -| Code | Description | -| ---- | ----------- | -| 200 | Successful Response | -| 422 | Validation Error | - ### /data/{timeseries_id} #### GET