Skip to content

Commit

Permalink
fix enum name breaking in python SDK with directive (#31959)
Browse files Browse the repository at this point in the history
  • Loading branch information
msyyc authored Jan 2, 2025
1 parent 45374f4 commit b4144ee
Showing 1 changed file with 198 additions and 2 deletions.
200 changes: 198 additions & 2 deletions specification/recoveryservicesbackup/resource-manager/readme.python.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,201 @@ directive:
where: $.definitions.FeatureSupportRequest
transform: >
$['required'] = ['featureType'];
```
- from: swagger-document
where: $.definitions.OperationWorkerResponse.properties.statusCode
transform: >
$['x-ms-enum'] = {
"name": "HttpStatusCode",
"modelAsString": false,
"values": [
{
'name': 'CONTINUE_ENUM',
'value': 'Continue'
},
{
'name': 'SWITCHING_PROTOCOLS',
'value': 'SwitchingProtocols'
},
{
'name': 'OK',
'value': 'OK'
},
{
'name': 'CREATED',
'value': 'Created'
},
{
'name': 'ACCEPTED',
'value': 'Accepted'
},
{
'name': 'NON_AUTHORITATIVE_INFORMATION',
'value': 'NonAuthoritativeInformation'
},
{
'name': 'NO_CONTENT',
'value': 'NoContent'
},
{
'name': 'RESET_CONTENT',
'value': 'ResetContent'
},
{
'name': 'PARTIAL_CONTENT',
'value': 'PartialContent'
},
{
'name': 'MULTIPLE_CHOICES',
'value': 'MultipleChoices'
},
{
'name': 'AMBIGUOUS',
'value': 'Ambiguous'
},
{
'name': 'MOVED_PERMANENTLY',
'value': 'MovedPermanently'
},
{
'name': 'MOVED',
'value': 'Moved'
},
{
'name': 'FOUND',
'value': 'Found'
},
{
'name': 'REDIRECT',
'value': 'Redirect'
},
{
'name': 'SEE_OTHER',
'value': 'SeeOther'
},
{
'name': 'REDIRECT_METHOD',
'value': 'RedirectMethod'
},
{
'name': 'NOT_MODIFIED',
'value': 'NotModified'
},
{
'name': 'USE_PROXY',
'value': 'UseProxy'
},
{
'name': 'UNUSED',
'value': 'Unused'
},
{
'name': 'TEMPORARY_REDIRECT',
'value': 'TemporaryRedirect'
},
{
'name': 'REDIRECT_KEEP_VERB',
'value': 'RedirectKeepVerb'
},
{
'name': 'BAD_REQUEST',
'value': 'BadRequest'
},
{
'name': 'UNAUTHORIZED',
'value': 'Unauthorized'
},
{
'name': 'PAYMENT_REQUIRED',
'value': 'PaymentRequired'
},
{
'name': 'FORBIDDEN',
'value': 'Forbidden'
},
{
'name': 'NOT_FOUND',
'value': 'NotFound'
},
{
'name': 'METHOD_NOT_ALLOWED',
'value': 'MethodNotAllowed'
},
{
'name': 'NOT_ACCEPTABLE',
'value': 'NotAcceptable'
},
{
'name': 'PROXY_AUTHENTICATION_REQUIRED',
'value': 'ProxyAuthenticationRequired'
},
{
'name': 'REQUEST_TIMEOUT',
'value': 'RequestTimeout'
},
{
'name': 'CONFLICT',
'value': 'Conflict'
},
{
'name': 'GONE',
'value': 'Gone'
},
{
'name': 'LENGTH_REQUIRED',
'value': 'LengthRequired'
},
{
'name': 'PRECONDITION_FAILED',
'value': 'PreconditionFailed'
},
{
'name': 'REQUEST_ENTITY_TOO_LARGE',
'value': 'RequestEntityTooLarge'
},
{
'name': 'REQUEST_URI_TOO_LONG',
'value': 'RequestUriTooLong'
},
{
'name': 'UNSUPPORTED_MEDIA_TYPE',
'value': 'UnsupportedMediaType'
},
{
'name': 'REQUESTED_RANGE_NOT_SATISFIABLE',
'value': 'RequestedRangeNotSatisfiable'
},
{
'name': 'EXPECTATION_FAILED',
'value': 'ExpectationFailed'
},
{
'name': 'UPGRADE_REQUIRED',
'value': 'UpgradeRequired'
},
{
'name': 'INTERNAL_SERVER_ERROR',
'value': 'InternalServerError'
},
{
'name': 'NOT_IMPLEMENTED',
'value': 'NotImplemented'
},
{
'name': 'BAD_GATEWAY',
'value': 'BadGateway'
},
{
'name': 'SERVICE_UNAVAILABLE',
'value': 'ServiceUnavailable'
},
{
'name': 'GATEWAY_TIMEOUT',
'value': 'GatewayTimeout'
},
{
'name': 'HTTP_VERSION_NOT_SUPPORTED',
'value': 'HttpVersionNotSupported'
}
]
}
```

0 comments on commit b4144ee

Please sign in to comment.