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