feat: add GoogleMapsApi.Templates dotnet new package (googlemaps-webapi)#310
Open
maximn wants to merge 1 commit into
Open
feat: add GoogleMapsApi.Templates dotnet new package (googlemaps-webapi)#310maximn wants to merge 1 commit into
maximn wants to merge 1 commit into
Conversation
Adds a third, lockstep-versioned NuGet package shipping a `dotnet new googlemaps-webapi` template that scaffolds a minimal ASP.NET Core Web API wired to IGoogleMapsClient with /geocode and /directions endpoints. - PackageType=Template package with no build output; templates/ tree packs under content/. - --apikey writes to the gitignored appsettings.Development.json; -f selects net8.0/net10.0. - A BeforeTargets=_GetPackageFiles target stamps the resolved MinVer version into the packed template.json so generated projects reference the matching GoogleMapsApi version. - Ships the gitignore as a non-dot file renamed on instantiation so template source files are tracked by git (and ship from a clean CI checkout). - Auto-published by the existing nuget.yml workflow (globs *.nupkg); added to the solution.
🔬 TestGlance✅ 212 passed across 1 job — 100.0% · ⏱️ 2.2s
🟡 build — details✅ 212 passed vs
Updated 2026-06-17T07:15:21.272Z |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a third, lockstep-versioned NuGet package —
GoogleMapsApi.Templates— that ships adotnet new googlemaps-webapitemplate so newcomers can scaffold a working, library-wired ASP.NET Core Web API in seconds.Related issue
n/a
Changes
GoogleMapsApi.Templatespackage (PackageType=Template, no build output) shipping thegooglemaps-webapitemplate: a minimal-API project with/geocodeand/directionsendpoints registered viaAddGoogleMaps(...), modeled on the existingsamples/MinimalApi.Directions.--apikeywrites the key into the gitignoredappsettings.Development.json(never the committedappsettings.json);-f net8.0|net10.0selects the target framework.BeforeTargets="_GetPackageFiles"MSBuild target stamps the resolved MinVer version into the packedtemplate.json, so every generated project references the exact matchingGoogleMapsApiversion with no manual bumps.gitignorerenamed to.gitignoreon instantiation, so template source files (incl.appsettings*.json) stay tracked by git and ship from a clean CI checkout; added the project toGoogleMapsApi.slnso the existingnuget.ymlworkflow (globs*.nupkg) auto-publishes it..agents/build-release-ci.mdandCLAUDE.mdupdated from "two packages" to "three".Test plan
dotnet new installed it, scaffolded for bothnet10.0andnet8.0, and confirmed correct token replacement, key isolated toappsettings.Development.json, the.gitignorerename, and that both generated projects build clean against the published2.4.0package.git check-ignorereports no template source file as ignored (CI-checkout safety).Checklist
dotnet formathas been run.dotnet testpasses locally (with a validGOOGLE_API_KEYfor integration tests).