Conversation
…ing NJsonSchema checkout - Add docs/plan_v15.md describing the v15 scope, dependency on NJsonSchema v12, development workflow (UseLocalNJsonSchemaProjects=true), branch model, release plan, CI setup, and pre-release cleanup checklist - Add docs/changelog_v15.md as the running landed-changes log and v14 → v15 migration guide (starts empty with structural placeholders for planned PR #5355 and NJsonSchema v12 cascaded changes) - Add v15 to OnPullRequestBranches / OnPushBranches in build/Build.CI.GitHubActions.cs and the regenerated workflow YAMLs - Hand-edit both workflow YAMLs to clone RicoSuter/NJsonSchema@v12 as a sibling directory before build, so project references in UseLocalNJsonSchemaProjects=true mode resolve on CI (the clone step will be reverted when NUKE regenerates the YAMLs at v15 → master merge time; see cleanup checklist in plan_v15.md)
Pulled from PR #5355 so the v15 integration branch can build against local NJsonSchema v12 source immediately, validating the sibling-checkout CI setup end-to-end rather than waiting for the STJ migration PR to land. - Directory.Build.props: new UseLocalNJsonSchemaProjects property, default true on v15 - 8 csprojs get a pair of conditional ItemGroup blocks (ProjectReference when UseLocalNJsonSchemaProjects=true, PackageReference otherwise): NSwag.Core, NSwag.Core.Yaml, NSwag.CodeGeneration, NSwag.CodeGeneration.CSharp, NSwag.CodeGeneration.TypeScript, NSwag.Generation, NSwag.AspNet.WebApi, NSwag.CodeGeneration.Tests Verified locally: NSwag.Core, NSwag.CodeGeneration.CSharp, and NSwag.Generation all build clean with ProjectReference resolving to ../NJsonSchema/src/... Pre-release cleanup updated in plan_v15.md and this change noted in changelog_v15.md.
- Project Overview: what NSwag is, its distribution channels, NJsonSchema dep - Cross-check with NJsonSchema: direction of change, when NSwag work needs NJsonSchema awareness (extension/overrides, API limitations, spec keyword parity, dependency bumping during v15) - Supported spec targets: Swagger 2.0 / OpenAPI 3.0.x / OpenAPI 3.1, with a note that master is 3.0-oriented and v15 completes 3.1 support - Build and test, high-level architecture by project layer, v15 branch conventions, repo-wide settings (TreatWarningsAsErrors, strong-naming, artifacts output, ImplicitUsings/LangVersion) - Code style conventions (analyzer policy, no abbreviations, CRLF, AAA tests) - Git rule: no AI attribution in commits / PRs / comments
CI was failing with MSB3030 during NSwag.ConsoleCore publish: "Could not copy the file .../NJsonSchema/artifacts/bin/.../release_net8.0/ NJsonSchema.dll because it was not found." Root cause: with UseArtifactsOutput=true on both repos, MSBuild's Configuration=Release property does not reliably propagate across the repo boundary when NSwag builds NJsonSchema project references transitively. NJsonSchema ends up compiled to artifacts/bin/*/debug_* while NSwag expects release_* for the --no-build publish step, so publish fails. Fix: add an explicit pre-build step after the sibling NJsonSchema clone that runs 'dotnet build NJsonSchema.sln -c Release' in ../NJsonSchema. The Release artifacts are then present when NSwag's build invokes dotnet publish --no-build. Doc updated in plan_v15.md with the rationale.
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
Starter PR for the NSwag v15 major release. Establishes plan + changelog docs and makes CI actually run against
v15, including the temporary sibling NJsonSchema v12 checkout needed whileUseLocalNJsonSchemaProjects=trueis the default.docs/plan_v15.md— v15 scope (STJ migration Migrate NSwag core to System.Text.Json (v15) - [WIP] #5355, absorbing NJsonSchema v12 breaking changes, opportunistic cleanups), dependency on NJsonSchema v12 during development, CI setup, branch model (master = v14.x stable, v15 = integration), release plan (NJsonSchema v12 first, then NSwag v15), and pre-release cleanup checklist.docs/changelog_v15.md— running list of landed changes and v14 → v15 migration guide with placeholder sections for planned work.v15added toOnPullRequestBranchesandOnPushBranchesinbuild/Build.CI.GitHubActions.csand the regenerated workflow YAMLs.git clone --depth 1 --branch v12 https://github.com/RicoSuter/NJsonSchema.git ../NJsonSchemain bothbuild.ymlandpr.yml(all three OS jobs in each), so theUseLocalNJsonSchemaProjects=trueproject references resolve on CI.The sibling-checkout step is a deliberate hand edit; running NUKE to regenerate the workflows would remove it. This is intentional — the step only makes sense while v15 builds against local NJsonSchema v12, and will be regenerated away when v15 switches to package references. See the Pre-release cleanup checklist in
plan_v15.md.Open PR #5355 is already retargeted to
v15and will start receiving CI once this merges.Test plan
v15triggersbuild.yml; the clone step successfully fetches NJsonSchemav12; the build succeeds against local project references.v15triggerspr.ymlwith the same clone step.nuke --generate-configuration GitHubActions_build --host GitHubActionsand theprequivalent) updates the branch filter but removes the clone step, matching the documented expectation.Companion
NJsonSchema starter PR #1924 sets up the corresponding
v12branch, plan doc (plan_v12.md), changelog (changelog_v12.md), and CI triggers on that side.