Skip to content

docs: document IgnoreParseErrors parameter in OpenApiClientProvider.md#312

Merged
sergey-tihon merged 2 commits intorepo-assist/eng-ignore-parse-errors-2026-03-04c43dcd71f7a2a4from
copilot/sub-pr-300
Mar 11, 2026
Merged

docs: document IgnoreParseErrors parameter in OpenApiClientProvider.md#312
sergey-tihon merged 2 commits intorepo-assist/eng-ignore-parse-errors-2026-03-04c43dcd71f7a2a4from
copilot/sub-pr-300

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

The IgnoreParseErrors static parameter added to OpenApiClientProvider was missing from the documentation.

Changes

  • Parameters table – added IgnoreParseErrors row describing its behaviour (emit stderr warnings instead of failing on parse errors, default false)
  • New section – "Non-Strictly-Compliant Schemas (IgnoreParseErrors)" covering the motivation (e.g. NSwag schemas with nullable: true at the parameter level), a usage example, and a caution about trusting the schema source
// Schema with non-standard annotations (e.g. NSwag-generated)
type MyApi = OpenApiClientProvider<"https://example.com/swagger.json", IgnoreParseErrors=true>

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: sergey-tihon <1197905+sergey-tihon@users.noreply.github.com>
Copilot AI changed the title [WIP] Add IgnoreParseErrors parameter to OpenApiClientProvider docs: document IgnoreParseErrors parameter in OpenApiClientProvider.md Mar 11, 2026
@sergey-tihon sergey-tihon marked this pull request as ready for review March 11, 2026 06:25
Copilot AI review requested due to automatic review settings March 11, 2026 06:25
@sergey-tihon sergey-tihon merged commit cb94668 into repo-assist/eng-ignore-parse-errors-2026-03-04c43dcd71f7a2a4 Mar 11, 2026
17 checks passed
@sergey-tihon sergey-tihon deleted the copilot/sub-pr-300 branch March 11, 2026 06:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the OpenApiClientProvider documentation to include the newly added IgnoreParseErrors static parameter, clarifying how to handle non-strict OpenAPI schemas while still generating a client.

Changes:

  • Added IgnoreParseErrors to the parameters table with default and behavior details.
  • Added a dedicated section explaining when/why to use IgnoreParseErrors, including an example and cautionary note.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

sergey-tihon added a commit that referenced this pull request Mar 11, 2026
#300)

* Add IgnoreParseErrors static parameter to OpenApiClientProvider

Allow users to continue generating the type provider even when
Microsoft.OpenApi reports schema validation errors. This is useful
for non-strictly-compliant schemas (e.g. NSwag-generated schemas with
'nullable: true' at the parameter level, as reported in issue #261).

When IgnoreParseErrors=true the validation errors are printed to
stderr as warnings instead of aborting the type provider. Default
remains false (existing strict behaviour is unchanged).

Also relax global.json SDK constraint from exact 10.0.103 to
latestPatch rollForward from 10.0.100, so the build works with any
available 10.0.x SDK patch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* docs: document IgnoreParseErrors parameter in OpenApiClientProvider.md (#312)

* Initial plan

* docs: add IgnoreParseErrors parameter to OpenApiClientProvider.md

Co-authored-by: sergey-tihon <1197905+sergey-tihon@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sergey-tihon <1197905+sergey-tihon@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Sergey Tihon <sergey.tihon@gmail.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sergey-tihon <1197905+sergey-tihon@users.noreply.github.com>
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.

3 participants