Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Oct 1, 2025

  • Add new properties DataValue and SerializedValue to IOpenApiExample interface
  • Add new properties DataValue and SerializedValue to OpenApiExample class
  • Add constants for field names to OpenApiConstants
  • Update OpenApiExample constructor to copy new properties
  • Update SerializeInternal to serialize new fields:
    • For v3.2+: serialize as native fields
    • For v3.1 and earlier: serialize as extensions with x-oai- prefix
  • Add deserialization support in V32 deserializer for native fields
  • Add deserialization support in V31/V3 deserializers for x-oai- extensions
  • Create tests for serialization and deserialization
  • Update public API export file
  • Run all tests to ensure no regressions
  • Rewrite test assertions to use Assert methods instead of FluentAssertions
  • Add unit tests for V3 (OpenAPI 3.0) with extension support

Summary

Added support for dataValue and serializedValue fields to OpenApiExample as defined in OAI 3.2.0:

  • In OAI 3.2+: These fields are serialized as native properties
  • In OAI 3.1 and earlier: These fields are serialized as extensions with x-oai- prefix
  • Full serialization and deserialization support across all OpenAPI versions (3.0, 3.1, 3.2)
  • Comprehensive test coverage with Assert methods
  • All 1,318 tests pass successfully
Original prompt

This section details on the original issue you should resolve

<issue_title>OpenAPiExample - adds support for data and serialized value</issue_title>
<issue_description>OAI 3.2.0 defined two new fields for OpenAPI example

  • dataValue (JsonNode?)
  • serializedvalue (string?)

We should add fields for to the model, and support for serialization/deserialization.

In 3.1.0 these fields should be serialized with an x-oai- prefix, making them extensions.</issue_description>

<agent_instructions>make sure you update the public api export</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Fixes #12

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] OpenAPiExample - adds support for data and serialized value Add support for dataValue and serializedValue in OpenApiExample Oct 1, 2025
@Copilot Copilot AI requested a review from baywet October 1, 2025 01:51
Copilot finished work on behalf of baywet October 1, 2025 01:51
Copy link

@baywet baywet left a comment

Choose a reason for hiding this comment

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

@copilot also add unit tests in test\Microsoft.OpenApi.Readers.Tests\V3Tests\OpenApiExampleTests.cs

Copy link
Author

Copilot AI commented Oct 1, 2025

@copilot also add unit tests in test\Microsoft.OpenApi.Readers.Tests\V3Tests\OpenApiExampleTests.cs

Added two unit tests for dataValue and serializedValue in V3Tests/OpenApiExampleTests.cs in commit 688fcc5. These tests verify deserialization of the x-oai- prefixed extension fields for OpenAPI 3.0.

@Copilot Copilot AI requested a review from baywet October 1, 2025 12:44
Copilot finished work on behalf of baywet October 1, 2025 12:44
@baywet baywet marked this pull request as ready for review October 1, 2025 13:03
@baywet baywet enabled auto-merge October 1, 2025 13:03
@baywet baywet merged commit bb156b8 into feat/oai-3-2-support Oct 1, 2025
6 checks passed
@baywet baywet deleted the copilot/fix-74a1e771-9ced-4ec8-9483-9ee135a0c31b branch October 1, 2025 13:51
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.

OpenAPiExample - adds support for data and serialized value

3 participants