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

feat: Add dotnet custom template for project and policy boostraping #83

Merged
merged 4 commits into from
Jan 24, 2025

Conversation

Mielek
Copy link
Collaborator

@Mielek Mielek commented Jan 24, 2025

Closes #72

Installation:
dotnet new install Azure.ApiManagement.PolicyToolkit.Templates

Success: Azure.ApiManagement.PolicyToolkit.Templates::0.0.1 installed the following templates:
Template Name                                          Short Name             Language  Tags
-----------------------------------------------------  ---------------------  --------  ---------------------------
Azure API Management Policy Toolkit solution template  policytoolkitsolution  [C#]      Solution/Policy Toolkit
Policy Toolkit Policy Class                            policytoolkitclass     [C#]      Policy Toolkit/Policy/Class

Added two templates

  1. Solution template - creates a solution with source and test projects. Adds creates dotnet-tools.json with compiler. This template does not contain any template parameters
  2. Policy class template - creates class for policy. Allows file and class rename. It can generate section methods e.g. dotnet new policytoolkitclass --name=SomeApiPolicy --Sections=Inbound --Sections=Outbound

Also closes #22 as integration will be done with the existing APIM VS Code extension and templates here should enable easy creation of solution and policy class there.

@Mielek Mielek merged commit d8a32a8 into main Jan 24, 2025
4 checks passed
@Mielek Mielek deleted the mielek/template branch January 24, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide custom dotnet new template for project bootstraping VS Code Extension
2 participants