Forum Discussion

jshowalter's avatar
jshowalter
Occasional Contributor
4 years ago
Solved

Are readonly and writeonly implemented for Java code generation?

Last year, we added readOnly in api.json for a service, invoked the CLI via io.swagger.codegen.SwaggerCodegen, and it didn't work.

We wound up having to fork the code and make changes to OpenAPIDeserializer, ModelDeserializer, CodegenProperty, and DefaultCodegen to get it to work, which seemed weird.

We'd love to be able to unfork that code.

  • It's natively supported. We were using an old version. It turns out we don't need to fork anything.

1 Reply

  • jshowalter's avatar
    jshowalter
    Occasional Contributor

    It's natively supported. We were using an old version. It turns out we don't need to fork anything.