{"id":330,"date":"2025-09-06T12:30:52","date_gmt":"2025-09-06T03:30:52","guid":{"rendered":"https:\/\/i-third.org\/blog\/?p=330"},"modified":"2025-09-06T12:30:52","modified_gmt":"2025-09-06T03:30:52","slug":"api%e3%83%86%e3%82%b9%e3%83%88%e3%82%92%e5%8a%87%e7%9a%84%e3%81%ab%e5%8a%b9%e7%8e%87%e5%8c%96%e3%81%99%e3%82%8b%ef%bc%81%e9%96%8b%e7%99%ba%e8%80%85%e3%81%8c%e7%9f%a5%e3%81%a3%e3%81%a6%e3%81%8a","status":"publish","type":"post","link":"https:\/\/i-third.org\/blog\/?p=330","title":{"rendered":"API\u30c6\u30b9\u30c8\u3092\u5287\u7684\u306b\u52b9\u7387\u5316\u3059\u308b\uff01\u958b\u767a\u8005\u304c\u77e5\u3063\u3066\u304a\u304f\u3079\u304d3\u3064\u306e\u9244\u5247"},"content":{"rendered":"<div class=\"blog-post\">\n<p>\n    <strong>\u300cAPI\u3092\u4fee\u6b63\u3059\u308b\u305f\u3073\u306b\u3001\u6bce\u56de\u624b\u52d5\u3067Postman\u3092\u53e9\u3044\u3066\u30c6\u30b9\u30c8\u2026\u300d<\/strong><br \/>\n    <strong>\u300c\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u4f5c\u308b\u306e\u306b\u6642\u9593\u304c\u304b\u304b\u3063\u3066\u3001\u809d\u5fc3\u306e\u5b9f\u88c5\u304c\u9032\u307e\u306a\u3044\u2026\u300d<\/strong><br \/>\n    \u3042\u306a\u305f\u306f\u4eca\u3001\u305d\u3093\u306a\u975e\u52b9\u7387\u306aAPI\u30c6\u30b9\u30c8\u306b\u60a9\u307e\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u304b\uff1f\n<\/p>\n<p>\n    \u3053\u3093\u306b\u3061\u306f\u3002\u30b7\u30b9\u30c6\u30e0\u30a8\u30f3\u30b8\u30cb\u30a2\u3068\u3057\u3066\u3001\u591a\u304f\u306eWeb\u30b5\u30fc\u30d3\u30b9\u958b\u767a\u306b\u643a\u308f\u3063\u3066\u304d\u305f\u7b46\u8005\u304c\u3001\u4eca\u56de\u306fAPI\u30c6\u30b9\u30c8\u3092\u5287\u7684\u306b\u300c\u5feb\u9069\u300d\u306b\u3059\u308b\u305f\u3081\u306e3\u3064\u306e\u9244\u5247\u3068\u3001\u305d\u306e\u5177\u4f53\u7684\u306a\u5b9f\u8df5\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002\n<\/p>\n<p>\n    \u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u624b\u52d5\u30c6\u30b9\u30c8\u304b\u3089\u89e3\u653e\u3055\u308c\u3001\u3088\u308a\u591a\u304f\u306e\u6642\u9593\u3092\u5275\u9020\u7684\u306a\u958b\u767a\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308a\u3001\u3042\u306a\u305f\u306e\u958b\u767a\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306f\u5927\u304d\u304f\u6539\u5584\u3055\u308c\u308b\u3067\u3057\u3087\u3046\u3002\n<\/p>\n<hr>\n<h2>\u76ee\u6b21<\/h2>\n<ul>\n<li><a href=\"#section-1\">\u306a\u305cAPI\u30c6\u30b9\u30c8\u306f\u9762\u5012\u306a\u306e\u304b\uff1f\u6839\u672c\u7684\u306a\u554f\u984c\u70b9<\/a><\/li>\n<li><a href=\"#section-2\">\u9244\u52471\uff1a\u81ea\u52d5\u751f\u6210\u3055\u308c\u308b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u30c6\u30b9\u30c8\u3092\u7c21\u7565\u5316\u3059\u308b<\/a><\/li>\n<li><a href=\"#section-3\">\u9244\u52472\uff1a\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3067API\u306e\u632f\u308b\u821e\u3044\u3092\u4fdd\u8a3c\u3059\u308b<\/a><\/li>\n<li><a href=\"#section-4\">\u9244\u52473\uff1a\u30b3\u30f3\u30c6\u30ca\u3092\u4f7f\u3063\u305f\u300c\u672c\u7269\u300d\u306e\u30c6\u30b9\u30c8\u74b0\u5883\u3092\u624b\u306b\u5165\u308c\u308b<\/a><\/li>\n<li><a href=\"#section-5\">\u307e\u3068\u3081\uff1a\u3053\u308c\u304b\u3089\u306eAPI\u30c6\u30b9\u30c8\u3068\u958b\u767a\u30ef\u30fc\u30af\u30d5\u30ed\u30fc<\/a><\/li>\n<\/ul>\n<hr>\n<h2 id=\"section-1\">\u306a\u305cAPI\u30c6\u30b9\u30c8\u306f\u9762\u5012\u306a\u306e\u304b\uff1f\u6839\u672c\u7684\u306a\u554f\u984c\u70b9<\/h2>\n<p>\n    \u591a\u304f\u306e\u958b\u767a\u73fe\u5834\u3067API\u30c6\u30b9\u30c8\u304c\u9762\u5012\u306b\u611f\u3058\u3089\u308c\u308b\u306e\u306f\u3001\u4ee5\u4e0b\u306e2\u3064\u306e\u554f\u984c\u304c\u539f\u56e0\u3067\u3059\u3002\n<\/p>\n<ol>\n<li><strong>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u9673\u8150\u5316<\/strong><br \/>\n    \u624b\u52d5\u3067\u4f5c\u6210\u3057\u305fAPI\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u3001\u5b9f\u88c5\u306e\u5909\u66f4\u306b\u3064\u3044\u3066\u3044\u3051\u305a\u3001\u3059\u3050\u306b\u53e4\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u7d50\u679c\u3068\u3057\u3066\u3001\u958b\u767a\u8005\u3084\u30c6\u30b9\u30bf\u30fc\u306f\u300c\u6700\u65b0\u306e\u60c5\u5831\u304c\u3069\u3053\u306b\u3042\u308b\u304b\u5206\u304b\u3089\u306a\u3044\u300d\u3068\u3044\u3046\u72b6\u6cc1\u306b\u9665\u308a\u307e\u3059\u3002<\/li>\n<li><strong>\u624b\u52d5\u30c6\u30b9\u30c8\u306e\u9650\u754c<\/strong><br \/>\n    Postman\u3084cURL\u30b3\u30de\u30f3\u30c9\u306a\u3069\u3092\u4f7f\u3063\u305f\u624b\u52d5\u30c6\u30b9\u30c8\u306f\u3001\u4e00\u56de\u4e00\u56de\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306f\u7c21\u5358\u3067\u3059\u304c\u3001**\u7db2\u7f85\u7684\u306a\u30c6\u30b9\u30c8\u306b\u306f\u5411\u304d\u307e\u305b\u3093**\u3002\u7279\u306bAPI\u306e\u6570\u304c\u5897\u3048\u308b\u3068\u3001\u3059\u3079\u3066\u306eAPI\u3092\u624b\u52d5\u3067\u78ba\u8a8d\u3059\u308b\u3053\u3068\u306f\u4e0d\u53ef\u80fd\u306b\u306a\u308a\u3001\u30d0\u30b0\u3092\u898b\u9003\u3059\u30ea\u30b9\u30af\u304c\u9ad8\u307e\u308a\u307e\u3059\u3002<\/li>\n<\/ol>\n<p>\n    \u3053\u308c\u3089\u306e\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u306b\u306f\u3001\u300c\u81ea\u52d5\u5316\u300d\u3092\u524d\u63d0\u3068\u3057\u305f\u65b0\u3057\u3044\u30c6\u30b9\u30c8\u624b\u6cd5\u3092\u53d6\u308a\u5165\u308c\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n<\/p>\n<hr>\n<h2 id=\"section-2\">\u9244\u52471\uff1a\u81ea\u52d5\u751f\u6210\u3055\u308c\u308b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u30c6\u30b9\u30c8\u3092\u7c21\u7565\u5316\u3059\u308b<\/h2>\n<p>\n    API\u306e\u4ed5\u69d8\u66f8\u3092\u30b3\u30fc\u30c9\u304b\u3089\u81ea\u52d5\u751f\u6210\u3059\u308b\u30c4\u30fc\u30eb\u3092\u5c0e\u5165\u3059\u308c\u3070\u3001\u5e38\u306b\u6700\u65b0\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u30c6\u30b9\u30c8\u3067\u304d\u307e\u3059\u3002\n<\/p>\n<h3>OpenAPI (Swagger) + Spring Boot\u3067\u5b9f\u73fe<\/h3>\n<p>\n    <strong>Spring Boot<\/strong>\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3001**springdoc-openapi**\u3068\u3044\u3046\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u5c0e\u5165\u3059\u308b\u3060\u3051\u3067\u3001<strong>OpenAPI\uff08Swagger\uff09<\/strong>\u4ed5\u69d8\u3092\u81ea\u52d5\u751f\u6210\u3057\u3001**Swagger UI**\u3068\u3044\u3046\u30d6\u30e9\u30a6\u30b6\u30d9\u30fc\u30b9\u306e\u30c6\u30b9\u30c8\u30c4\u30fc\u30eb\u3092\u7acb\u3061\u4e0a\u3052\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\n<\/p>\n<h4>\u5177\u4f53\u7684\u306a\u624b\u9806<\/h4>\n<ol>\n<li><strong>\u4f9d\u5b58\u95a2\u4fc2\u306e\u8ffd\u52a0<\/strong><br \/>\n    <code>pom.xml<\/code>\u306b\u4ee5\u4e0b\u306e\u4f9d\u5b58\u95a2\u4fc2\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/li>\n<pre><code>&lt;dependency&gt;\n  &lt;groupId&gt;org.springdoc&lt;\/groupId&gt;\n  &lt;artifactId&gt;springdoc-openapi-starter-webmvc-ui&lt;\/artifactId&gt;\n  &lt;version&gt;2.5.0&lt;\/version&gt;\n&lt;\/dependency&gt;<\/code><\/pre>\n<li><strong>API\u3078\u306e\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u8ffd\u52a0<\/strong><br \/>\n    API\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u30fc\u3084DTO\u306b`@Operation`\u3084`@Schema`\u3068\u3044\u3063\u305f\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u8ffd\u52a0\u3059\u308b\u3068\u3001\u305d\u306e\u60c5\u5831\u304c\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u53cd\u6620\u3055\u308c\u307e\u3059\u3002<\/li>\n<li><strong>\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u8d77\u52d5<\/strong><br \/>\n    \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u8d77\u52d5\u3057\u3001<code>http:\/\/localhost:8080\/swagger-ui.html<\/code>\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306aUI\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ol>\n<p>\n    Swagger UI\u4e0a\u3067\u306f\u3001API\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u4e00\u89a7\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u30fb\u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u5f62\u5f0f\u304c\u78ba\u8a8d\u3067\u304d\u3001**\u305d\u306e\u307e\u307e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3057\u3066\u30c6\u30b9\u30c8\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd**\u3067\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001Postman\u3092\u3044\u3061\u3044\u3061\u8d77\u52d5\u3059\u308b\u624b\u9593\u304c\u7701\u3051\u3001\u4ed5\u69d8\u306e\u78ba\u8a8d\u3068\u7c21\u6613\u30c6\u30b9\u30c8\u3092\u4e00\u3064\u306e\u30c4\u30fc\u30eb\u3067\u5b8c\u7d50\u3067\u304d\u307e\u3059\u3002\n<\/p>\n<hr>\n<h2 id=\"section-3\">\u9244\u52472\uff1a\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3067API\u306e\u632f\u308b\u821e\u3044\u3092\u4fdd\u8a3c\u3059\u308b<\/h2>\n<p>\n    \u624b\u52d5\u30c6\u30b9\u30c8\u306e\u6b21\u306e\u6bb5\u968e\u306f\u3001**\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u306b\u3088\u308b\u81ea\u52d5\u30c6\u30b9\u30c8**\u3067\u3059\u3002\n<\/p>\n<h3>API\u7d71\u5408\u30c6\u30b9\u30c8\u306e\u5b9f\u8df5\uff1aMockMvc<\/h3>\n<p>\n    **Spring Boot Test**\u3068**MockMvc**\u3092\u4f7f\u3048\u3070\u3001HTTP\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u30e2\u30c3\u30af\u5316\u3057\u3066API\u306e\u632f\u308b\u821e\u3044\u3092\u30c6\u30b9\u30c8\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30b5\u30fc\u30d0\u30fc\u3092\u5b9f\u969b\u306b\u7acb\u3061\u4e0a\u3052\u308b\u3053\u3068\u306a\u304f\u3001API\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u3084\u30b9\u30c6\u30fc\u30bf\u30b9\u30b3\u30fc\u30c9\u3092\u691c\u8a3c\u3067\u304d\u307e\u3059\u3002\n<\/p>\n<h4>\u5177\u4f53\u7684\u306a\u624b\u9806\u3068\u30b3\u30fc\u30c9\u4f8b<\/h4>\n<ol>\n<li>\u30c6\u30b9\u30c8\u30af\u30e9\u30b9\u306b`@SpringBootTest`\u3068`@AutoConfigureMockMvc`\u3092\u4ed8\u4e0e\u3057\u307e\u3059\u3002<\/li>\n<li>`MockMvc`\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092DI\uff08\u4f9d\u5b58\u6027\u6ce8\u5165\uff09\u3057\u307e\u3059\u3002<\/li>\n<li>`mockMvc.perform()`\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u3001\u30c6\u30b9\u30c8\u3057\u305f\u3044API\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n<pre><code>import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;\nimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;\n\n@SpringBootTest\n@AutoConfigureMockMvc\nclass UserApiTest {\n\n    @Autowired\n    private MockMvc mockMvc;\n\n    @Test\n    void testGetUser() throws Exception {\n        mockMvc.perform(get(\"\/api\/users\/1\"))\n               .andExpect(status().isOk())\n               .andExpect(jsonPath(\"$.name\").value(\"Taro\"));\n    }\n}<\/code><\/pre>\n<p>\n    \u3053\u306e\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308c\u3070\u3001API\u304c\u6b63\u3057\u304f200 OK\u3092\u8fd4\u3057\u3001`name`\u30d5\u30a3\u30fc\u30eb\u30c9\u306e\u5024\u304c\u300cTaro\u300d\u3067\u3042\u308b\u3053\u3068\u3092\u81ea\u52d5\u3067\u691c\u8a3c\u3057\u3066\u304f\u308c\u307e\u3059\u3002\n<\/p>\n<p>\n    \u3053\u306e\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u306fCI\/CD\uff08\u7d99\u7d9a\u7684\u30a4\u30f3\u30c6\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\/\u7d99\u7d9a\u7684\u30c7\u30ea\u30d0\u30ea\u30fc\uff09\u306b\u7d44\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u3001\u30b3\u30fc\u30c9\u304c\u5909\u66f4\u3055\u308c\u308b\u305f\u3073\u306b**\u81ea\u52d5\u3067\u30d0\u30b0\u304c\u306a\u3044\u304b\u30c1\u30a7\u30c3\u30af**\u3057\u3066\u304f\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\n<\/p>\n<hr>\n<h2 id=\"section-4\">\u9244\u52473\uff1a\u30b3\u30f3\u30c6\u30ca\u3092\u4f7f\u3063\u305f\u300c\u672c\u7269\u300d\u306e\u30c6\u30b9\u30c8\u74b0\u5883\u3092\u624b\u306b\u5165\u308c\u308b<\/h2>\n<p>\n    MockMvc\u306f\u4fbf\u5229\u3067\u3059\u304c\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306e\u9023\u643a\u3084\u5916\u90e8API\u3068\u306e\u901a\u4fe1\u306a\u3069\u3001**\u5b9f\u969b\u306e\u74b0\u5883**\u306b\u8fd1\u3044\u30c6\u30b9\u30c8\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u3053\u3067\u5f79\u7acb\u3064\u306e\u304c\u3001\u30b3\u30f3\u30c6\u30ca\u6280\u8853\u3067\u3059\u3002\n<\/p>\n<h3>Testcontainers\u306e\u5c0e\u5165<\/h3>\n<p>\n    **Testcontainers**\u306f\u3001JUnit\u30c6\u30b9\u30c8\u304b\u3089Docker\u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5\u30fb\u7ba1\u7406\u3067\u304d\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002\n<\/p>\n<p>\n    \u3053\u308c\u306b\u3088\u308a\u3001\u30c6\u30b9\u30c8\u5b9f\u884c\u6642\u306b**Docker\u4e0a\u3067\u5b9f\u969b\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3084\u5916\u90e8\u30b5\u30fc\u30d3\u30b9\u3092\u7acb\u3061\u4e0a\u3052**\u3001API\u304c\u672c\u7269\u306e\u74b0\u5883\u3067\u6b63\u3057\u304f\u52d5\u304f\u304b\u3092\u691c\u8a3c\u3067\u304d\u307e\u3059\u3002\n<\/p>\n<h4>\u5177\u4f53\u7684\u306a\u624b\u9806\u3068\u30b3\u30fc\u30c9\u4f8b<\/h4>\n<ol>\n<li><code>pom.xml<\/code>\u306b`Testcontainers`\u306e\u4f9d\u5b58\u95a2\u4fc2\u3068\u3001\u30c6\u30b9\u30c8\u5bfe\u8c61\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u7528\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\uff08\u4f8b: `mysql`\uff09\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/li>\n<li>\u30c6\u30b9\u30c8\u30af\u30e9\u30b9\u306b`@Testcontainers`\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3092\u4ed8\u4e0e\u3057\u3001`@Container`\u3067Docker\u30b3\u30f3\u30c6\u30ca\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n<pre><code>@Testcontainers\n@SpringBootTest\nclass UserApiRealDbTest {\n\n    @Container\n    public static MySQLContainer<?> mysql = new MySQLContainer&lt;&gt;(\"mysql:8.0\");\n\n    @DynamicPropertySource\n    static void dynamicProperties(DynamicPropertyRegistry registry) {\n        registry.add(\"spring.datasource.url\", mysql::getJdbcUrl);\n        registry.add(\"spring.datasource.username\", mysql::getUsername);\n        registry.add(\"spring.datasource.password\", mysql::getPassword);\n    }\n\n    \/\/ ...\u4ee5\u964d\u306f MockMvc \u306a\u3069\u3092\u4f7f\u3063\u305f\u901a\u5e38\u306e\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\n}<\/code><\/pre>\n<p>\n    \u3053\u306e\u8a2d\u5b9a\u3092\u3059\u308c\u3070\u3001\u30c6\u30b9\u30c8\u5b9f\u884c\u6642\u306b\u81ea\u52d5\u3067Docker\u30b3\u30f3\u30c6\u30ca\u304c\u7acb\u3061\u4e0a\u304c\u308a\u3001\u305d\u3053\u306b\u63a5\u7d9a\u3057\u3066\u30c6\u30b9\u30c8\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u30c6\u30b9\u30c8\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3001\u30b3\u30f3\u30c6\u30ca\u306f\u81ea\u52d5\u7684\u306b\u7834\u68c4\u3055\u308c\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u624b\u5143\u306ePC\u74b0\u5883\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u3053\u3068\u306a\u304f\u3001**\u4fe1\u983c\u6027\u306e\u9ad8\u3044\u7d71\u5408\u30c6\u30b9\u30c8**\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\n<\/p>\n<hr>\n<h2 id=\"section-5\">\u307e\u3068\u3081\uff1a\u3053\u308c\u304b\u3089\u306eAPI\u30c6\u30b9\u30c8\u3068\u958b\u767a\u30ef\u30fc\u30af\u30d5\u30ed\u30fc<\/h2>\n<p>\n    \u624b\u52d5\u30c6\u30b9\u30c8\u304b\u3089\u8131\u5374\u3057\u3001\u3088\u308a\u52b9\u7387\u7684\u306a\u958b\u767a\u3092\u884c\u3046\u305f\u3081\u306e3\u3064\u306e\u9244\u5247\u3092\u307e\u3068\u3081\u307e\u3059\u3002\n<\/p>\n<ol>\n<li><strong>\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u81ea\u52d5\u5316<\/strong>: `springdoc-openapi`\u3092\u4f7f\u3063\u3066\u3001API\u4ed5\u69d8\u66f8\u3092\u30b3\u30fc\u30c9\u304b\u3089\u81ea\u52d5\u751f\u6210\u3057\u3001\u5e38\u306b\u6700\u65b0\u306e\u72b6\u614b\u3067\u7dad\u6301\u3059\u308b\u3002<\/li>\n<li><strong>\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u306e\u6d3b\u7528<\/strong>: `MockMvc`\u3092\u4f7f\u3063\u3066\u3001API\u306e\u632f\u308b\u821e\u3044\u3092\u81ea\u52d5\u3067\u691c\u8a3c\u3059\u308b\u30c6\u30b9\u30c8\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3059\u308b\u3002<\/li>\n<li><strong>\u672c\u7269\u3092\u4f7f\u3063\u305f\u30c6\u30b9\u30c8<\/strong>: `Testcontainers`\u3092\u4f7f\u3063\u3066\u3001\u672c\u7269\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3084\u30b5\u30fc\u30d3\u30b9\u3092\u4f7f\u3063\u305f\u7d71\u5408\u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5316\u3059\u308b\u3002<\/li>\n<\/ol>\n<p>\n    \u3053\u308c\u3089\u306e\u30c4\u30fc\u30eb\u3068\u624b\u6cd5\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u3042\u306a\u305f\u306fAPI\u30c6\u30b9\u30c8\u306e\u9762\u5012\u306a\u4f5c\u696d\u304b\u3089\u89e3\u653e\u3055\u308c\u3001\u3088\u308a\u591a\u304f\u306e\u6642\u9593\u3092**\u30b3\u30fc\u30c9\u306e\u8a2d\u8a08\u3084\u65b0\u6a5f\u80fd\u306e\u5b9f\u88c5**\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u3067\u3057\u3087\u3046\u3002\n<\/p>\n<hr>\n<p>\n    \u3082\u3057\u3053\u306e\u8a18\u4e8b\u304c\u5f79\u306b\u7acb\u3063\u305f\u3089\u3001SNS\u3067\u306e\u30b7\u30a7\u30a2\u3084\u3001\u95a2\u9023\u3059\u308b\u6280\u8853\u8a18\u4e8b\u3078\u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u3055\u3089\u306b\u77e5\u8b58\u3092\u6df1\u3081\u3066\u3044\u305f\u3060\u3051\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\u3002\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u300cAPI\u3092\u4fee\u6b63\u3059\u308b\u305f\u3073\u306b\u3001\u6bce\u56de\u624b\u52d5\u3067Postman\u3092\u53e9\u3044\u3066\u30c6\u30b9\u30c8\u2026\u300d \u300c\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u4f5c\u308b\u306e\u306b\u6642\u9593\u304c\u304b\u304b\u3063\u3066\u3001\u809d\u5fc3\u306e\u5b9f\u88c5\u304c\u9032\u307e\u306a\u3044\u2026\u300d \u3042\u306a\u305f\u306f\u4eca\u3001\u305d\u3093\u306a\u975e\u52b9\u7387\u306aAPI\u30c6\u30b9\u30c8\u306b\u60a9\u307e\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u304b\uff1f \u3053\u3093\u306b\u3061\u306f\u3002\u30b7\u30b9\u30c6\u30e0&hellip;<\/p>\n","protected":false},"author":1,"featured_media":335,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-330","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-7"],"_links":{"self":[{"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/330","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=330"}],"version-history":[{"count":1,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/330\/revisions"}],"predecessor-version":[{"id":331,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/330\/revisions\/331"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/335"}],"wp:attachment":[{"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i-third.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}