Package com.wordnik.swagger.model

Examples of com.wordnik.swagger.model.Operation


      List<String> producesMediaTypes = (List<String>) operationResultMap.get("produces");
      List<String> consumesMediaTypes = (List<String>) operationResultMap.get("consumes");
      List<Parameter> parameterList = (List<Parameter>) operationResultMap.get("parameters");
      List<Authorization> authorizations = (List<Authorization>) operationResultMap.get("authorizations");

      Operation operation = new Operation(
              (String) operationResultMap.get("httpRequestMethod"),
              (String) operationResultMap.get("summary"),
              (String) operationResultMap.get("notes"),
              (String) operationResultMap.get("responseClass"),
              (String) operationResultMap.get("nickname"),
View Full Code Here


  @Override
  public Operation parseOperation(Method method, ApiOperation apiOperation,
      List<ResponseMessage> apiResponses, String isDeprecated,
      List<Parameter> parentParams, ListBuffer<Method> parentMethods) {
    Operation operation = super.parseOperation(method, apiOperation, apiResponses, isDeprecated,
            parentParams, parentMethods);
    return new Operation(operation.method(),
        // for a testing purposes
        "summary by the test swagger test filter",
        operation.notes(),
        operation.responseClass(),
        operation.nickname(),
        operation.position(),
        operation.produces(),
        operation.consumes(),
        operation.protocols(),
        operation.authorizations(),
        operation.parameters(),
        operation.responseMessages(),
        operation.deprecated());
  }
View Full Code Here

            mustacheDocument.setDescription(Utils.getStrInOption(api.description()));

            MustacheApi mustacheApi = new MustacheApi(swaggerDoc.basePath(), api);

            for (scala.collection.Iterator<Operation> opIt  = api.operations().iterator(); opIt.hasNext(); ) {
                Operation op = opIt.next();
                MustacheOperation mustacheOperation = null;
                mustacheOperation = new MustacheOperation(mustacheDocument, op);
                mustacheApi.addOperation(mustacheOperation);
                addResponseType(mustacheDocument, mustacheOperation.getResponseClass());
                for (MustacheResponseClass responseClass : mustacheOperation.getResponseClasses()) {
View Full Code Here

    public Operation toSwaggerModel() {
        if (items != null && this.getResponseClass().equalsIgnoreCase("array")) {
            responseClass = "List["+this.items.getRef()+"]";

        }
        return new Operation(method, summary, notes, responseClass, nickname, position,
                Utils.toScalaImmutableList(produces), Utils.toScalaImmutableList(consumes),
                Utils.toScalaImmutableList(protocols),
                new ListConverter<JAuthorization, Authorization>(authorizations).convert(),
                new ListConverter<JParameter, Parameter>(parameters).convert(),
                new ListConverter<JResponseMessage, ResponseMessage>(responseMessages).convert(),
View Full Code Here

TOP

Related Classes of com.wordnik.swagger.model.Operation

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.