Skip to content
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

Feat : Schema reuse through subschema #246

Merged
merged 5 commits into from
Sep 25, 2023

Conversation

xeromank
Copy link
Contributor

@xeromank xeromank commented Sep 7, 2023

Summary

  • Schema reuse through subschema

Story

  • Issue
  • Hey, I'm back again. I'm still grateful to you.
  • I hope this PR provides an answer to the link above.
  • Of course, this pr is not the finished result. I haven't checked the part about the array object yet.

Changes

  • After investigating the completed schema, if the name of the subschema is defined.
  • If the name of the subschema is defined, define a separate schema and connect it through $ref().

Thanks

  • First of all, please review it in general.
  • If you like it, please drop me a comment.
  • After that, I will check the part about Array Object and proceed with the work.
  • Finally, I'm not proficient in English, so I wrote this text using a translation tool. Please keep that in mind.

Thank you!!

@xeromank
Copy link
Contributor Author

@ozscheyge Please check this pull request

Copy link
Contributor

@ozscheyge ozscheyge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, @xeromank ! Two minor style issues.

FieldDescriptor("post.shippingAddress", "some", "OBJECT", attributes = Attributes(schemaName = "Address")),
FieldDescriptor("post.shippingAddress.firstName", "some", "STRING"),
FieldDescriptor("post.shippingAddress.valid", "some", "BOOLEAN"),
FieldDescriptor("post.billingAddress", "some", "OBJECT", attributes = Attributes(schemaName = "Address")),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking this for future reference on how to use the feature.

@ozscheyge ozscheyge merged commit 437d7da into ePages-de:master Sep 25, 2023
1 check passed
Kieun pushed a commit to Kieun/restdocs-api-spec that referenced this pull request Nov 3, 2023
* feat : Input a name for the subschema

* feat : Input a name for the subschema

* feat : Make sub schema

* fix: lint

* fix: requested & Suggested

(cherry picked from commit 437d7da)
wodrobina pushed a commit that referenced this pull request Mar 4, 2024
* Update version number in README

* fix: better management of numbers in OpenApi3Generator (#202)

Co-authored-by: Jordan GAZEAU <jordan.gazeau@soprabanking.com>

* Add project status notice (#209)

* Add project status notice

* Add link to maintenance issue

* Upgrade gradlew to 7.4.2 (#214)

* Fix extracting standard scope claim in OAuth2 JWT (#218)

fixes #217
This fixes does not break current implementation of treating scope claim as List<String>

* Fix broken security definition reference from security requirement for OAuth2 (#220)

Fixes #219

* Make classes in restdocs-api-spec modules visible (#223)

Fixes #222

* Polish README.md (#227)

(cherry picked from commit 213f9e4)

* docs: update FieldDescriptors example (#232)

* docs: update FieldDescriptors example

* docs: add new symbol for java

(cherry picked from commit 26cd0dd)

* feat: add support for contact object (#208)

* feat: add support for contact object

Closes #88

* docs: add documentation on how to define contacts

(cherry picked from commit 2842c43)

* Tabs to spaces

(cherry picked from commit 2f5d1e2)

* Drop usage of TravisCI (#236)

GH-235

(cherry picked from commit 0b5d511)

* Add GitHub Actions and Sonar support (#237)

GH-235

(cherry picked from commit ac1600f)

* Increase MaxMetaspaceSize

(cherry picked from commit 1688a77)

* ci: fix publish script name

(cherry picked from commit 47f2173)

* ci: ignore samples for code coverage report (#239)

(cherry picked from commit 4893605)

* docs: update readme [skip ci] (#238)

GH-235

(cherry picked from commit de0c1ab)

* feat: apply field optional (#244)

* feat: apply field optional

* fix lint

(cherry picked from commit 4c735ca)

* Feat : apply optional is nullable (#245)

* feat: apply optional is nullable

* chore: refactoring

* chore: remove needless

* fix deprecated

* fix for test

(cherry picked from commit 2900374)

* Feat : Schema reuse through subschema (#246)

* feat : Input a name for the subschema

* feat : Input a name for the subschema

* feat : Make sub schema

* fix: lint

* fix: requested & Suggested

(cherry picked from commit 437d7da)

* Fix to get regexp properly from the pattern constraint (#247)

(cherry picked from commit c631886)

* Keep supporting 0.16.x train to support Spring Boot 2.7.x and cherry-pick the latest features and fixes.

---------

Co-authored-by: Oliver Zscheyge <o.zscheyge@epages.com>
Co-authored-by: Jojo <45284640+jgazeau@users.noreply.github.com>
Co-authored-by: Jordan GAZEAU <jordan.gazeau@soprabanking.com>
Co-authored-by: Jan Mewes <jan.mewes@ks-plus.org>
Co-authored-by: Oliver <ozscheyge@users.noreply.github.com>
Co-authored-by: Johnny Lim <izeye@naver.com>
Co-authored-by: Taeyang Jin (Heli) <sun@dataportal.kr>
Co-authored-by: Marcos Paulo Belasco de Almeida <me@marcosalmeida.dev>
Co-authored-by: Jan Mewes <jan.mewes@epages.com>
Co-authored-by: Xeroman.K <81915068+xeromank@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants