[Repo Assist] eng: remove stale YamlDotNet dependency + test coverage for cookie params, text/plain and default responses#386
Merged
sergey-tihon merged 2 commits intomasterfrom Apr 18, 2026
Conversation
YamlDotNet was only used by the old v2 custom parser which was removed in PR #377. The paket.dependencies comment already said to delete it when the v2 parser was dropped. Microsoft.OpenApi.YamlReader (which uses SharpYaml internally) continues to handle YAML document parsing. All 281 unit tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…s (+6) Add unit tests for three previously untested OperationCompiler code paths: - Cookie parameters: verify that cookie params appear as method params, required cookies are non-optional, optional cookies are optional. - text/plain response: verify that an operation returning text/plain produces Task<string> (and Async<string> in async mode). - default response: verify that when no 2xx response is defined, the 'default' response is used to determine the return type. Total test count: 281 → 287. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes an unused YAML parsing dependency (left over from the removed v2 custom parser) and adds unit tests to cover previously untested OperationCompiler behaviors, strengthening confidence in the OpenAPI v3 compilation pipeline.
Changes:
- Drop the direct
YamlDotNetPaket dependency and reference entries now that YAML parsing is handled viaMicrosoft.OpenApi.YamlReader. - Update
paket.lockaccordingly (including updated GitHub-pinned commits forFSharp.TypeProviders.SDKandFSharp.Datafiles). - Add new unit tests covering cookie parameters,
text/plainresponses, anddefault-only success responses.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/SwaggerProvider.Tests/Schema.OperationCompilationTests.fs | Adds unit tests for cookie params, text/plain return typing, and default response return typing. |
| src/SwaggerProvider.DesignTime/paket.references | Removes the stale YamlDotNet reference from the DesignTime project. |
| paket.dependencies | Removes the stale YamlDotNet dependency entry (and its TODO comment). |
| paket.lock | Removes YamlDotNet from the resolved graph and updates pinned GitHub dependency commits. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
github-actions bot
added a commit
that referenced
this pull request
Apr 18, 2026
Capture the 9 PRs merged since beta01 (April 14 – April 18): - fix: preserve properties+additionalProperties (#383) - refactor: CallAsync returns HttpResponseMessage (#385) - eng: remove stale YamlDotNet dependency (#386) - test: +18 OperationCompiler tests (#380, #386) - docs: README and VitePress site updates (#379, #382) - ci: Dependabot action bumps (#387-#390) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Apr 18, 2026
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.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Two related code-quality improvements bundled together:
1. Remove stale
YamlDotNetdependencyYamlDotNetwas only used by the old v2 custom YAML parser. That parser was removed in PR #377. Thepaket.dependenciesfile even had an explicit comment:This PR finally honours that comment. YAML document parsing continues to work via
Microsoft.OpenApi.YamlReader(which usesSharpYamlinternally) — no functionality is lost.Changes:
nuget YamlDotNet(and its TODO comment) frompaket.dependenciesYamlDotNetfromsrc/SwaggerProvider.DesignTime/paket.referencespaket.lockis updated accordinglyAs a side-effect,
dotnet paket installalso picked up newer commits of the GitHub-sourcedFSharp.TypeProviders.SDKandFSharp.Datadependencies.2. Add test coverage for three untested
OperationCompilercode pathsThe
OperationCompilerhandles cookie parameters,text/plainresponses, anddefaultresponse codes, but none of these paths had unit tests. Six new tests are added:text/plainresponseTask<string>(task mode) andAsync<string>(async mode)defaultresponse as only success codedefaultentryTest count: 281 → 287.
Test Status
✅ Build: 0 errors, 211 warnings (all pre-existing)
✅ Unit tests: 287 passed, 0 failed, 1 skipped