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