Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*******************************************************************************
* Copyright (c) 2017 ModelSolv, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* ModelSolv, Inc. - initial API and implementation and/or initial documentation
*******************************************************************************/
package com.reprezen.kaizen.oasparser.val3;
import static com.reprezen.kaizen.oasparser.ovl3.LinkImpl.F_description;
import static com.reprezen.kaizen.oasparser.ovl3.LinkImpl.F_requestBody;
import static com.reprezen.kaizen.oasparser.val.msg.Messages.msg;
import static com.reprezen.kaizen.oasparser.val3.OpenApi3Messages.NoOpIdNoOpRefInLink;
import static com.reprezen.kaizen.oasparser.val3.OpenApi3Messages.OpIdAndOpRefInLink;
import static com.reprezen.kaizen.oasparser.val3.OpenApi3Messages.OpIdNotFound;
import static com.reprezen.kaizen.oasparser.val3.OpenApi3Messages.OpPathNotFound;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import com.reprezen.jsonoverlay.Overlay;
import com.reprezen.kaizen.oasparser.model3.Link;
import com.reprezen.kaizen.oasparser.model3.OpenApi3;
import com.reprezen.kaizen.oasparser.model3.Operation;
import com.reprezen.kaizen.oasparser.model3.Parameter;
import com.reprezen.kaizen.oasparser.model3.Path;
import com.reprezen.kaizen.oasparser.model3.Server;
import com.reprezen.kaizen.oasparser.ovl3.LinkImpl;
import com.reprezen.kaizen.oasparser.val.ObjectValidatorBase;
import com.reprezen.kaizen.oasparser.val.ValidationResults;
public class LinkValidator extends ObjectValidatorBase {
@Override
public void runObjectValidations() {
// TODO: Validate operationRef value (why didn't they must make it a ref
// object???!)
Link link = (Link) value.getOverlay();
validateStringField(F_description, false);
Operation op = checkValidOperation(link);
if (op != null) {
checkParameters(link, op);
}
Overlay