generator-springboot-api
Version:
SpringBoot REST API Generator
39 lines (27 loc) • 1.87 kB
Plain Text
# Hello
curl -X GET http://localhost:<%=portNumber%>/<%=artifact%>/hello
# Date-now
curl -X GET http://localhost:<%=portNumber%>/<%=artifact%>/date-now <% if (rabbit) { %>
# Rabbit
curl -X POST -H "Content-type: application/json" -d "{\"name\": \"<%=randomName%>\", \"surname\": \"<%=randomSurname%>\"}" http://localhost:<%=portNumber%>/<%=artifact%>/rabbit/send <% } if (kafka) { %>
# Kafka
curl -X POST -H "Content-type: application/json" -d "{\"name\": \"<%=randomName%>\", \"surname\": \"<%=randomSurname%>\"}" http://localhost:<%=portNumber%>/<%=artifact%>/kafka/send <% } if (mqtt) { %>
# Mqtt
curl -X POST -H "Content-type: application/json" -d "{\"name\": \"<%=randomName%>\", \"surname\": \"<%=randomSurname%>\"}" http://localhost:<%=portNumber%>/<%=artifact%>/mqtt/send <% } if (jpa) {%>
# Database Save
curl -X POST http://localhost:<%=portNumber%>/<%=artifact%>/registry/save -d "description=Saving a new one"
# Database Update
curl -X PUT http://localhost:<%=portNumber%>/<%=artifact%>/registry/update/1 -d "description=Updating a registry"
# Database List all
curl -X GET http://localhost:<%=portNumber%>/<%=artifact%>/registry/list-all
# Database Delete
curl -X DELETE http://localhost:<%=portNumber%>/<%=artifact%>/registry/remove/1 <% } if (mongo) { %>
# Mongo - List by Surname
curl -X GET http://localhost:<%=portNumber%>/<%=artifact%>/person/surname/[surname]
# Mongo - Save a new person
curl -X POST http://localhost:<%=portNumber%>/<%=artifact%>/person/new -d "{\"name\": \"<%=randomName%>\", \"surname\": \"<%=randomSurname%>\"}"
# Mongo - Update a person
curl -X PUT http://localhost:<%=portNumber%>/<%=artifact%>/person/update -d "{\"id\": \"[uuid]\", \"name\": \"<%=randomName%>\", \"surname\": \"<%=randomSurname%>\"}"
# Mongo - Delete a person
curl -X DELETE http://localhost:<%=portNumber%>/<%=artifact%>/person/remove/[id]
<% } %>