io.swagger.models.parameters.CookieParameter Java Examples
The following examples show how to use
io.swagger.models.parameters.CookieParameter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractOperationGenerator.java From servicecomb-java-chassis with Apache License 2.0 | 6 votes |
protected Parameter createParameter(HttpParameterType httpParameterType) { switch (httpParameterType) { case PATH: return new PathParameter(); case QUERY: return new QueryParameter(); case HEADER: return new HeaderParameter(); case FORM: return new FormParameter(); case COOKIE: return new CookieParameter(); case BODY: return new BodyParameter(); default: throw new IllegalStateException("not support httpParameterType " + httpParameterType); } }
Example #2
Source File: CookieProcessorCreator.java From servicecomb-java-chassis with Apache License 2.0 | 5 votes |
@Override public ParamValueProcessor create(Parameter parameter, Type genericParamType) { JavaType targetType = genericParamType == null ? null : TypeFactory.defaultInstance().constructType(genericParamType); return new CookieProcessor(parameter.getName(), targetType, ((CookieParameter) parameter).getDefaultValue(), parameter.getRequired()); }
Example #3
Source File: TestCookieProcessorCreator.java From servicecomb-java-chassis with Apache License 2.0 | 5 votes |
@Test public void testCreate() { ParamValueProcessorCreator creator = ParamValueProcessorCreatorManager.INSTANCE.findValue(CookieProcessorCreator.PARAMTYPE); CookieParameter p = new CookieParameter(); p.setName("p1"); ParamValueProcessor processor = creator.create(p, String.class); Assert.assertEquals(CookieProcessor.class, processor.getClass()); }