All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openapi4j.parser.model.OpenApiSchema Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
package org.openapi4j.parser.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.JsonNode;
import org.openapi4j.core.exception.EncodeException;

import java.util.EnumSet;

@JsonInclude(JsonInclude.Include.NON_NULL)
public interface OpenApiSchema extends Cloneable {
  /**
   * Copy the model by following the references. This allows to flatten the model
   *
   * @return A copy of the model.
   */
  M copy();

  /**
   * Serialize the model to JSON
   *
   * @return The node representation
   * @throws EncodeException in case of serialization error
   */
  JsonNode toNode() throws EncodeException;

  /**
   * Serialize the model to JSON string
   *
   * @param flags   The flags to setup the output.
   * @return The serialized model.
   * @throws EncodeException in case of serialization error
   */
  String toString(EnumSet flags) throws EncodeException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy