Skip to content

Commit b1b2e88

Browse files
committed
Add and refine OpenAPI Schema annotations for better documentation
Added new annotations to various classes for improved OpenAPI documentation and updated existing ones with clearer descriptions or additional context. Removed redundant fields and unused annotations for cleaner code.
1 parent ebbfbfe commit b1b2e88

24 files changed

+77
-63
lines changed

gedcomx-model/src/main/java/org/gedcomx/Gedcomx.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@
9292
@JsonElementWrapper ( name = "gedcomx" )
9393
@JsonInclude ( JsonInclude.Include.NON_NULL )
9494
@XmlType ( name = "Gedcomx", propOrder = {"attribution", "persons", "relationships", "sourceDescriptions", "agents", "events", "places", "documents", "collections", "fields", "recordDescriptors"} )
95-
@Schema(name = "The GEDCOM X data formats define the serialization formats of the GEDCOM X conceptual model. The canonical documentation is provided by the formal specification documents:\n" +
96-
"\n" +
97-
"* [The GEDCOM X Conceptual Model, Version 1.0](https://github.com/FamilySearch/gedcomx/blob/master/specifications/conceptual-model-specification.md)\n" +
98-
"* [The GEDCOM X JSON Format, Version 1.0](https://github.com/FamilySearch/gedcomx/blob/master/specifications/json-format-specification.md)\n" +
99-
"* [The GEDCOM X XML Format, Version 1.0](https://github.com/FamilySearch/gedcomx/blob/master/specifications/xml-format-specification.md)")
95+
@Schema(name = "The GEDCOM X data formats define the serialization formats of the GEDCOM X conceptual model. The canonical documentation is provided by the formal specification documents:" +
96+
" [The GEDCOM X Conceptual Model, Version 1.0](https://github.com/FamilySearch/gedcomx/blob/master/specifications/conceptual-model-specification.md)" +
97+
" [The GEDCOM X JSON Format, Version 1.0](https://github.com/FamilySearch/gedcomx/blob/master/specifications/json-format-specification.md)" +
98+
" [The GEDCOM X XML Format, Version 1.0](https://github.com/FamilySearch/gedcomx/blob/master/specifications/xml-format-specification.md)" +
99+
"This documentation is provided as a non-normative reference guide.")
100100
public class Gedcomx extends HypermediaEnabledData implements HasFields {
101101

102102
@Schema(description = "The language of this genealogical data set. See http://www.w3.org/International/articles/language-tags/. " +
@@ -133,10 +133,6 @@ public class Gedcomx extends HypermediaEnabledData implements HasFields {
133133
@Schema(description = "The collections included in this genealogical data set.")
134134
private List<Collection> collections;
135135

136-
@Schema(description = "The extracted fields included in this genealogical data set. Fields that apply to a particular person,\n" +
137-
" * relationship or value should be included within that person or value, respectively.\n" +
138-
" * Remaining fields that did not have a place within the person or relationship structure can be included here.\n" +
139-
" * Also, fields that were extracted but not yet fit into a structure can also be included here.")
140136
private List<Field> fields;
141137

142138
@Schema(description = "The record descriptors included in this genealogical data set.")

gedcomx-model/src/main/java/org/gedcomx/agent/Address.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
* @author Ryan Heaton
2929
*/
3030
@XmlType ( name = "Address" )
31-
@Schema(description = "An address.")
31+
@Schema(description = "An Address.")
3232
public class Address extends ExtensibleData {
3333

3434
@Schema(description = "The city.")

gedcomx-model/src/main/java/org/gedcomx/agent/Agent.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@
5050
@XmlType ( name = "Agent" )
5151
@JsonElementWrapper ( name = "agents" )
5252
@JsonInclude ( JsonInclude.Include.NON_NULL )
53-
@Schema(description = "An agent, e.g. person, organization, or group. In genealogical research, an agent often takes the role of a contributor." +
54-
"\n@see [foaf:Agent](http://xmlns.com/foaf/spec/#term_Agent)")
53+
@Schema(description = "An agent, e.g. person, organization, or group. In genealogical research, an agent often takes the role of a contributor.")
5554
public class Agent extends HypermediaEnabledData {
5655

5756
@Schema(description = "The list of names for the agent.")

gedcomx-model/src/main/java/org/gedcomx/agent/OnlineAccount.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class OnlineAccount extends ExtensibleData {
3333
@Schema(description = "The homepage of the service that provides this account.")
3434
private ResourceReference serviceHomepage;
3535

36-
@Schema(description = "The name associated with this account.")
36+
@Schema(description = "The name associated the holder of this account with the account.")
3737
private String accountName;
3838

3939
public OnlineAccount() {

gedcomx-model/src/main/java/org/gedcomx/common/ExtensibleData.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public abstract class ExtensibleData implements SupportsExtensionElements, HasTr
3838
@Schema(description = "Custom extension elements for a conclusion.")
3939
protected List<Object> extensionElements;
4040

41-
@Schema(description = "Transient properties that are not to be serialized.")
4241
protected final Map<String, Object> transientProperties = new TreeMap<String, Object>();
4342

4443
protected ExtensibleData() {

gedcomx-model/src/main/java/org/gedcomx/common/Note.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
@Schema(description = "A note about a genealogical resource (e.g. conclusion or source).")
4444
public class Note extends HypermediaEnabledData implements Attributable, HasText {
4545

46-
@Schema(description = "The language of the note.")
46+
@Schema(description = "The language of the note. See http://www.w3.org/International/articles/language-tags/")
4747
private String lang;
4848

4949
@Schema(description = "The subject of the note. This is a short title describing the contents of the note text.")

gedcomx-model/src/main/java/org/gedcomx/common/ResourceReference.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
@Schema(description = "A generic reference to a resource.")
4141
public final class ResourceReference {
4242

43-
@Schema(description = "The URI to the resource being referenced.")
43+
@Schema(description = "The URI to the resource. For more information, see Architecture of the World Wide Web, Volume One, Section 2")
4444
private URI resource;
4545

4646
@Schema(description = "The resource id of the resource being referenced. Used as an extension attribute when resolving the resource is inconvenient.")

gedcomx-model/src/main/java/org/gedcomx/common/TextValue.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
@Schema(description = "An element representing a text value that may be in a specific language.")
3535
public class TextValue {
3636

37-
@Schema(description = "The language of the text value.")
37+
@Schema(description = "The language of the text value. See http://www.w3.org/International/articles/language-tags/")
3838
private String lang;
3939

4040
@Schema(description = "The text value.")

gedcomx-model/src/main/java/org/gedcomx/conclusion/Date.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public class Date extends ExtensibleData implements HasFields {
6464
"GEDCOM X core, but as extension elements by GEDCOM X RS.")
6565
private List<TextValue> normalized;
6666

67-
@Schema(description = "The references to the record fields being used as evidence.")
6867
private List<Field> fields;
6968

7069
public Date() {

gedcomx-model/src/main/java/org/gedcomx/conclusion/Fact.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ public class Fact extends Conclusion implements HasDateAndPlace, HasFields {
6767
@Schema(description = "The qualifiers associated with this fact.")
6868
private List<Qualifier> qualifiers;
6969

70-
@Schema(description = "The references to the record fields being used as evidence.")
7170
private List<Field> fields;
7271

7372
@Schema(description = "Indicator of whether this fact is the \"primary\" fact of the record from which the subject was extracted. " +

0 commit comments

Comments
 (0)