src/main/java/br/ufpa/labes/spm/web/rest/ReqAgentResource.java
@PostMapping("/req-agents")
  public ResponseEntity<ReqAgent> createReqAgent(@RequestBody ReqAgent reqAgent)
      throws URISyntaxException {
    log.debug("REST request to save ReqAgent : {}", reqAgent);
    if (reqAgent.getId() != null) {
      throw new BadRequestAlertException(
          "A new reqAgent cannot already have an ID", ENTITY_NAME, "idexists");
    }
    ReqAgent result = reqAgentRepository.save(reqAgent);
    return ResponseEntity.created(new URI("/api/req-agents/" + result.getId()))
        .headers(
            HeaderUtil.createEntityCreationAlert(
                applicationName, true, ENTITY_NAME, result.getId().toString()))
        .body(result);
  }
/**
   * {@code POST /req-agents} : Create a new reqAgent.
   *
   * @param reqAgent the reqAgent to create.
   * @return the {@link ResponseEntity} with status {@code 201 (Created)} and with body the new
   *     reqAgent, or with status {@code 400 (Bad Request)} if the reqAgent has already an ID.
   * @throws URISyntaxException if the Location URI syntax is incorrect.
   */
POST /req-agents : Create a new reqAgent.
@param reqAgent the reqAgent to create.
@return the  ResponseEntity with status  201 (Created) and with body the new
reqAgent, or with status  400 (Bad Request) if the reqAgent has already an ID.
@throws URISyntaxException if the Location URI syntax is incorrect.
POST / req - agents : Create a new reqAgent . @param reqAgent the reqAgent to create . @return the ResponseEntity with status 201 ( Created ) and with body the new reqAgent or with status 400 ( Bad Request ) if the reqAgent has already an ID . @throws URISyntaxException if the Location URI syntax is incorrect .
@PostMapping("/req-agents")
  public ResponseEntity<ReqAgent> createReqAgent(@RequestBody ReqAgent reqAgent)
      throws URISyntaxException {
    log.debug("REST request to save ReqAgent : {}", reqAgent);
    if (reqAgent.getId() != null) {
      throw new BadRequestAlertException(
          "A new reqAgent cannot already have an ID", ENTITY_NAME, "idexists");
    }
    ReqAgent result = reqAgentRepository.save(reqAgent);
    return ResponseEntity.created(new URI("/api/req-agents/" + result.getId()))
        .headers(
            HeaderUtil.createEntityCreationAlert(
                applicationName, true, ENTITY_NAME, result.getId().toString()))
        .body(result);
  }
@ PostMapping ( "/req-agents" ) public ResponseEntity < ReqAgent > createReqAgent ( @ RequestBody ReqAgent reqAgent ) throws URISyntaxException { log . debug ( "REST request to save ReqAgent : {}" , reqAgent ) ; if ( reqAgent . getId ( ) != null ) { throw new BadRequestAlertException ( "A new reqAgent cannot already have an ID" , ENTITY_NAME , "idexists" ) ; } ReqAgent result = reqAgentRepository . save ( reqAgent ) ; return ResponseEntity . created ( new URI ( "/api/req-agents/" + result . getId ( ) ) ) . headers ( HeaderUtil . createEntityCreationAlert ( applicationName , true , ENTITY_NAME , result . getId ( ) . toString ( ) ) ) . body ( result ) ; }
{@code POST /req-agents} : Create a new reqAgent.
{ @code POST / req - agents } : Create a new reqAgent .