Package com.linkedin.restli.restspec

Examples of com.linkedin.restli.restspec.ParameterSchema


    boolean result = true;
    for (int paramIndex : currRemainder.values())
    {
      // all parameters only appear in curr must not be required
      final ParameterSchema param = currArray.get(paramIndex);
      if (isQueryParameterOptional(param.isOptional(), param.getDefault(GetMode.DEFAULT)))
      {
        _infoMap.addRestSpecInfo(CompatibilityInfo.Type.PARAMETER_NEW_OPTIONAL, _infoPath,
                                 param.getName());
      }
      else
      {
        _infoMap.addRestSpecInfo(CompatibilityInfo.Type.PARAMETER_NEW_REQUIRED, _infoPath,
                                 param.getName());
        result = false;
      }
    }

    _infoPath.pop();
View Full Code Here


      if (param.getParamType() == Parameter.ParamType.KEY  || param.getParamType() == Parameter.ParamType.ASSOC_KEY_PARAM)
      {
        continue;
      }

      ParameterSchema paramSchema = new ParameterSchema();
      paramSchema.setName(param.getName());
      paramSchema.setType(buildDataSchemaType(param.getType(), param.getDataSchema()));

      final Object defaultValueData = param.getDefaultValueData();
      if (defaultValueData == null && param.isOptional())
      {
        paramSchema.setOptional(true);
      }
      else if (defaultValueData != null)
      {
        paramSchema.setDefault(defaultValueData.toString());
      }

      String paramDoc = _docsProvider.getParamDoc(resourceMethodDescriptor.getMethod(), param.getName());
      if (paramDoc != null)
      {
        paramSchema.setDoc(paramDoc);
      }

      final DataMap customAnnotation = param.getCustomAnnotationData();
      if (!customAnnotation.isEmpty())
      {
        paramSchema.setAnnotations(new CustomAnnotationContentSchemaMap(customAnnotation));
      }

      parameterSchemaArray.add(paramSchema);
    }
View Full Code Here

TOP

Related Classes of com.linkedin.restli.restspec.ParameterSchema

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.