When I use the python-type-codegen plugin with the echo sample it does not generate any models at all (whereas python-client-codegen seems to work fine for the same model)
smithy-build.json:
{
"version": "1.0",
"sources": ["model"],
"maven": {
"dependencies": [
"software.amazon.smithy:smithy-model:[1.54.0,2.0)",
"software.amazon.smithy:smithy-aws-traits:[1.54.0,2.0)",
"software.amazon.smithy.python.codegen:core:0.0.1",
"software.amazon.smithy.python.codegen.plugins:types:0.0.1"
]
},
"projections": {
"client": {
"plugins": {
"python-client-codegen": {
"service": "com.example#EchoService",
"module": "echo",
"moduleVersion": "0.0.1"
},
"python-type-codegen": {
"service": "com.example#EchoService",
"module": "echo",
"moduleVersion": "0.0.1"
}
}
}
}
}
model/main.smithy:
$version: "2.0"
namespace com.example
use aws.protocols#restJson1
@restJson1
service EchoService {
version: "2025-09-01"
operations: [EchoMessage]
}
@http(uri: "/echo", method: "POST")
operation EchoMessage {
input := {
message: String
}
output := {
message: String
}
}
contents of model/build/smithy/client/python-type-codegen/src/echo/models.py:
# Code generated by smithy-python-codegen DO NOT EDIT.
from smithy_core.exceptions import ModeledError
class ServiceError(ModeledError):
"""Base error for all errors in the service.
Some exceptions do not extend from this class, including
synthetic, implicit, and shared exception types.
"""
Is there something I'm missing?
When I use the
python-type-codegenplugin with the echo sample it does not generate any models at all (whereaspython-client-codegenseems to work fine for the same model)smithy-build.json:
model/main.smithy:
contents of
model/build/smithy/client/python-type-codegen/src/echo/models.py:Is there something I'm missing?