Skip to content

Change default Guid format from 'guid' to 'uuid' per standard#1910

Open
lahma wants to merge 1 commit intoRicoSuter:masterfrom
lahma:fix/uuid-format-standard-1690
Open

Change default Guid format from 'guid' to 'uuid' per standard#1910
lahma wants to merge 1 commit intoRicoSuter:masterfrom
lahma:fix/uuid-format-standard-1690

Conversation

@lahma
Copy link
Copy Markdown
Collaborator

@lahma lahma commented Mar 8, 2026

Summary

  • Change the default format string for System.Guid from "guid" to "uuid" to match the JSON Schema and OpenAPI standard format registry
  • Mark JsonFormatStrings.Guid as [Obsolete] in favor of JsonFormatStrings.Uuid
  • Both GuidFormatValidator and UuidFormatValidator remain registered for backward compatibility — schemas using "guid" continue to validate correctly

Fixes #1690

Test plan

  • Schemas generated from System.Guid types now use "format": "uuid"
  • Existing "format": "guid" schemas still validate correctly
  • C# type resolver still maps both "guid" and "uuid" to System.Guid
  • Sample data generator handles both formats
  • All existing tests pass (410+ tests on net462)

🤖 Generated with Claude Code

…dard (RicoSuter#1690)

The JSON Schema and OpenAPI specifications define 'uuid' as the standard
format string. Mark JsonFormatStrings.Guid as obsolete in favor of Uuid.
Both formats continue to be accepted for backward compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.

Format "guid" vs "uuid"

1 participant