@@ -67,6 +67,18 @@ export class Servers
6767 */
6868export class Format extends Context . Tag ( "@effect/platform/OpenApi/Format" ) < Format , string > ( ) { }
6969
70+ /**
71+ * @since 1.0.0
72+ * @category annotations
73+ */
74+ export class Summary extends Context . Tag ( "@effect/platform/OpenApi/Summary" ) < Summary , string > ( ) { }
75+
76+ /**
77+ * @since 1.0.0
78+ * @category annotations
79+ */
80+ export class Deprecated extends Context . Tag ( "@effect/platform/OpenApi/Deprecated" ) < Deprecated , boolean > ( ) { }
81+
7082/**
7183 * @since 1.0.0
7284 * @category annotations
@@ -98,6 +110,7 @@ export const annotations: (
98110 options : {
99111 readonly identifier ?: string | undefined
100112 readonly title ?: string | undefined
113+ readonly summary ?: string | undefined
101114 readonly version ?: string | undefined
102115 readonly description ?: string | undefined
103116 readonly license ?: OpenAPISpecLicense | undefined
@@ -112,6 +125,7 @@ export const annotations: (
112125 version : Version ,
113126 description : Description ,
114127 license : License ,
128+ summary : Summary ,
115129 externalDocs : ExternalDocs ,
116130 servers : Servers ,
117131 format : Format ,
@@ -166,6 +180,9 @@ export const fromApi = <A extends HttpApi.HttpApi.Any>(self: A): OpenAPISpec =>
166180 Option . map ( Context . getOption ( api . annotations , License ) , ( license ) => {
167181 spec . info . license = license
168182 } )
183+ Option . map ( Context . getOption ( api . annotations , Summary ) , ( summary ) => {
184+ spec . info . summary = summary as any
185+ } )
169186 Option . map ( Context . getOption ( api . annotations , Servers ) , ( servers ) => {
170187 spec . servers = servers as any
171188 } )
@@ -214,6 +231,12 @@ export const fromApi = <A extends HttpApi.HttpApi.Any>(self: A): OpenAPISpec =>
214231 Option . map ( Context . getOption ( endpoint . annotations , Description ) , ( description ) => {
215232 op . description = description
216233 } )
234+ Option . map ( Context . getOption ( endpoint . annotations , Summary ) , ( summary ) => {
235+ op . summary = summary
236+ } )
237+ Option . map ( Context . getOption ( endpoint . annotations , Deprecated ) , ( deprecated ) => {
238+ op . deprecated = deprecated
239+ } )
217240 Option . map ( Context . getOption ( endpoint . annotations , ExternalDocs ) , ( externalDocs ) => {
218241 op . externalDocs = externalDocs
219242 } )
@@ -413,6 +436,7 @@ export interface OpenAPISpecInfo {
413436 readonly version : string
414437 readonly description ?: string
415438 readonly license ?: OpenAPISpecLicense
439+ readonly summary ?: string
416440}
417441
418442/**
0 commit comments