Closed kubukoz closed 1 year ago
I'm not sure I follow, you intentionally want to discard the documentation message: the struct
?
no, that doesn't exist in the original snippet.
I want this:
structure Hello {
/// the field
field: String
}
to be generated as:
/** @param field
* the field
*/
case class Hello(field: Option[String] = None)
because currently it's:
case class Hello(field: Option[String] = None)
(I'm 90% sure) This happens because the following code doesn't look at memberDocs
if there's no Documentation
trait on the struct:
ahhh I see, I missed the initial comment inside of Hello
.
(I'm 90% sure) This happens because the following code doesn't look at
memberDocs
if there's noDocumentation
trait on the struct:
Yeah I think this is correct, if shape.getTrait
returns an empty value we'll get a None. Not sure how to write out an elegant, if shape.getTrait.orElse(hasMemberTraits)
specifically for everything that is not a union
or a enum
or a collection
.
I can have a look into it
After #731, if you try to generate code from
then you get this:
However, if you add docs to
Hello
itself:then you get full-blown docs on the struct:
Expectation
I think the behavior with the original Smithy snippet should be that the struct gets this Scaladoc: