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