1- using Microsoft . OpenApi . Any ;
2- using Microsoft . OpenApi . Models ;
1+ using Microsoft . OpenApi ;
32using OpenShock . Common . Models ;
43
54namespace OpenShock . Common . DataAnnotations ;
65
76public static class OpenApiSchemas
87{
9- public static OpenApiSchema SemVerSchema => new OpenApiSchema {
8+ public static OpenApiSchema SemVerSchema => new ( )
9+ {
1010 Title = "SemVer" ,
11- Type = "string" ,
12- Pattern = /* lang=regex */ "^(0|[1-9]\\ d*)\\ .(0|[1-9]\\ d*)\\ .(0|[1-9]\\ d*)(?:-((?:0|[1-9]\\ d*|\\ d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\ .(?:0|[1-9]\\ d*|\\ d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\ +([0-9a-zA-Z-]+(?:\ \ .[0-9a-zA-Z-]+)*))?$" ,
13- Example = new OpenApiString ( "1.0.0-dev+a16f2" )
11+ Type = JsonSchemaType . String ,
12+ Pattern = /* lang=regex */ @ "^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$",
13+ Example = "1.0.0-dev+a16f2"
1414 } ;
1515
16- public static OpenApiSchema PauseReasonEnumSchema => new OpenApiSchema {
16+ public static OpenApiSchema PauseReasonEnumSchema => new ( )
17+ {
1718 Title = nameof ( PauseReason ) ,
18- Type = "integer" ,
19+ Type = JsonSchemaType . Integer ,
1920 Description = """
2021 An integer representing the reason(s) for the shocker being paused, expressed as a bitfield where reasons are OR'd together.
2122
@@ -26,6 +27,6 @@ public static class OpenApiSchemas
2627
2728 For example, a value of 6 (2 | 4) indicates both 'UserShare' and 'PublicShare' reasons.
2829 """ ,
29- Example = new OpenApiInteger ( 6 )
30+ Example = 6
3031 } ;
3132}
0 commit comments