(?!)
(really, that's the name...)
(duh...)
(ain't nobody got time for that...)
kind of
in a way
mostly...
// GET simple server info
Server.route({
method: 'GET',
path: '/info',
config: {
tags: ['api'],
response: {
schema: JenniferInfo.schema
}
},
handler: (request, reply) => {
Log.debug(request.headers);
return reply({
name: require('./package').name,
version: require('./package').version
})
}
})
// result
{
"name": "jennifer",
"version": "0.10.1"
}
// request
curl -X GET jennifer:8000/info
// GET simple server info
Server.route({
method: 'GET',
path: '/info',
config: {
tags: ['api'],
response: {
schema: JenniferInfo.schema
}
},
handler: (request, reply) => {
Log.debug(request.headers);
return reply({
name: require('./package').name,
version: require('./package').version
})
.type('application/prs.com.sevenp.jennifer.info-v1+json')
}
})
// result
{
"name": "jennifer",
"version": "0.10.1"
}
// request
curl -X GET \
--header 'Accept: application/\
prs.com.sevenp.jennifer.info-v1+json'\
jennifer:8000/info
(Yeah!)
(oh...)
HttpRequest request = request()
.withMethod("GET")
.withPath("/shipments")
.withHeaders(new Header("emmi-api-version", new String[]{
HttpResponse response = response()
.withStatusCode(200)
.withHeader(header("Content-Type", CONTENT_TYPE_JSON))
.withBody(fromTemplateResource("shipments/list/full.json",
new ImmutablePair<>("$DATE", currentDate)));
stages:
- build
- test
- package
- deploy
build:
stage: build
script:
- mvn compile
test:
stage: test
script:
- mvn test
package:
stage: package
script:
- mvn -DskipTests package
deploy:
only:
- master
stage: deploy
environment: einback
script:
- 'mvn -Dwar.warName=oauth-backend package'
- 'curl -v -H "Authorization: $TOMCAT_AUTHORIZATION" \
--upload-file target/oauth-backend.war "$TOMCAT_UPLOAD_URL"'