Replies: 2 comments 2 replies
-
|
+1 for the suggested changes. Instead of using Internal Architecture, better to use How it works or Policy Execution Flow/Model or similar thing. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
We should also include the YAML section that needs to be included in the build.yaml section. eg: - name: add-headers
gomodule: github.com/wso2/gateway-controllers/policies/add-headers@v0Ref: build.yaml disucssion: #875 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem:
The policy documentation within this repository lacks a standardized structure, which negatively impacts readability, discoverability, and long-term maintainability.
Configuration-related content is particularly fragmented, appearing under disparate headings such as Parameters, User Parameters (API Definition), System Parameters (config.toml), and Policy Parameters, with no clear or consistent distinction between user-facing and system-level configuration.
Example content is presented under varying section titles, including API Definition Examples, Examples, and MCP Proxy Definition Examples.
Proposed Solution:
Adopt a standardized documentation structure for policy docs. Establishing and aligning on such a standard would improve documentation consistency, ease of navigation, and contributor onboarding. This should explicitly specify:
Document Structure
Every policy doc follows this 9-section structure. Required sections must always be present; optional sections are included only when they add value.
Why have optional sections:
Simple policies (e.g., add-headers, remove-headers) don’t require architectural or operational sections; optional sections keep documentation concise and focused while complex policies (e.g., semantic-cache, model-round-robin) might benefit from architectural, performance, and operational detail without imposing that overhead universally.
A fixed set of core sections guarantees baseline completeness, while optional sections allow depth only where it meaningfully adds value.
Template
Overview: <!-- Explains what the policy does, what problem it solves. --> Features: - <!-- Feature 1 --> - <!-- Feature 2 --> - <!-- ... --> Configuration: - User Parameters (API Definition) <!-- Use when params are set per-API/route --> - System Parameters (Comes from config.toml) <!-- Use when the policy has gateway-level configuration --> Reference Scenarios: <!-- Sample Use Case 1 --> <!-- Sample Use Case 2 --> Internal Architecture: <!-- Optional. Include this section only if the internal operation requires explanation. --> Limitations: <!-- OPTIONAL. --> - <!-- Limitation 1 --> - <!-- Limitation 2 --> Notes: <!-- OPTIONAL. Consolidate best practices, security tips, performance guidance, troubleshooting here. --> - <!-- Note 1 --> - <!-- Note 2 --> Related Policies <!-- OPTIONAL. --> - [Related Policy Name](../related-policy/v0.1/docs/related.md)Migration Path for Existing Docs
## How It Works## Internal Architecture## Use Cases## Examples## Error Handling/## Error Response## Examples## Request/Response Flow Examples## Examples## Policy Behavior## Notesor## Internal Architecture## Best Practices## Notes## Security Considerations## Notes## Performance Considerations## Notes## Troubleshooting## Notes## System Configuration Example## Configuration## JSONPath Support)## ConfigurationBeta Was this translation helpful? Give feedback.
All reactions