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