Skip to content

feat: add TOML v1.0 serialization support#2828

Open
Thyago-Oliveira-Perez wants to merge 1 commit intomicrosoft:mainfrom
Thyago-Oliveira-Perez:feature/toml-feature
Open

feat: add TOML v1.0 serialization support#2828
Thyago-Oliveira-Perez wants to merge 1 commit intomicrosoft:mainfrom
Thyago-Oliveira-Perez:feature/toml-feature

Conversation

@Thyago-Oliveira-Perez
Copy link
Copy Markdown

   Adds OpenApiTomlWriter (mirrors OpenApiJsonWriter / OpenApiYamlWriter),
   a new OpenApiConstants.Toml constant, and SerializeAsTomlAsync extension
   methods so callers can export an OpenAPI document as TOML.

   Public API declared in PublicAPI.Unshipped.txt; RS0026 suppressed for
   consistency with existing SerializeAsJson/YamlAsync overloads.

Pull Request

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Related Issue(s)

Changes Made

  • Added OpenApiTomlWriter to support writing OpenAPI documents in TOML format
  • Introduced OpenApiConstants.Toml constant
  • Added SerializeAsTomlAsync extension methods (string and stream overloads)
  • Integrated TOML into existing SerializeAsync format selection
  • Declared new public APIs in PublicAPI.Unshipped.txt
  • Suppressed RS0026 for consistency with existing JSON/YAML serialization methods
  • Added unit tests covering TOML writer behavior and serialization

Testing

Checklist

  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Versions applicability

  • My change applies to the version 1.X of the library, if so PR link:
  • My change applies to the version 2.X of the library, if so PR link:
  • My change applies to the version 3.X of the library, if so PR link:
  • I have evaluated the applicability of my change against the other versions above.

See the contributing guidelines for more information about how patches are applied across multiple versions.

Additional Notes

       Adds OpenApiTomlWriter (mirrors OpenApiJsonWriter / OpenApiYamlWriter),
       a new OpenApiConstants.Toml constant, and SerializeAsTomlAsync extension
       methods so callers can export an OpenAPI document as TOML.

       Public API declared in PublicAPI.Unshipped.txt; RS0026 suppressed for
       consistency with existing SerializeAsJson/YamlAsync overloads.
@Thyago-Oliveira-Perez Thyago-Oliveira-Perez requested a review from a team as a code owner April 17, 2026 00:52
@Thyago-Oliveira-Perez
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

1 participant