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

Commit

Permalink
Merge pull request #47 from docascode/addQuotes
Browse files Browse the repository at this point in the history
enable double quotes for yaml contents
  • Loading branch information
anmeng10101 authored Sep 4, 2020
2 parents 3f98e48 + 7e3e9a0 commit f0581e7
Show file tree
Hide file tree
Showing 131 changed files with 2,334 additions and 2,333 deletions.
1 change: 0 additions & 1 deletion src/main/java/com/microsoft/util/YamlUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ protected Remark initialValue() {
private static final ObjectMapper mapper = new ObjectMapper(new YAMLFactory()
.disable(Feature.WRITE_DOC_START_MARKER)
.disable(Feature.SPLIT_LINES)
.enable(YAMLGenerator.Feature.MINIMIZE_QUOTES)
)
.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false)
.setSerializationInclusion(Include.NON_NULL)
Expand Down
12 changes: 12 additions & 0 deletions src/test/java/com/microsoft/samples/SuperHero.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,16 @@ private void setHobby(String hobby) {
String getHobby() {
return hobby;
}

/**
* Returns a FileStoreAttributeView of the given type.
* <p>
* This method always returns null as no {@link FileStoreAttributeView} is currently supported.
*
* @param aClass a class
* @return null
*/
public <V extends Class> V ReturnNull(Class<V> aClass) {
return null;
}
}
26 changes: 13 additions & 13 deletions src/test/java/com/microsoft/util/YamlUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ public void objectToYamlString() {

assertThat("Wrong result", result, is(""
+ "items:\n"
+ "- uid: Some uid 3\n"
+ " id: Some id3\n"
+ " href: Some href3\n"
+ " type: method\n"
+ "- uid: \"Some uid 3\"\n"
+ " id: \"Some id3\"\n"
+ " href: \"Some href3\"\n"
+ " type: \"method\"\n"
+ " syntax:\n"
+ " parameters:\n"
+ " - description: Some desc 3\n"
+ " name: Some name 3\n"
+ " type: <xref href=\"Some type 3?alt=Some type 3&text=Some type 3\" data-throw-if-not-resolved=\"False\" />\n"
+ " - description: \"Some desc 3\"\n"
+ " name: \"Some name 3\"\n"
+ " type: \"<xref href=\\\"Some type 3?alt=Some type 3&text=Some type 3\\\" data-throw-if-not-resolved=\\\"False\\\" />\"\n"
+ "references:\n"
+ "- uid: Some uid 5\n"
+ " id: Some id5\n"
+ " href: Some href5\n"
+ "- uid: \"Some uid 5\"\n"
+ " id: \"Some id5\"\n"
+ " href: \"Some href5\"\n"
+ " syntax:\n"
+ " parameters:\n"
+ " - description: Some desc 5\n"
+ " name: Some name 5\n"
+ " type: <xref href=\"Some type 5?alt=Some type 5&text=Some type 5\" data-throw-if-not-resolved=\"False\" />\n"));
+ " - description: \"Some desc 5\"\n"
+ " name: \"Some name 5\"\n"
+ " type: \"<xref href=\\\"Some type 5?alt=Some type 5&text=Some type 5\\\" data-throw-if-not-resolved=\\\"False\\\" />\"\n"));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
### YamlMime:JavaMember
uid: com.microsoft.samples.BasePartnerComponent.BasePartnerComponent*
fullName: com.microsoft.samples.BasePartnerComponent<TContext>.BasePartnerComponent
name: BasePartnerComponent
nameWithType: BasePartnerComponent<TContext>.BasePartnerComponent
uid: "com.microsoft.samples.BasePartnerComponent.BasePartnerComponent*"
fullName: "com.microsoft.samples.BasePartnerComponent<TContext>.BasePartnerComponent"
name: "BasePartnerComponent"
nameWithType: "BasePartnerComponent<TContext>.BasePartnerComponent"
members:
- uid: com.microsoft.samples.BasePartnerComponent.BasePartnerComponent(com.microsoft.samples.IPartner,TContext)
fullName: com.microsoft.samples.BasePartnerComponent<TContext>.BasePartnerComponent(IPartner rootPartnerOperations, TContext componentContext)
name: BasePartnerComponent(IPartner rootPartnerOperations, TContext componentContext)
nameWithType: BasePartnerComponent<TContext>.BasePartnerComponent(IPartner rootPartnerOperations, TContext componentContext)
summary: Initializes a new instance of the BasePartnerComponent class.
- uid: "com.microsoft.samples.BasePartnerComponent.BasePartnerComponent(com.microsoft.samples.IPartner,TContext)"
fullName: "com.microsoft.samples.BasePartnerComponent<TContext>.BasePartnerComponent(IPartner rootPartnerOperations, TContext componentContext)"
name: "BasePartnerComponent(IPartner rootPartnerOperations, TContext componentContext)"
nameWithType: "BasePartnerComponent<TContext>.BasePartnerComponent(IPartner rootPartnerOperations, TContext componentContext)"
summary: "Initializes a new instance of the BasePartnerComponent class."
parameters:
- description: The root partner operations that created this component.
name: rootPartnerOperations
type: <xref href="com.microsoft.samples.IPartner?alt=com.microsoft.samples.IPartner&text=IPartner" data-throw-if-not-resolved="False" />
- description: A component context object to work with.
name: componentContext
type: <xref href="TContext?alt=TContext&text=TContext" data-throw-if-not-resolved="False" />
syntax: protected BasePartnerComponent(IPartner rootPartnerOperations, TContext componentContext)
type: constructor
- description: "The root partner operations that created this component."
name: "rootPartnerOperations"
type: "<xref href=\"com.microsoft.samples.IPartner?alt=com.microsoft.samples.IPartner&text=IPartner\" data-throw-if-not-resolved=\"False\" />"
- description: "A component context object to work with."
name: "componentContext"
type: "<xref href=\"TContext?alt=TContext&text=TContext\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected BasePartnerComponent(IPartner rootPartnerOperations, TContext componentContext)"
type: "constructor"
metadata: {}
package: com.microsoft.samples
package: "com.microsoft.samples"
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
### YamlMime:JavaMember
uid: com.microsoft.samples.BasePartnerComponent.testBase*
fullName: com.microsoft.samples.BasePartnerComponent<TContext>.testBase
name: testBase
nameWithType: BasePartnerComponent<TContext>.testBase
uid: "com.microsoft.samples.BasePartnerComponent.testBase*"
fullName: "com.microsoft.samples.BasePartnerComponent<TContext>.testBase"
name: "testBase"
nameWithType: "BasePartnerComponent<TContext>.testBase"
members:
- uid: com.microsoft.samples.BasePartnerComponent.testBase()
fullName: com.microsoft.samples.BasePartnerComponent<TContext>.testBase()
name: testBase()
nameWithType: BasePartnerComponent<TContext>.testBase()
syntax: protected void testBase()
type: method
- uid: "com.microsoft.samples.BasePartnerComponent.testBase()"
fullName: "com.microsoft.samples.BasePartnerComponent<TContext>.testBase()"
name: "testBase()"
nameWithType: "BasePartnerComponent<TContext>.testBase()"
syntax: "protected void testBase()"
type: "method"
metadata: {}
package: com.microsoft.samples
package: "com.microsoft.samples"
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
### YamlMime:JavaMember
uid: com.microsoft.samples.BasePartnerComponent.testInherited*
fullName: com.microsoft.samples.BasePartnerComponent<TContext>.testInherited
name: testInherited
nameWithType: BasePartnerComponent<TContext>.testInherited
uid: "com.microsoft.samples.BasePartnerComponent.testInherited*"
fullName: "com.microsoft.samples.BasePartnerComponent<TContext>.testInherited"
name: "testInherited"
nameWithType: "BasePartnerComponent<TContext>.testInherited"
members:
- uid: com.microsoft.samples.BasePartnerComponent.testInherited()
fullName: com.microsoft.samples.BasePartnerComponent<TContext>.testInherited()
name: testInherited()
nameWithType: BasePartnerComponent<TContext>.testInherited()
syntax: protected void testInherited()
type: method
- uid: "com.microsoft.samples.BasePartnerComponent.testInherited()"
fullName: "com.microsoft.samples.BasePartnerComponent<TContext>.testInherited()"
name: "testInherited()"
nameWithType: "BasePartnerComponent<TContext>.testInherited()"
syntax: "protected void testInherited()"
type: "method"
metadata: {}
package: com.microsoft.samples
package: "com.microsoft.samples"
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
### YamlMime:JavaType
uid: com.microsoft.samples.BasePartnerComponent
fullName: com.microsoft.samples.BasePartnerComponent<TContext>
name: BasePartnerComponent<TContext>
nameWithType: BasePartnerComponent<TContext>
summary: Holds common partner component properties and behavior. All components should inherit from this class. The context object type.
uid: "com.microsoft.samples.BasePartnerComponent"
fullName: "com.microsoft.samples.BasePartnerComponent<TContext>"
name: "BasePartnerComponent<TContext>"
nameWithType: "BasePartnerComponent<TContext>"
summary: "Holds common partner component properties and behavior. All components should inherit from this class. The context object type."
inheritances:
- <xref href="java.lang.Object" data-throw-if-not-resolved="False" />
- "<xref href=\"java.lang.Object\" data-throw-if-not-resolved=\"False\" />"
inheritedMembers:
- java.lang.Object.clone()
- java.lang.Object.equals(java.lang.Object)
- java.lang.Object.finalize()
- java.lang.Object.getClass()
- java.lang.Object.hashCode()
- java.lang.Object.notify()
- java.lang.Object.notifyAll()
- java.lang.Object.toString()
- java.lang.Object.wait()
- java.lang.Object.wait(long)
- java.lang.Object.wait(long,int)
syntax: public abstract class BasePartnerComponent<TContext>
- "java.lang.Object.clone()"
- "java.lang.Object.equals(java.lang.Object)"
- "java.lang.Object.finalize()"
- "java.lang.Object.getClass()"
- "java.lang.Object.hashCode()"
- "java.lang.Object.notify()"
- "java.lang.Object.notifyAll()"
- "java.lang.Object.toString()"
- "java.lang.Object.wait()"
- "java.lang.Object.wait(long)"
- "java.lang.Object.wait(long,int)"
syntax: "public abstract class BasePartnerComponent<TContext>"
constructors:
- com.microsoft.samples.BasePartnerComponent.BasePartnerComponent(com.microsoft.samples.IPartner,TContext)
- "com.microsoft.samples.BasePartnerComponent.BasePartnerComponent(com.microsoft.samples.IPartner,TContext)"
methods:
- com.microsoft.samples.BasePartnerComponent.testBase()
- com.microsoft.samples.BasePartnerComponent.testInherited()
type: class
- "com.microsoft.samples.BasePartnerComponent.testBase()"
- "com.microsoft.samples.BasePartnerComponent.testInherited()"
type: "class"
typeParameters:
- name: TContext
- name: "TContext"
metadata: {}
package: com.microsoft.samples
package: "com.microsoft.samples"
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
### YamlMime:JavaMember
uid: com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString*
fullName: com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString
name: BasePartnerComponentString
nameWithType: BasePartnerComponentString.BasePartnerComponentString
uid: "com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString*"
fullName: "com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString"
name: "BasePartnerComponentString"
nameWithType: "BasePartnerComponentString.BasePartnerComponentString"
members:
- uid: com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString(com.microsoft.samples.IPartner)
fullName: com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString(IPartner rootPartnerOperations)
name: BasePartnerComponentString(IPartner rootPartnerOperations)
nameWithType: BasePartnerComponentString.BasePartnerComponentString(IPartner rootPartnerOperations)
summary: Initializes a new instance of the BasePartnerComponent class.
- uid: "com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString(com.microsoft.samples.IPartner)"
fullName: "com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString(IPartner rootPartnerOperations)"
name: "BasePartnerComponentString(IPartner rootPartnerOperations)"
nameWithType: "BasePartnerComponentString.BasePartnerComponentString(IPartner rootPartnerOperations)"
summary: "Initializes a new instance of the BasePartnerComponent class."
parameters:
- description: The root partner operations that created this component.
name: rootPartnerOperations
type: <xref href="com.microsoft.samples.IPartner?alt=com.microsoft.samples.IPartner&text=IPartner" data-throw-if-not-resolved="False" />
syntax: protected BasePartnerComponentString(IPartner rootPartnerOperations)
- uid: com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString(com.microsoft.samples.IPartner,java.lang.String)
fullName: com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString(IPartner rootPartnerOperations, String componentContext)
name: BasePartnerComponentString(IPartner rootPartnerOperations, String componentContext)
nameWithType: BasePartnerComponentString.BasePartnerComponentString(IPartner rootPartnerOperations, String componentContext)
summary: Initializes a new instance of the BasePartnerComponent class.
- description: "The root partner operations that created this component."
name: "rootPartnerOperations"
type: "<xref href=\"com.microsoft.samples.IPartner?alt=com.microsoft.samples.IPartner&text=IPartner\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected BasePartnerComponentString(IPartner rootPartnerOperations)"
- uid: "com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString(com.microsoft.samples.IPartner,java.lang.String)"
fullName: "com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString(IPartner rootPartnerOperations, String componentContext)"
name: "BasePartnerComponentString(IPartner rootPartnerOperations, String componentContext)"
nameWithType: "BasePartnerComponentString.BasePartnerComponentString(IPartner rootPartnerOperations, String componentContext)"
summary: "Initializes a new instance of the BasePartnerComponent class."
parameters:
- description: The root partner operations that created this component.
name: rootPartnerOperations
type: <xref href="com.microsoft.samples.IPartner?alt=com.microsoft.samples.IPartner&text=IPartner" data-throw-if-not-resolved="False" />
- description: A component context object to work with.
name: componentContext
type: <xref href="java.lang.String?alt=java.lang.String&text=String" data-throw-if-not-resolved="False" />
syntax: protected BasePartnerComponentString(IPartner rootPartnerOperations, String componentContext)
type: constructor
- description: "The root partner operations that created this component."
name: "rootPartnerOperations"
type: "<xref href=\"com.microsoft.samples.IPartner?alt=com.microsoft.samples.IPartner&text=IPartner\" data-throw-if-not-resolved=\"False\" />"
- description: "A component context object to work with."
name: "componentContext"
type: "<xref href=\"java.lang.String?alt=java.lang.String&text=String\" data-throw-if-not-resolved=\"False\" />"
syntax: "protected BasePartnerComponentString(IPartner rootPartnerOperations, String componentContext)"
type: "constructor"
metadata: {}
package: com.microsoft.samples
package: "com.microsoft.samples"
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
### YamlMime:JavaMember
uid: com.microsoft.samples.BasePartnerComponentString.testInherited*
fullName: com.microsoft.samples.BasePartnerComponentString.testInherited
name: testInherited
nameWithType: BasePartnerComponentString.testInherited
uid: "com.microsoft.samples.BasePartnerComponentString.testInherited*"
fullName: "com.microsoft.samples.BasePartnerComponentString.testInherited"
name: "testInherited"
nameWithType: "BasePartnerComponentString.testInherited"
members:
- uid: com.microsoft.samples.BasePartnerComponentString.testInherited()
fullName: com.microsoft.samples.BasePartnerComponentString.testInherited()
name: testInherited()
nameWithType: BasePartnerComponentString.testInherited()
overridden: com.microsoft.samples.BasePartnerComponent.testInherited()
syntax: protected void testInherited()
type: method
- uid: "com.microsoft.samples.BasePartnerComponentString.testInherited()"
fullName: "com.microsoft.samples.BasePartnerComponentString.testInherited()"
name: "testInherited()"
nameWithType: "BasePartnerComponentString.testInherited()"
overridden: "com.microsoft.samples.BasePartnerComponent.testInherited()"
syntax: "protected void testInherited()"
type: "method"
metadata: {}
package: com.microsoft.samples
package: "com.microsoft.samples"
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
### YamlMime:JavaType
uid: com.microsoft.samples.BasePartnerComponentString
fullName: com.microsoft.samples.BasePartnerComponentString
name: BasePartnerComponentString
nameWithType: BasePartnerComponentString
summary: Holds common partner component properties and behavior. The context is string type by default.
uid: "com.microsoft.samples.BasePartnerComponentString"
fullName: "com.microsoft.samples.BasePartnerComponentString"
name: "BasePartnerComponentString"
nameWithType: "BasePartnerComponentString"
summary: "Holds common partner component properties and behavior. The context is string type by default."
inheritances:
- <xref href="java.lang.Object" data-throw-if-not-resolved="False" />
- <xref href="com.microsoft.samples.BasePartnerComponent" data-throw-if-not-resolved="False" />
- "<xref href=\"java.lang.Object\" data-throw-if-not-resolved=\"False\" />"
- "<xref href=\"com.microsoft.samples.BasePartnerComponent\" data-throw-if-not-resolved=\"False\" />"
inheritedMembers:
- com.microsoft.samples.BasePartnerComponent.testBase()
- com.microsoft.samples.BasePartnerComponent.testInherited()
- java.lang.Object.clone()
- java.lang.Object.equals(java.lang.Object)
- java.lang.Object.finalize()
- java.lang.Object.getClass()
- java.lang.Object.hashCode()
- java.lang.Object.notify()
- java.lang.Object.notifyAll()
- java.lang.Object.toString()
- java.lang.Object.wait()
- java.lang.Object.wait(long)
- java.lang.Object.wait(long,int)
syntax: public abstract class BasePartnerComponentString extends BasePartnerComponent<String>
- "com.microsoft.samples.BasePartnerComponent.testBase()"
- "com.microsoft.samples.BasePartnerComponent.testInherited()"
- "java.lang.Object.clone()"
- "java.lang.Object.equals(java.lang.Object)"
- "java.lang.Object.finalize()"
- "java.lang.Object.getClass()"
- "java.lang.Object.hashCode()"
- "java.lang.Object.notify()"
- "java.lang.Object.notifyAll()"
- "java.lang.Object.toString()"
- "java.lang.Object.wait()"
- "java.lang.Object.wait(long)"
- "java.lang.Object.wait(long,int)"
syntax: "public abstract class BasePartnerComponentString extends BasePartnerComponent<String>"
constructors:
- com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString(com.microsoft.samples.IPartner)
- com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString(com.microsoft.samples.IPartner,java.lang.String)
- "com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString(com.microsoft.samples.IPartner)"
- "com.microsoft.samples.BasePartnerComponentString.BasePartnerComponentString(com.microsoft.samples.IPartner,java.lang.String)"
methods:
- com.microsoft.samples.BasePartnerComponentString.testInherited()
type: class
- "com.microsoft.samples.BasePartnerComponentString.testInherited()"
type: "class"
metadata: {}
package: com.microsoft.samples
package: "com.microsoft.samples"
Loading

0 comments on commit f0581e7

Please sign in to comment.