protected Map<String, Object> findVendorExtensions(Object def) { return ((Property) def).getVendorExtensions(); } }
@Override public Property resolveProperty(JavaType propType, ModelConverterContext context, Annotation[] annotations, Iterator<ModelConverter> next) { checkType(propType); PropertyCreator creator = propertyCreatorMap.get(propType.getRawClass()); if (creator != null) { return creator.createProperty(); } Property property = super.resolveProperty(propType, context, annotations, next); if (StringProperty.class.isInstance(property)) { if (StringPropertyConverter.isEnum((StringProperty) property)) { setType(propType, property.getVendorExtensions()); } } return property; } }
protected Map<String, Object> findVendorExtensions(Object def) { return ((Property) def).getVendorExtensions(); } }
@Override public boolean isPropertyAllowed(Model model, Property property, String propertyName, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) { if(property.getVendorExtensions() != null && property.getVendorExtensions().containsKey(Constants.X_INFLECTOR_HIDDEN)) { return false; } return true; }
@Override public boolean isPropertyAllowed(Model model, Property property, String propertyName, Map<String, List<String>> params, Map<String, String> cookies, Map<String, List<String>> headers) { if(property.getVendorExtensions() != null && property.getVendorExtensions().containsKey(Constants.X_INFLECTOR_HIDDEN)) { return false; } return true; }
/** * Check whether the given property is of {@link PropertyBox} type using the {@link SwaggerExtensions#MODEL_TYPE} * extension name. * @param property Property to check * @return <code>true</code> if given property is of {@link PropertyBox} type */ private static boolean isPropertyBoxPropertyType(Property property) { if (property != null && property.getVendorExtensions() != null && property.getVendorExtensions().containsKey(SwaggerExtensions.MODEL_TYPE.getExtensionName()) && PropertyBox.class.getName() .equals(property.getVendorExtensions().get(SwaggerExtensions.MODEL_TYPE.getExtensionName()))) { return true; } return false; }
final String name = (String) property.getVendorExtensions() .get(Constants.X_SWAGGER_ROUTER_MODEL); if (name != null) {
final String name = (String) property.getVendorExtensions() .get(Constants.X_SWAGGER_ROUTER_MODEL); if (name != null) {
@Override public Property resolveProperty(JavaType propType, ModelConverterContext context, Annotation[] annotations, Iterator<ModelConverter> next) { checkType(propType); PropertyCreator creator = propertyCreatorMap.get(propType.getRawClass()); if (creator != null) { return creator.createProperty(); } Property property = super.resolveProperty(propType, context, annotations, next); if (StringProperty.class.isInstance(property)) { if (StringPropertyConverter.isEnum((StringProperty) property)) { setType(propType, property.getVendorExtensions()); } } return property; } }
if (schema.getVendorExtensions() != null) { Object nullableExtension = schema.getVendorExtensions().get("x-nullable"); if (nullableExtension != null) { result.setNullable((Boolean) nullableExtension); result.setExtensions(convert(schema.getVendorExtensions()));
if (schema.getVendorExtensions() != null) { Object nullableExtension = schema.getVendorExtensions().get("x-nullable"); if (nullableExtension != null) { result.setNullable((Boolean) nullableExtension); result.setExtensions(convert(schema.getVendorExtensions()));
if (schema.getVendorExtensions() != null) { Object nullableExtension = schema.getVendorExtensions().get("x-nullable"); if (nullableExtension != null) { result.setNullable((Boolean) nullableExtension); result.setExtensions(convert(schema.getVendorExtensions()));
return ((Model) item).getVendorExtensions(); } else if (item instanceof Property) { return ((Property) item).getVendorExtensions(); } else if (item instanceof ExternalDocs) { return ((ExternalDocs) item).getVendorExtensions();
Map<String, Object> extensions = property.getVendorExtensions();