Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Commit

Permalink
handle "filed" uid in MemberModel.java to avoid duplicate uid excepti…
Browse files Browse the repository at this point in the history
…on in docfx
  • Loading branch information
anmeng10101 committed Oct 19, 2020
1 parent d2cd520 commit 68f63ba
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 10 deletions.
8 changes: 7 additions & 1 deletion src/main/java/com/microsoft/model/sdp/file/MemberModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@ public MemberModel(String uid, MetadataFileItem item, String outputPath) {

}


/**
* This method is used to build model for "filed".
* In order to avoid duplicate uid in docfx and align with method/constructor,
* add '*' to the end of uid for root level as well.
*/
public MemberModel(MetadataFileItem item, String outputPath) {
super(item.getUid(), item.getName());
super(String.format("%s%s", item.getUid(), '*'), item.getName());
this.outputPath = outputPath;
this.setFullName(item.getFullName());
this.setNameWithType(item.getNameWithType());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### YamlMime:JavaMember
uid: "com.microsoft.samples.SuperHero.SOME_PUBLIC_STRING"
uid: "com.microsoft.samples.SuperHero.SOME_PUBLIC_STRING*"
fullName: "com.microsoft.samples.SuperHero.SOME_PUBLIC_STRING"
name: "SOME_PUBLIC_STRING"
nameWithType: "SuperHero.SOME_PUBLIC_STRING"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### YamlMime:JavaMember
uid: "com.microsoft.samples.subpackage.HttpStatusCode.BADREQUEST"
uid: "com.microsoft.samples.subpackage.HttpStatusCode.BADREQUEST*"
fullName: "com.microsoft.samples.subpackage.HttpStatusCode.BADREQUEST"
name: "BADREQUEST"
nameWithType: "HttpStatusCode.BADREQUEST"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### YamlMime:JavaMember
uid: "com.microsoft.samples.subpackage.HttpStatusCode.CONFLICT"
uid: "com.microsoft.samples.subpackage.HttpStatusCode.CONFLICT*"
fullName: "com.microsoft.samples.subpackage.HttpStatusCode.CONFLICT"
name: "CONFLICT"
nameWithType: "HttpStatusCode.CONFLICT"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### YamlMime:JavaMember
uid: "com.microsoft.samples.subpackage.HttpStatusCode.EXPECTATIONFAILED"
uid: "com.microsoft.samples.subpackage.HttpStatusCode.EXPECTATIONFAILED*"
fullName: "com.microsoft.samples.subpackage.HttpStatusCode.EXPECTATIONFAILED"
name: "EXPECTATIONFAILED"
nameWithType: "HttpStatusCode.EXPECTATIONFAILED"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### YamlMime:JavaMember
uid: "com.microsoft.samples.subpackage.HttpStatusCode.FORBIDDEN"
uid: "com.microsoft.samples.subpackage.HttpStatusCode.FORBIDDEN*"
fullName: "com.microsoft.samples.subpackage.HttpStatusCode.FORBIDDEN"
name: "FORBIDDEN"
nameWithType: "HttpStatusCode.FORBIDDEN"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### YamlMime:JavaMember
uid: "com.microsoft.samples.subpackage.HttpStatusCode.NOTFOUND"
uid: "com.microsoft.samples.subpackage.HttpStatusCode.NOTFOUND*"
fullName: "com.microsoft.samples.subpackage.HttpStatusCode.NOTFOUND"
name: "NOTFOUND"
nameWithType: "HttpStatusCode.NOTFOUND"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### YamlMime:JavaMember
uid: "com.microsoft.samples.subpackage.HttpStatusCode.SERVICEUNAVAILABLE"
uid: "com.microsoft.samples.subpackage.HttpStatusCode.SERVICEUNAVAILABLE*"
fullName: "com.microsoft.samples.subpackage.HttpStatusCode.SERVICEUNAVAILABLE"
name: "SERVICEUNAVAILABLE"
nameWithType: "HttpStatusCode.SERVICEUNAVAILABLE"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### YamlMime:JavaMember
uid: "com.microsoft.samples.subpackage.HttpStatusCode.UNAUTHORIZED"
uid: "com.microsoft.samples.subpackage.HttpStatusCode.UNAUTHORIZED*"
fullName: "com.microsoft.samples.subpackage.HttpStatusCode.UNAUTHORIZED"
name: "UNAUTHORIZED"
nameWithType: "HttpStatusCode.UNAUTHORIZED"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### YamlMime:JavaMember
uid: "com.microsoft.samples.subpackage.Person.age"
uid: "com.microsoft.samples.subpackage.Person.age*"
fullName: "com.microsoft.samples.subpackage.Person<T>.age"
name: "age"
nameWithType: "Person<T>.age"
Expand Down

0 comments on commit 68f63ba

Please sign in to comment.