Update documentation.

This commit is contained in:
2026-03-28 17:42:37 +05:30
parent 01662f7e0e
commit 79b120ff91
25 changed files with 109 additions and 109 deletions

View File

@@ -1,4 +1,4 @@
"""EKIKA Odoo API Framework Direct collection generator.
"""EKIKA Odoo API Framework - Direct collection generator.
Generates complete Postman-style collections from the EKIKA api_framework module
without requiring any AI API calls. All URL patterns, body formats, auth headers,
@@ -87,7 +87,7 @@ def _env_vars(instance_url: str, auth_type: str, extra: dict = None) -> dict:
def _clean_endpoint(endpoint: str) -> str:
"""Normalise endpoint slug ensure leading slash, strip trailing slash."""
"""Normalise endpoint slug - ensure leading slash, strip trailing slash."""
ep = endpoint.strip().strip("/")
return f"/{ep}" if ep else "/api"
@@ -281,7 +281,7 @@ def _build_jsonapi_endpoints(base_ep: str, model: str, headers: dict,
if "Get Fields" in operations:
eps.append({
"name": f"Get Fields {model}",
"name": f"Get Fields - {model}",
"method": "GET",
"path": f"{ep_path}/fields_get",
"headers": {**headers, "Accept": ct},
@@ -295,7 +295,7 @@ def _build_jsonapi_endpoints(base_ep: str, model: str, headers: dict,
if "Check Access Rights" in operations:
eps.append({
"name": f"Check Access {model}",
"name": f"Check Access - {model}",
"method": "GET",
"path": f"{ep_path}/check_access_rights",
"headers": {**headers, "Accept": ct},
@@ -405,7 +405,7 @@ def _build_restjson_endpoints(base_ep: str, model: str, headers: dict,
if "Get Fields" in operations:
eps.append({
"name": f"Get Fields {model}",
"name": f"Get Fields - {model}",
"method": "GET",
"path": f"{ep_path}/fields_get",
"headers": {**headers},
@@ -442,7 +442,7 @@ def _build_graphql_endpoints(base_ep: str, model: str, headers: dict,
f"}}"
)
eps.append({
"name": f"GraphQL List {model}",
"name": f"GraphQL - List {model}",
"method": "POST",
"path": path,
"headers": {**headers, "Content-Type": ct},
@@ -465,7 +465,7 @@ def _build_graphql_endpoints(base_ep: str, model: str, headers: dict,
f"}}"
)
eps.append({
"name": f"GraphQL Get {model} by ID",
"name": f"GraphQL - Get {model} by ID",
"method": "POST",
"path": path,
"headers": {**headers, "Content-Type": ct},
@@ -491,7 +491,7 @@ def _build_graphql_endpoints(base_ep: str, model: str, headers: dict,
f"}}"
)
eps.append({
"name": f"GraphQL Create {model}",
"name": f"GraphQL - Create {model}",
"method": "POST",
"path": path,
"headers": {**headers, "Content-Type": ct},
@@ -518,7 +518,7 @@ def _build_graphql_endpoints(base_ep: str, model: str, headers: dict,
f"}}"
)
eps.append({
"name": f"GraphQL Update {model}",
"name": f"GraphQL - Update {model}",
"method": "POST",
"path": path,
"headers": {**headers, "Content-Type": ct},
@@ -539,7 +539,7 @@ def _build_graphql_endpoints(base_ep: str, model: str, headers: dict,
f"}}"
)
eps.append({
"name": f"GraphQL Delete {model}",
"name": f"GraphQL - Delete {model}",
"method": "POST",
"path": path,
"headers": {**headers, "Content-Type": ct},
@@ -587,7 +587,7 @@ def generate_collection(
all_endpoints += _build_restjson_endpoints(base_ep, model, headers, operations)
elif api_kind == "GraphQL":
all_endpoints += _build_graphql_endpoints(base_ep, model, headers, operations)
else: # Custom REST JSON same as REST JSON
else: # Custom REST JSON - same as REST JSON
all_endpoints += _build_restjson_endpoints(base_ep, model, headers, operations)
# Build URLs using {{base_url}} variable
@@ -595,7 +595,7 @@ def generate_collection(
if not ep["path"].startswith("http"):
ep["url"] = f"{{{{base_url}}}}{ep['path']}"
name = collection_name or f"EKIKA Odoo {api_kind} {', '.join(models[:3])}"
name = collection_name or f"EKIKA Odoo - {api_kind} - {', '.join(models[:3])}"
return {
"collection_name": name,