Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ public static Symbol getPluginSymbol(PythonSettings settings) {
public static Symbol getServiceError(PythonSettings settings) {
return Symbol.builder()
.name("ServiceError")
.namespace(format("%s.errors", settings.moduleName()), ".")
.definitionFile(format("./%s/errors.py", settings.moduleName()))
.namespace(format("%s.models", settings.moduleName()), ".")
.definitionFile(format("./%s/models.py", settings.moduleName()))
.build();
}

Expand All @@ -123,8 +123,8 @@ public static Symbol getServiceError(PythonSettings settings) {
public static Symbol getApiError(PythonSettings settings) {
return Symbol.builder()
.name("ApiError")
.namespace(format("%s.errors", settings.moduleName()), ".")
.definitionFile(format("./%s/errors.py", settings.moduleName()))
.namespace(format("%s.models", settings.moduleName()), ".")
.definitionFile(format("./%s/models.py", settings.moduleName()))
.build();
}

Expand All @@ -140,8 +140,8 @@ public static Symbol getApiError(PythonSettings settings) {
public static Symbol getUnknownApiError(PythonSettings settings) {
return Symbol.builder()
.name("UnknownApiError")
.namespace(format("%s.errors", settings.moduleName()), ".")
.definitionFile(format("./%s/errors.py", settings.moduleName()))
.namespace(format("%s.models", settings.moduleName()), ".")
.definitionFile(format("./%s/models.py", settings.moduleName()))
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,12 @@ class $1L($2T):

${7C|}

${8C|}

""", symbol.getName(), apiError, code, fault,
writer.consumer(w -> writeClassDocs(true)),
writer.consumer(w -> writeProperties()),
writer.consumer(w -> generateSerializeMethod()),
writer.consumer(w -> generateDeserializeMethod()));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,7 @@ private Symbol genericEnum(Shape shape) {
@Override
public Symbol structureShape(StructureShape shape) {
String name = getDefaultShapeName(shape);
var file = shape.hasTrait(ErrorTrait.class) ? "errors" : SHAPES_FILE;
return createGeneratedSymbolBuilder(shape, name, file).build();
return createGeneratedSymbolBuilder(shape, name, SHAPES_FILE).build();
}

@Override
Expand Down
Loading