Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
weidongxu-microsoft committed Nov 28, 2024
1 parent 76d2e08 commit daa4853
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,10 @@ private SwaggerExceptionDefinitions getSwaggerExceptionDefinitions(Operation ope
}
}

if (swaggerDefaultExceptionType == null && !CoreUtils.isNullOrEmpty(operation.getExceptions())
// m4 could return Response without schema, when the Swagger uses e.g. "produces: [ application/x-rdp ]"
if (swaggerDefaultExceptionType == null
&& settings.isBranded()
&& !CoreUtils.isNullOrEmpty(operation.getExceptions())
&& operation.getExceptions().get(0).getSchema() != null) {
// no default error, use the 1st to keep backward compatibility
swaggerDefaultExceptionType = processExceptionClassType(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ public TypeSpecPlugin(EmitterOptions options, boolean sdkIntegration) {
SETTINGS_MAP.put("license-header", "SMALL_TYPESPEC");

SETTINGS_MAP.put("sync-methods", "sync-only");
SETTINGS_MAP.put("default-http-exception-type", "io.clientcore.core.http.exception.HttpResponseException");
SETTINGS_MAP.put("use-default-http-status-code-to-exception-type-mapping", false);
SETTINGS_MAP.put("generate-samples", false);
SETTINGS_MAP.put("generate-tests", false);
Expand Down

0 comments on commit daa4853

Please sign in to comment.