Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbranded CodeGen should generate error models instead of reusing the model from core library #5183

Open
Tracked by #5203
lirenhe opened this issue Nov 27, 2024 · 0 comments
Assignees
Labels
v3 Version 3 of AutoRest C# generator.

Comments

@lirenhe
Copy link
Member

lirenhe commented Nov 27, 2024

Describe the issue or request
Need to generate the error model from the following definition:

@error
model ApiError {
  /** A machine readable error code */
  code: string;

  /** A human readable message */
  // https://github.com/microsoft/OpenAPI/blob/main/extensions/x-ms-primary-error-message.md
  @OpenAPI.extension("x-ms-primary-error-message", true)
  message: string;
}

Please also verify we could map the error by status code correctly.

model Standard4XXResponse extends ApiError {
  @minValue(400)
  @maxValue(499)
  @statusCode
  statusCode: int32;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 Version 3 of AutoRest C# generator.
Projects
None yet
Development

No branches or pull requests

4 participants