if (parameter instanceof RefParameter) { RefParameter refParameter = (RefParameter) parameter; Parameter resolvedParameter = cache.loadRef(refParameter.get$ref(), refParameter.getRefFormat(), Parameter.class);
if (ref.get$ref().indexOf("#/parameters") == 0) { String updatedRef = "#/components/"; if (components.getRequestBodies() != null && updatedRef += "parameters"; updatedRef += ref.get$ref().substring("#/parameters".length()); ref.set$ref(updatedRef); v3Parameter.set$ref(ref.get$ref()); } else if (v2Parameter instanceof SerializableParameter) { SerializableParameter sp = (SerializableParameter) v2Parameter;
if (ref.get$ref().indexOf("#/parameters") == 0) { String updatedRef = "#/components/"; if (components.getRequestBodies() != null && updatedRef += "parameters"; updatedRef += ref.get$ref().substring("#/parameters".length()); ref.set$ref(updatedRef); v3Parameter.set$ref(ref.get$ref()); } else if (v2Parameter instanceof SerializableParameter) { SerializableParameter sp = (SerializableParameter) v2Parameter;
if (ref.get$ref().indexOf("#/parameters") == 0) { String updatedRef = "#/components/"; if (components.getRequestBodies() != null && updatedRef += "parameters"; updatedRef += ref.get$ref().substring("#/parameters".length()); ref.set$ref(updatedRef); v3Parameter.set$ref(ref.get$ref()); } else if (v2Parameter instanceof SerializableParameter) { SerializableParameter sp = (SerializableParameter) v2Parameter;
@Override public boolean apply(Parameter parameter) { if (parameter instanceof RefParameter) { /* * This is an invalid state. Reference parameters should automatically get * resolved into parameter objects by the swagger core parser, because only * references that are allowed are to parameters that are defined at the * Swagger Object's parameters which are in the same file. If we reach here * it would mean the reference cannot be resolved and nothing this converter * can do. */ diagCollector.addDiag( Diag.warning( location, "Reference %s cannot be resolved", ((RefParameter) parameter).get$ref())); return false; } else { return true; } } })
private Object getAttribute(final RefParameter param, final String attr) { Object _xblockexpression = null; { String _switchResult = null; if (attr != null) { switch (attr) { case "$ref": _switchResult = param.get$ref(); break; } } final String value = _switchResult; Object _elvis = null; if (value != null) { _elvis = value; } else { Object _attribute = this.getAttribute(((AbstractParameter) param), attr); _elvis = _attribute; } _xblockexpression = _elvis; } return _xblockexpression; }
@Override public boolean apply(Parameter parameter) { if (parameter instanceof RefParameter) { /* * This is an invalid state. Reference parameters should automatically get * resolved into parameter objects by the swagger core parser, because only * references that are allowed are to parameters that are defined at the * Swagger Object's parameters which are in the same file. If we reach here * it would mean the reference cannot be resolved and nothing this converter * can do. */ diagCollector.addDiag( Diag.warning( location, "Reference %s cannot be resolved", ((RefParameter) parameter).get$ref())); return false; } else { return true; } } })
protected Object _safeResolve(final RefParameter ref) { return this.safeResolve(ref, ref.get$ref(), RefType.PARAMETER, ref.getSimpleRef(), ref.getRefFormat()); }
protected Object _resolve(final RefParameter ref) { return this.resolve(ref.get$ref(), RefType.PARAMETER, ref.getSimpleRef(), ref.getRefFormat()); }