Skip to content

Instantly share code, notes, and snippets.

View azagniotov's full-sized avatar
🎯
Ranking ..

Alexander Zagniotov azagniotov

🎯
Ranking ..
View GitHub Profile

Keybase proof

I hereby claim:

  • I am azagniotov on github.
  • I am azagniotov (https://keybase.io/azagniotov) on keybase.
  • I have a public key whose fingerprint is F6DA ECFD 4753 4158 1CA2 88BA F9F7 8017 3A7B E33E

To claim this, I am signing this object:

import org.junit.Test;
import java.util.regex.Pattern;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class NegativeRegexTest {
@azagniotov
azagniotov / docker-compose.yaml
Created May 2, 2021 23:32
Using stubby4j in docker-compose.yaml
# This section builds flight-booking application image to the stack
version: '3.8'
services:
flight-booking-service:
build: .
container_name: flight-booking-service
ports:
- 8080:8080
environment:
@azagniotov
azagniotov / stubs.yaml
Created May 2, 2021 23:38
stubby4j config
includes:
- include-account-service-stubs.yaml
- include-reservation-service-stubs.yaml
Use-case # Account service Reservation service
1 200 OK 200 OK
2 200 OK 400 Bad Request
3 200 OK 403 Forbidden
4 200 OK 500 Internal Server Error
5 200 OK 200 OK (after 1500 millis to cause a read timeout) *
@azagniotov
azagniotov / include-account-service-stubs.yaml
Created May 2, 2021 23:48
include-account-service-stubs.yaml
- request:
method: GET
url: /api/v1/accounts/1
response:
status: 200
headers:
content-type: application/json
file: json/account.service.expected.success.response.json
@azagniotov
azagniotov / include-reservation-service-stubs.yaml
Created May 2, 2021 23:51
include-reservation-service-stubs.yaml
- request:
method: GET
url: /api/v1/reservations/1
# When sequenced responses is configured, on each incoming request to the same URI,
# a subsequent response in the list will be sent to the client. The sequenced
# responses play in a cycle (loop). In other words: after the response sequence plays
# through, the cycle restarts on the next incoming request
#
# https://github.com/azagniotov/stubby4j#response-object-properties
{
"reservation" : "p5e20A9hSi2IsV0soVpafQ==",
"name" : "Leanne Graham",
"phone" : "1-770-736-8031 x56442",
"basePrice" : "USD10.00",
"taxes" : "EUR19.62"
}
/*
alexPrintPrep($("textarea#phrase").val(), null, 210);
alexPrintPrep(address, privkey, 100);
<div id="printable-view-for-alex" class="alex-qr-container"></div>
@media print
{
@azagniotov
azagniotov / beautiful.rest.api.docs.in.markdown.md
Last active April 7, 2024 16:39
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.