RefProperty
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using com.wordnik.swagger.models.properties.RefProperty (Showing top 18 results out of 315)

origin: com.wordnik/swagger-models

public RefProperty asDefault(String ref) {
 this.set$ref("#/definitions/" + ref);
 return this;
}
public RefProperty description(String description) {
origin: org.restlet.jse/org.restlet.ext.platform

return new RefProperty().asDefault(type);
origin: org.restlet.jee/org.restlet.ext.apispark

/**
 * Returns the RWADef type corresponding to the given Swagger Property.
 * 
 * @param property
 *            The Swagger property.
 * @return
 *         The RWADef type.
 */
public static String toDefinitionType(Property property) {
  if (property instanceof RefProperty) {
    RefProperty refProperty = (RefProperty) property;
    return refProperty.getSimpleRef();
  } else if (property instanceof ArrayProperty) {
    ArrayProperty arrayProperty = (ArrayProperty) property;
    return toDefinitionType(arrayProperty.getItems());
  }
  
  SwaggerTypeFormat swaggerTypeFormat = new SwaggerTypeFormat(property.getType(),
      property.getFormat());
  return SwaggerTypes.toDefinitionPrimitiveType(swaggerTypeFormat);
}
origin: org.restlet.jee/org.restlet.ext.apispark

private static void fillOutputPayload(Response swaggerResponse,
    org.restlet.ext.apispark.internal.model.Response response,
    Operation swaggerOperation, Contract contract, 
    Map<String, Object> parameters) {
  Property property = swaggerResponse.getSchema();
  if (property == null) {
    return;
  }
  PayLoad payload = null;
  
  if (property instanceof RefProperty) {
    RefProperty refProperty = (RefProperty) property;
    Object declaredPayload = parameters.get(refProperty.get$ref());
    if (declaredPayload != null
        && declaredPayload instanceof PayLoad) {
      payload = (PayLoad) declaredPayload;
    }
  }
  if (payload == null) {
    payload = new PayLoad();
    payload.setDescription(property.getDescription());
    payload.setArray(property instanceof ArrayProperty);
    payload.setType(SwaggerTypes.toDefinitionType(property));
  }
  Representation representation = contract.getRepresentation(payload.getType());
  if (representation != null) {
    representation.addSections(swaggerOperation.getTags());
  }
  response.setOutputPayLoad(payload);
}
origin: com.wordnik/swagger-models

  .exclusiveMinimum(exclusiveMinimum)
  .exclusiveMaximum(exclusiveMinimum);
if(RefProperty.isType(type, format))
 property = new RefProperty();
if(EmailProperty.isType(type, format))
 property = new EmailProperty()
origin: org.restlet.gae/org.restlet.ext.platform

return new RefProperty().asDefault(type);
origin: org.restlet.jee/org.restlet.ext.platform

/**
 * Returns the RWADef type corresponding to the given Swagger Property.
 * 
 * @param property
 *            The Swagger property.
 * @return
 *         The RWADef type.
 */
public static String toDefinitionType(Property property) {
  if (property instanceof RefProperty) {
    RefProperty refProperty = (RefProperty) property;
    return refProperty.getSimpleRef();
  } else if (property instanceof ArrayProperty) {
    ArrayProperty arrayProperty = (ArrayProperty) property;
    return toDefinitionType(arrayProperty.getItems());
  }
  
  SwaggerTypeFormat swaggerTypeFormat = new SwaggerTypeFormat(property.getType(),
      property.getFormat());
  return SwaggerTypes.toDefinitionPrimitiveType(swaggerTypeFormat);
}
origin: org.restlet.osgi/org.restlet.ext.platform

private static void fillOutputPayload(Response swaggerResponse,
    org.restlet.ext.platform.internal.model.Response response,
    Operation swaggerOperation, Contract contract, 
    Map<String, Object> parameters) {
  Property property = swaggerResponse.getSchema();
  if (property == null) {
    return;
  }
  PayLoad payload = null;
  
  if (property instanceof RefProperty) {
    RefProperty refProperty = (RefProperty) property;
    Object declaredPayload = parameters.get(refProperty.get$ref());
    if (declaredPayload != null
        && declaredPayload instanceof PayLoad) {
      payload = (PayLoad) declaredPayload;
    }
  }
  if (payload == null) {
    payload = new PayLoad();
    payload.setDescription(property.getDescription());
    payload.setArray(property instanceof ArrayProperty);
    payload.setType(SwaggerTypes.toDefinitionType(property));
  }
  Representation representation = contract.getRepresentation(payload.getType());
  if (representation != null) {
    representation.addSections(swaggerOperation.getTags());
  }
  response.setOutputPayLoad(payload);
}
origin: org.restlet.osgi/org.restlet.ext.platform

return new RefProperty().asDefault(type);
origin: org.restlet.jse/org.restlet.ext.platform

/**
 * Returns the RWADef type corresponding to the given Swagger Property.
 * 
 * @param property
 *            The Swagger property.
 * @return
 *         The RWADef type.
 */
public static String toDefinitionType(Property property) {
  if (property instanceof RefProperty) {
    RefProperty refProperty = (RefProperty) property;
    return refProperty.getSimpleRef();
  } else if (property instanceof ArrayProperty) {
    ArrayProperty arrayProperty = (ArrayProperty) property;
    return toDefinitionType(arrayProperty.getItems());
  }
  
  SwaggerTypeFormat swaggerTypeFormat = new SwaggerTypeFormat(property.getType(),
      property.getFormat());
  return SwaggerTypes.toDefinitionPrimitiveType(swaggerTypeFormat);
}
origin: org.restlet.jse/org.restlet.ext.platform

private static void fillOutputPayload(Response swaggerResponse,
    org.restlet.ext.platform.internal.model.Response response,
    Operation swaggerOperation, Contract contract, 
    Map<String, Object> parameters) {
  Property property = swaggerResponse.getSchema();
  if (property == null) {
    return;
  }
  PayLoad payload = null;
  
  if (property instanceof RefProperty) {
    RefProperty refProperty = (RefProperty) property;
    Object declaredPayload = parameters.get(refProperty.get$ref());
    if (declaredPayload != null
        && declaredPayload instanceof PayLoad) {
      payload = (PayLoad) declaredPayload;
    }
  }
  if (payload == null) {
    payload = new PayLoad();
    payload.setDescription(property.getDescription());
    payload.setArray(property instanceof ArrayProperty);
    payload.setType(SwaggerTypes.toDefinitionType(property));
  }
  Representation representation = contract.getRepresentation(payload.getType());
  if (representation != null) {
    representation.addSections(swaggerOperation.getTags());
  }
  response.setOutputPayLoad(payload);
}
origin: com.wordnik/swagger-models

public RefProperty(String ref) {
 super.type = "ref";
 set$ref(ref);
}
origin: org.restlet.jee/org.restlet.ext.apispark

return new RefProperty().asDefault(type);
origin: org.restlet.osgi/org.restlet.ext.platform

/**
 * Returns the RWADef type corresponding to the given Swagger Property.
 * 
 * @param property
 *            The Swagger property.
 * @return
 *         The RWADef type.
 */
public static String toDefinitionType(Property property) {
  if (property instanceof RefProperty) {
    RefProperty refProperty = (RefProperty) property;
    return refProperty.getSimpleRef();
  } else if (property instanceof ArrayProperty) {
    ArrayProperty arrayProperty = (ArrayProperty) property;
    return toDefinitionType(arrayProperty.getItems());
  }
  
  SwaggerTypeFormat swaggerTypeFormat = new SwaggerTypeFormat(property.getType(),
      property.getFormat());
  return SwaggerTypes.toDefinitionPrimitiveType(swaggerTypeFormat);
}
origin: org.restlet.jee/org.restlet.ext.platform

private static void fillOutputPayload(Response swaggerResponse,
    org.restlet.ext.platform.internal.model.Response response,
    Operation swaggerOperation, Contract contract, 
    Map<String, Object> parameters) {
  Property property = swaggerResponse.getSchema();
  if (property == null) {
    return;
  }
  PayLoad payload = null;
  
  if (property instanceof RefProperty) {
    RefProperty refProperty = (RefProperty) property;
    Object declaredPayload = parameters.get(refProperty.get$ref());
    if (declaredPayload != null
        && declaredPayload instanceof PayLoad) {
      payload = (PayLoad) declaredPayload;
    }
  }
  if (payload == null) {
    payload = new PayLoad();
    payload.setDescription(property.getDescription());
    payload.setArray(property instanceof ArrayProperty);
    payload.setType(SwaggerTypes.toDefinitionType(property));
  }
  Representation representation = contract.getRepresentation(payload.getType());
  if (representation != null) {
    representation.addSections(swaggerOperation.getTags());
  }
  response.setOutputPayLoad(payload);
}
origin: org.restlet.jee/org.restlet.ext.platform

return new RefProperty().asDefault(type);
origin: org.restlet.gae/org.restlet.ext.platform

/**
 * Returns the RWADef type corresponding to the given Swagger Property.
 * 
 * @param property
 *            The Swagger property.
 * @return
 *         The RWADef type.
 */
public static String toDefinitionType(Property property) {
  if (property instanceof RefProperty) {
    RefProperty refProperty = (RefProperty) property;
    return refProperty.getSimpleRef();
  } else if (property instanceof ArrayProperty) {
    ArrayProperty arrayProperty = (ArrayProperty) property;
    return toDefinitionType(arrayProperty.getItems());
  }
  
  SwaggerTypeFormat swaggerTypeFormat = new SwaggerTypeFormat(property.getType(),
      property.getFormat());
  return SwaggerTypes.toDefinitionPrimitiveType(swaggerTypeFormat);
}
origin: org.restlet.gae/org.restlet.ext.platform

private static void fillOutputPayload(Response swaggerResponse,
    org.restlet.ext.platform.internal.model.Response response,
    Operation swaggerOperation, Contract contract, 
    Map<String, Object> parameters) {
  Property property = swaggerResponse.getSchema();
  if (property == null) {
    return;
  }
  PayLoad payload = null;
  
  if (property instanceof RefProperty) {
    RefProperty refProperty = (RefProperty) property;
    Object declaredPayload = parameters.get(refProperty.get$ref());
    if (declaredPayload != null
        && declaredPayload instanceof PayLoad) {
      payload = (PayLoad) declaredPayload;
    }
  }
  if (payload == null) {
    payload = new PayLoad();
    payload.setDescription(property.getDescription());
    payload.setArray(property instanceof ArrayProperty);
    payload.setType(SwaggerTypes.toDefinitionType(property));
  }
  Representation representation = contract.getRepresentation(payload.getType());
  if (representation != null) {
    representation.addSections(swaggerOperation.getTags());
  }
  response.setOutputPayLoad(payload);
}
com.wordnik.swagger.models.propertiesRefProperty

Most used methods

  • <init>
  • asDefault
  • get$ref
  • getSimpleRef
  • isType
  • set$ref
  • setDescription

Popular in Java

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (Timer)
  • onCreateOptionsMenu (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Option (scala)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)