-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-docs.html
More file actions
141 lines (136 loc) · 4.65 KB
/
api-docs.html
File metadata and controls
141 lines (136 loc) · 4.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Location Correction Service - API Documentation</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.11.0/swagger-ui.css">
<style>
body {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.header {
background-color: #2c3e50;
color: white;
padding: 20px;
text-align: center;
}
.header h1 {
margin: 0;
font-size: 28px;
}
.header p {
margin: 10px 0 0 0;
opacity: 0.9;
}
#swagger-ui {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.info {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background-color: #f8f9fa;
border-bottom: 1px solid #dee2e6;
}
.info h2 {
color: #2c3e50;
margin-top: 0;
}
.info ul {
line-height: 1.8;
}
.code-example {
background-color: #f4f4f4;
padding: 15px;
border-radius: 5px;
overflow-x: auto;
margin: 10px 0;
}
.code-example code {
font-family: 'Courier New', Courier, monospace;
font-size: 14px;
}
</style>
</head>
<body>
<div class="header">
<h1>Location Correction Service API</h1>
<p>Address validation and geocoding service powered by USPS and Google Maps</p>
</div>
<div class="info">
<h2>Quick Start</h2>
<p>The Location Correction Service provides robust address validation and geocoding capabilities with the following features:</p>
<ul>
<li><strong>Address Validation</strong> - Validates and standardizes addresses using USPS API</li>
<li><strong>Geocoding</strong> - Adds geographic coordinates using Google Maps API</li>
<li><strong>Smart Preprocessing</strong> - Automatically fixes common address format issues</li>
<li><strong>Batch Processing</strong> - Process up to 100 addresses in a single request</li>
<li><strong>High Performance</strong> - Request deduplication, caching, and connection pooling</li>
<li><strong>Resilient</strong> - Circuit breaker pattern prevents cascading failures</li>
</ul>
<h3>Example Request</h3>
<div class="code-example">
<code>
curl -X POST http://localhost:3715/validate-location \
-H "Content-Type: application/json" \
-d '{
"streetAddress": "1600 Pennsylvania Ave NW",
"city": "Washington",
"state": "DC",
"zipCode": "20500"
}'
</code>
</div>
<h3>Example Response</h3>
<div class="code-example">
<code>
{
"streetAddress": "1600 Pennsylvania Avenue Northwest",
"city": "Washington",
"state": "DC",
"zipCode": "20500",
"formattedAddress": "1600 Pennsylvania Ave NW, Washington, DC 20500",
"unformattedAddress": "1600 Pennsylvania Ave NW, Washington, DC, 20500",
"geo": {
"type": "Point",
"coordinates": [-77.0365461, 38.89771400000001]
},
"status": true
}
</code>
</div>
</div>
<div id="swagger-ui"></div>
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.11.0/swagger-ui-bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/swagger-ui-dist@5.11.0/swagger-ui-standalone-preset.js"></script>
<script>
window.onload = function() {
window.ui = SwaggerUIBundle({
url: "./openapi.yaml",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
defaultModelsExpandDepth: 1,
defaultModelExpandDepth: 1,
docExpansion: "list",
filter: true,
showExtensions: true,
showCommonExtensions: true,
tryItOutEnabled: true
});
};
</script>
</body>
</html>