OpenAPI
Javaã®Springdocã¯APIã®ãªã¯ã¨ã¹ããã©ã¡ã¼ã¿ãã©ã®ããã«èªèãã¦ããã®ãï¼
ããã«ã¡ã¯ãã¨ããµã¤ãæ ªå¼ä¼ç¤¾ã®å¹³ç³ã§ãã ã¨ããµã¤ããã¼ã«ãã£ã³ã°ã¹ Advent Calendar 2024ã®10æ¥ç®ãæ å½ãããã¾ãã Springdocã©ã¤ãã©ãªãå©ç¨ãããã¨ã§ãç°¡åã«OpenAPIä»æ§ã«åã£ãAPIããã¥ã¡ã³ããèªåçæãããã¨ãã§ãã¾ãã ãããããã®ã©â¦
ããã«ã¡ã¯ãã¨ããµã¤ãæ ªå¼ä¼ç¤¾ã®å¹³ç³ã§ãã ä»åã¯ãOpenAPI Generatorã§èªåçæããAPIã¯ã©ã¤ã¢ã³ããã³ã³ãã¤ã«ããã«å©ç¨ããæ¹æ³ããç´¹ä»ãã¾ãã ã¯ããã« ç°å¢ æé 1. ããã¾ã§ã®æ¹æ³ã§ä¸æ¦çæãã 2. çæãããã¡ã¤ã«ãå®è¡ããããã«å¿ è¦ãªä¾â¦
ããã«ã¡ã¯ãã¨ããµã¤ãæ ªå¼ä¼ç¤¾ã®å¹³ç³ã§ãã ä»åã¯ãSpringdocã§APIã®ãªã¯ã¨ã¹ãã«å¯¾ãã¦ãä»ä¸ããã¢ããã¼ã·ã§ã³ããç´¹ä»ãã¾ãã ãªããä»åã®ã½ã¼ã¹ã³ã¼ãã¯ä»¥ä¸ã®ç°å¢ã§åä½ç¢ºèªããã¦ãã¾ãã 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2â¦
ããã«ã¡ã¯ãã¨ããµã¤ãæ ªå¼ä¼ç¤¾ã®å¹³ç³ã§ãã ä»åã¯ãOpenAPI Generatorãå©ç¨ãã¦Javaã®APIã¯ã©ã¤ã¢ã³ããèªåçæããæ¹æ³ããç´¹ä»ãã¾ãã ã¯ããã« OpenAPI Generatorã¨ã¯ æºå ç°å¢ 使ç¨ããAPIããã¥ã¡ã³ã ä¾åé¢ä¿ã®è¿½å ã¨è¨å®ãè¡ã å®éã«çæãâ¦
ããã«ã¡ã¯ãã¨ããµã¤ãæ ªå¼ä¼ç¤¾ã®å¹³ç³ã§ãã ã¨ããµã¤ããã¼ã«ãã£ã³ã°ã¹ Advent Calendar 2023ã®22æ¥ç®ãæ å½ãããã¾ãã OpenAPIä»æ§ã«åºã¥ãã¦APIã®ä»æ§ãå®ç¾©ããYAMLãã¡ã¤ã«ãããã¢ããªç¨ã®Dartã³ã¼ããèªåçæããéã«ãã¿ã°ã®æå®ã§æ³¨æãã¹ãç¹â¦
ããã«ã¡ã¯ãã¨ããµã¤ãæ ªå¼ä¼ç¤¾ã®å¹³ç³ã§ãã ãã¡ãã®è¨äºã§ãSpring BootããOpenAPIã®ããã¥ã¡ã³ããèªåçæããæ¹æ³ã«ã¤ãã¦èª¬æããã¦ãã¾ãã tech.excite.co.jp ããããAPIã®ã¬ã¹ãã³ã¹ã«Listã¾ãã¯é åã®é ç®ãåå¨ãã¦ããå ´åã«ãã¢ããã¼ã·ã§ã³â¦