Package io.smallrye.openapi.runtime.io
Class ObjectWriter
java.lang.Object
io.smallrye.openapi.runtime.io.ObjectWriter
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidwriteObject(com.fasterxml.jackson.databind.node.ObjectNode node, String key, Object value) Write an object to jsonstatic voidwriteObjectArray(com.fasterxml.jackson.databind.node.ObjectNode parent, List<Object> models, String propertyName) Writes an array of objects to the parent node.static voidwriteStringArray(com.fasterxml.jackson.databind.node.ObjectNode parent, List<String> models, String propertyName) Writes an array of strings to the parent node.static voidwriteStringMap(com.fasterxml.jackson.databind.node.ObjectNode parent, Map<String, String> models, String propertyName) Writes a map of strings to the parent node.
-
Method Details
-
writeStringArray
public static void writeStringArray(com.fasterxml.jackson.databind.node.ObjectNode parent, List<String> models, String propertyName) Writes an array of strings to the parent node.- Parameters:
parent- the parent json nodemodels- list of StringspropertyName- the name of the node
-
writeObjectArray
public static void writeObjectArray(com.fasterxml.jackson.databind.node.ObjectNode parent, List<Object> models, String propertyName) Writes an array of objects to the parent node.- Parameters:
parent- the parent json nodemodels- list of objectspropertyName- the name of the node
-
writeStringMap
public static void writeStringMap(com.fasterxml.jackson.databind.node.ObjectNode parent, Map<String, String> models, String propertyName) Writes a map of strings to the parent node.- Parameters:
parent- the parent json nodemodels- map of stringspropertyName- name of the node
-
writeObject
public static void writeObject(com.fasterxml.jackson.databind.node.ObjectNode node, String key, Object value) Write an object to json- Parameters:
node- the json nodekey- keyvalue- value
-