Skip to content

Creating snippet for shared model/bean #762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hasnainjaved opened this issue Nov 18, 2021 · 1 comment
Closed

Creating snippet for shared model/bean #762

hasnainjaved opened this issue Nov 18, 2021 · 1 comment
Labels
for: stack-overflow Question that is better suited to Stack Overflow status: invalid Suggestion or bug report that we don't feel is valid

Comments

@hasnainjaved
Copy link

Is it possible to generate snippet for a nested bean shared between different response structures ?

Address model:

class Address {
 String state;
 Integer postcode;
}

Response from endpoint 1 (R1)

{
  "status": 1,
  "address": {
    "state": "abc",
    "postcode": 3
  }
}

Response from endpoint 2 (R2)

{
  "id": 2,
  "currentAddress": {
    "state": "abc",
    "postcode": 2
  }
}

I would like to generate the snippet for Address model once and reuse it in generated snippets for R1 and R2. Currently the snippet for address is generated multiple times. The docs have a section for reusing a snippet but not sure if that would create a .adoc snippet under a separate path/folder

Posted a question on Stackoverflow 3 months ago but did not get any response.

It's somewhat similar to issue #745 and would be nice to have the ability to create a common section for documenting shared models/beans

@wilkinsona
Copy link
Member

I've posted an answer on Stack Overflow.

@wilkinsona wilkinsona added for: stack-overflow Question that is better suited to Stack Overflow status: invalid Suggestion or bug report that we don't feel is valid and removed status: waiting-for-triage Untriaged issue labels Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: stack-overflow Question that is better suited to Stack Overflow status: invalid Suggestion or bug report that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants