- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for openapi_content (0.19 sec)
-
docs_src/generate_clients/tutorial004.py
import json from pathlib import Path file_path = Path("./openapi.json") openapi_content = json.loads(file_path.read_text()) for path_data in openapi_content["paths"].values(): for operation in path_data.values(): tag = operation["tags"][0] operation_id = operation["operationId"] to_remove = f"{tag}-" new_operation_id = operation_id[len(to_remove) :] operation["operationId"] = new_operation_id
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Mar 04 22:02:18 UTC 2022 - 493 bytes - Viewed (0) -
docs_src/generate_clients/tutorial004.js
import * as fs from 'fs' async function modifyOpenAPIFile(filePath) { try { const data = await fs.promises.readFile(filePath) const openapiContent = JSON.parse(data) const paths = openapiContent.paths for (const pathKey of Object.keys(paths)) { const pathData = paths[pathKey] for (const method of Object.keys(pathData)) { const operation = pathData[method] if (operation.tags && operation.tags.length > 0) {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 14 11:40:05 UTC 2024 - 1K bytes - Viewed (0)