-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#119 Created base controllers for native API
- Loading branch information
Showing
10 changed files
with
450 additions
and
7 deletions.
There are no files selected for viewing
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
61 changes: 61 additions & 0 deletions
61
.../sublinks/sublinksapi/api/sublinks/v1/annoucement/controllers/AnnouncementController.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,61 @@ | ||
package com.sublinks.sublinksapi.api.sublinks.v1.annoucement.controllers; | ||
|
||
import com.sublinks.sublinksapi.api.sublinks.v1.common.controllers.AbstractSublinksApiController; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.web.bind.annotation.DeleteMapping; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
@RequestMapping("api/v1/announcement") | ||
@Tag(name = "Announcement", description = "Announcement API") | ||
public class AnnouncementController extends AbstractSublinksApiController { | ||
|
||
@Operation(summary = "Get a list of announcements") | ||
@GetMapping | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void index() { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Get a specific announcement") | ||
@GetMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void show(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Create a new announcement") | ||
@PostMapping | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void create() { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Update an announcement") | ||
@PostMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void update(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Delete an announcement") | ||
@DeleteMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void delete(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
.../java/com/sublinks/sublinksapi/api/sublinks/v1/comment/controllers/CommentController.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,60 @@ | ||
package com.sublinks.sublinksapi.api.sublinks.v1.comment.controllers; | ||
|
||
import com.sublinks.sublinksapi.api.sublinks.v1.common.controllers.AbstractSublinksApiController; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.web.bind.annotation.DeleteMapping; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
@RequestMapping("api/v1/comment") | ||
@Tag(name = "Comment", description = "Comment API") | ||
public class CommentController extends AbstractSublinksApiController { | ||
@Operation(summary = "Get a list of comments") | ||
@GetMapping | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void index() { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Get a specific comment") | ||
@GetMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void show(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Create a new comment") | ||
@PostMapping | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void create() { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Update an comment") | ||
@PostMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void update(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Delete an comment") | ||
@DeleteMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void delete(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...ublinks/sublinksapi/api/sublinks/v1/common/controllers/AbstractSublinksApiController.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,5 @@ | ||
package com.sublinks.sublinksapi.api.sublinks.v1.common.controllers; | ||
|
||
public abstract class AbstractSublinksApiController { | ||
|
||
} |
60 changes: 60 additions & 0 deletions
60
...a/com/sublinks/sublinksapi/api/sublinks/v1/community/controllers/CommunityController.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,60 @@ | ||
package com.sublinks.sublinksapi.api.sublinks.v1.community.controllers; | ||
|
||
import com.sublinks.sublinksapi.api.sublinks.v1.common.controllers.AbstractSublinksApiController; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.web.bind.annotation.DeleteMapping; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
@RequestMapping("api/v1/community") | ||
@Tag(name = "Community", description = "Community API") | ||
public class CommunityController extends AbstractSublinksApiController { | ||
@Operation(summary = "Get a list of communities") | ||
@GetMapping | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void index() { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Get a specific community") | ||
@GetMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void show(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Create a new community") | ||
@PostMapping | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void create() { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Update an community") | ||
@PostMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void update(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Delete an community") | ||
@DeleteMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void delete(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
...ava/com/sublinks/sublinksapi/api/sublinks/v1/instance/controllers/InstanceController.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,60 @@ | ||
package com.sublinks.sublinksapi.api.sublinks.v1.instance.controllers; | ||
|
||
import com.sublinks.sublinksapi.api.sublinks.v1.common.controllers.AbstractSublinksApiController; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.web.bind.annotation.DeleteMapping; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
@RequestMapping("api/v1/instance") | ||
@Tag(name = "Instance", description = "Instance API") | ||
public class InstanceController extends AbstractSublinksApiController { | ||
@Operation(summary = "Get a list of instances") | ||
@GetMapping | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void index() { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Get a specific instance") | ||
@GetMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void show(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Create a new instance") | ||
@PostMapping | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void create() { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Update an instance") | ||
@PostMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void update(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Delete an instance") | ||
@DeleteMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void delete(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
...in/java/com/sublinks/sublinksapi/api/sublinks/v1/person/controllers/PersonController.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,60 @@ | ||
package com.sublinks.sublinksapi.api.sublinks.v1.person.controllers; | ||
|
||
import com.sublinks.sublinksapi.api.sublinks.v1.common.controllers.AbstractSublinksApiController; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import org.springframework.web.bind.annotation.DeleteMapping; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
@RequestMapping("api/v1/person") | ||
@Tag(name = "Person", description = "Person API") | ||
public class PersonController extends AbstractSublinksApiController { | ||
@Operation(summary = "Get a list of persons") | ||
@GetMapping | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void index() { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Get a specific person") | ||
@GetMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void show(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Create a new person") | ||
@PostMapping | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void create() { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Update an person") | ||
@PostMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void update(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
|
||
@Operation(summary = "Delete an person") | ||
@DeleteMapping("/{id}") | ||
@ApiResponses(value = { | ||
// TODO: add responses | ||
}) | ||
public void delete(@PathVariable String id) { | ||
// TODO: implement | ||
} | ||
} |
Oops, something went wrong.