java.lang.Object
org.evomaster.client.java.controller.problem.rpc.schema.EndpointSchema
Direct Known Subclasses:
LocalAuthSetupSchema

public class EndpointSchema extends Object
endpoint dto for RPC service
  • Constructor Details

    • EndpointSchema

      public EndpointSchema(String name, String interfaceName, String clientTypeName, List<NamedTypedValue> requestParams, NamedTypedValue response, List<NamedTypedValue> exceptions, boolean authRequired, List<Integer> requiredAuthCandidates, Set<String> relatedCustomizedCandidates)
      Parameters:
      name - is the name of the endpoint, ie, method name
      interfaceName - is the full name of the interface
      clientTypeName - is the client type with its full name
      requestParams - is a list of parameters in request
      response - is the response, ie, return
      exceptions - is related to exception for this endpoint
      authRequired - specifies whether the endpoint clearly declares that it requires auth, eg with annotation note that if authRequired is false, the endpoint could also apply global auth setup
      requiredAuthCandidates - represents required candidates for its auth setup
      relatedCustomizedCandidates - represents related customizations based on their references
  • Method Details

    • getRelatedCustomizedCandidates

      public Set<String> getRelatedCustomizedCandidates()
    • getName

      public String getName()
    • getRequestParams

      public List<NamedTypedValue> getRequestParams()
    • getResponse

      public NamedTypedValue getResponse()
    • getExceptions

      public List<NamedTypedValue> getExceptions()
    • getDto

      public org.evomaster.client.java.controller.api.dto.problem.rpc.RPCActionDto getDto()
      Returns:
      a dto with a respect to this endpoint such dto would be used between core and driver
    • sameEndpoint

      public boolean sameEndpoint(org.evomaster.client.java.controller.api.dto.problem.rpc.RPCActionDto dto)
      Parameters:
      dto - is a dto of rpc call which contains value info
      Returns:
      if this endpoint matches the specified dto
    • sameEndpoint

      public boolean sameEndpoint(org.evomaster.client.java.controller.api.dto.problem.rpc.SeededRPCActionDto dto)
      find an endpoint schema based on seeded tests
      Parameters:
      dto - a seeded test dto
      Returns:
      an endpoint schema
    • copyStructure

      public EndpointSchema copyStructure()
      Returns:
      a copy of this endpoint which contains its structure but not values
    • setValue

      public void setValue(org.evomaster.client.java.controller.api.dto.problem.rpc.RPCActionDto dto)
      set value of endpoint based on dto
      Parameters:
      dto - contains value info the endpoint note that the dto is typically generated by core side, ie, search
    • newInvocationWithJavaOrKotlin

      public List<String> newInvocationWithJavaOrKotlin(String responseVarName, String controllerVarName, String clientVariable, org.evomaster.client.java.controller.api.dto.SutInfoDto.OutputFormat outputFormat)
      process to generate java code to invoke this request
      Parameters:
      responseVarName - specifies a variable name representing a response of this endpoint
      clientVariable -
      outputFormat -
      Returns:
      code to send the request and set the response if exists