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

Supported policies in compiler #57

Open
37 of 64 tasks
Mielek opened this issue Jan 6, 2025 · 0 comments
Open
37 of 64 tasks

Supported policies in compiler #57

Mielek opened this issue Jan 6, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@Mielek
Copy link
Collaborator

Mielek commented Jan 6, 2025

Currently, the Policy Toolkit supports a limited set of policies in the compiler. We aim to extend this support to include all policies available in Azure API Management, as detailed in the documentation. The goal of this issue is to track the implementation of the remaining policies. The implementation of policies in the emulator will be tracked by other issues.

External contributors are warmly invited to participate in this issue. Your feedback is invaluable to us, and we encourage you to engage in the following ways:

  • Cast your vote in the comments on which policies should be prioritized next.
  • Share in the comments which policy are you interested in implementing to enhance our toolkit.
Implementation example

In the project we are now wanting to support only simple config-based policy implementation. Example of the implementation can be found for the json-to-xml policy.

Work plan:

  • Add method to the section context interfaces in which policy is available in the Authoring project
  • Add new compiler class in the src/Core/Compiling/Policy in the Core project
  • Add new test class in the test/Test.Core/Compiling in the Test.Core project
  • Prepare tests and fill compiler class

List of policies

Excluded policies

Please note that this initiative does not include the implementation of GraphQL resolver policies, as the creation of GraphQL policy documents is not yet supported. The development of these policies will be done once we introduce GraphQL policy document capabilities to the toolkit.

Workaround

InlinePolicy serves as a temporary solution until all policies are fully implemented. It enables the inclusion of policies that have not yet been incorporated into the document.

context.InlinePolicy("<set-backend-service base-url=\"https://internal.contoso.example\" />");

@Mielek Mielek added the enhancement New feature or request label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant