Skip to content

Commit

Permalink
Change initially chosen API endpoints
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Garnier <[email protected]>
  • Loading branch information
lolodomo committed Jan 30, 2025
1 parent 331972d commit 81a2305
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
* @author Markus Rathgeb - Migrated to JAX-RS Whiteboard Specification
* @author Wouter Born - Migrated to OpenAPI annotations
* @author Laurent Garnier - Added optional parameter newThingId to approve API
* @author Laurent Garnier - Added API to generate file syntax
* @author Laurent Garnier - Added API to generate syntax
*/
@Component(service = { RESTResource.class, InboxResource.class })
@JaxrsResource
Expand Down Expand Up @@ -218,9 +218,9 @@ public Response unignore(@PathParam("thingUID") @Parameter(description = "thingU
}

@GET
@Path("/{thingUID}/filesyntax")
@Path("/{thingUID}/syntax/generate")
@Produces(MediaType.TEXT_PLAIN)
@Operation(operationId = "generateSyntaxForDiscoveryResult", summary = "Generate file syntax for the thing associated to the discovery result.", responses = {
@Operation(operationId = "generateSyntaxForDiscoveryResult", summary = "Generate syntax for the thing associated to the discovery result.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "400", description = "Unsupported syntax format."),
@ApiResponse(responseCode = "404", description = "Discovery result not found in the inbox or thing type not found.") })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
* @author Stefan Triller - Added bulk item add method
* @author Markus Rathgeb - Migrated to JAX-RS Whiteboard Specification
* @author Wouter Born - Migrated to OpenAPI annotations
* @author Laurent Garnier - Added API to generate file syntax
* @author Laurent Garnier - Added API to generate syntax
*/
@Component
@JaxrsResource
Expand Down Expand Up @@ -923,9 +923,9 @@ public Response getSemanticItem(final @Context UriInfo uriInfo, final @Context H

@GET
@RolesAllowed({ Role.ADMIN })
@Path("/filesyntax")
@Path("/syntax/generate")
@Produces(MediaType.TEXT_PLAIN)
@Operation(operationId = "generateSyntaxForAllItems", summary = "Generate file syntax for all items.", security = {
@Operation(operationId = "generateSyntaxForAllItems", summary = "Generate syntax for all items.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "400", description = "Unsupported syntax format.") })
Expand All @@ -943,9 +943,9 @@ public Response generateSyntaxForAllItems(

@GET
@RolesAllowed({ Role.ADMIN })
@Path("/{itemname: [a-zA-Z_0-9]+}/filesyntax")
@Path("/{itemname: [a-zA-Z_0-9]+}/syntax/generate")
@Produces(MediaType.TEXT_PLAIN)
@Operation(operationId = "generateSyntaxForItem", summary = "Generate file syntax for an item.", security = {
@Operation(operationId = "generateSyntaxForItem", summary = "Generate syntax for an item.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "400", description = "Unsupported syntax format."),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
* @author Dimitar Ivanov - replaced Firmware UID with thing UID and firmware version
* @author Markus Rathgeb - Migrated to JAX-RS Whiteboard Specification
* @author Wouter Born - Migrated to OpenAPI annotations
* @author Laurent Garnier - Added API to generate file syntax
* @author Laurent Garnier - Added API to generate syntax
*/
@Component
@JaxrsResource
Expand Down Expand Up @@ -739,9 +739,9 @@ public Response getFirmwares(@PathParam("thingUID") @Parameter(description = "th

@GET
@RolesAllowed({ Role.ADMIN })
@Path("/filesyntax")
@Path("/syntax/generate")
@Produces(MediaType.TEXT_PLAIN)
@Operation(operationId = "generateSyntaxForAllThings", summary = "Generate file syntax for all things.", security = {
@Operation(operationId = "generateSyntaxForAllThings", summary = "Generate syntax for all things.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "400", description = "Unsupported syntax format.") })
Expand All @@ -760,9 +760,9 @@ public Response generateSyntaxForAllThings(

@GET
@RolesAllowed({ Role.ADMIN })
@Path("/{thingUID}/filesyntax")
@Path("/{thingUID}/syntax/generate")
@Produces(MediaType.TEXT_PLAIN)
@Operation(operationId = "generateSyntaxForThing", summary = "Generate file syntax for a thing.", security = {
@Operation(operationId = "generateSyntaxForThing", summary = "Generate syntax for a thing.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "400", description = "Unsupported syntax format."),
Expand Down

0 comments on commit 81a2305

Please sign in to comment.