Skip to content

$comment field for property can be turned into JavaDoc #1197

Closed

Description

@markusjevringsesame

We use the $comment field a lot in our schemas, and it would be nice if the content of that was added as JavaDoc to the fields and setters, getters, withers, etc. Right now the only JavaDoc we get is (Required).

Activity

  1. eirnym commented on Feb 24, 2021

    @eirnym

    Hi there,

    It's a nice enchantment. Do you mind to make a PR for this?

  2. markusjevringsesame commented on Feb 25, 2021

    @markusjevringsesame
    ContributorAuthor

    I might be able to find some time.

  3. eirnym commented on Feb 25, 2021

    @eirnym

    Great! I'll be happy to add this feature into the core tool

  4. joelittlejohn commented on Feb 25, 2021

    @joelittlejohn
    Owner

    Yeah, sounds good to me.

    Check out TitleRule. Should be pretty easy to create a CommentRule 👍

  5. markusjevringsesame commented on Mar 11, 2021

    @markusjevringsesame
    ContributorAuthor

    @joelittlejohn @eirnym I'm getting this from the spec for draft-7 about the '$comment' field: "Implementations MUST NOT present this string to end users."
    https://tools.ietf.org/html/draft-handrews-json-schema-01#section-9

    I also realized that the 'description' field already works exactly the way I thought the '$comment' field worked. What's the recommendation here? Should I still raise a PR for supporting the '$comment' field (now that I finally started working on it it's pretty simple), or should the recommendation just be "use the description field"?

  6. eirnym commented on Mar 12, 2021

    @eirnym

    @markusjevringsesame later it's said explicitly on this field, that it MAY be translated to a comment, but it's optional.

  7. markusjevringsesame commented on Mar 12, 2021

    @markusjevringsesame
    ContributorAuthor

    @eirnym PR is up now: #1211

  8. added this to the 1.1.1 milestone on Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions