-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
12 deletions.
There are no files selected for viewing
20 changes: 8 additions & 12 deletions
20
src/main/java/com/homihq/db2rest/rest/create/CreateController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/com/homihq/db2rest/rest/create/CreateRestApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.homihq.db2rest.rest.create; | ||
|
||
import com.homihq.db2rest.rest.create.dto.CreateResponse; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
import java.util.Map; | ||
|
||
public interface CreateRestApi { | ||
@ResponseStatus(HttpStatus.CREATED) | ||
@PostMapping("/{tableName}") | ||
CreateResponse save(@PathVariable String tableName, | ||
@RequestHeader(name = "Content-Profile") String schemaName, | ||
@RequestBody Map<String, Object> data, | ||
@RequestParam(name = "tsid", required = false) String tsid, | ||
@RequestParam(name = "tsidType", required = false, defaultValue = "number") String tsidType); | ||
} |