package Ġio . bk bn . k omp end ium . core Ċ Ċ import Ġio . bk bn . k omp end ium . annotations . Param Ċ import Ġio . bk bn . k omp end ium . core . Default Method Parser . calculate Route Path Ċ import Ġio . bk bn . k omp end ium . core . K omp end ium Pre Flight . method Not ar ization Pre Flight Ċ import Ġio . bk bn . k omp end ium . core . Default Method Parser . parse MethodInfo Ċ import Ġio . bk bn . k omp end ium . core . metadata . method . Delete Info Ċ import Ġio . bk bn . k omp end ium . core . metadata . method . Get Info Ċ import Ġio . bk bn . k omp end ium . core . metadata . method . Head Info Ċ import Ġio . bk bn . k omp end ium . core . metadata . method . Options Info Ċ import Ġio . bk bn . k omp end ium . core . metadata . method . Patch Info Ċ import Ġio . bk bn . k omp end ium . core . metadata . method . Post Info Ċ import Ġio . bk bn . k omp end ium . core . metadata . method . Put Info Ċ import Ġio . bk bn . k omp end ium . o as . path . Path Ċ import Ġio . bk bn . k omp end ium . o as . path . Path Operation Ċ import Ġio . ktor . application . Application Call Ċ import Ġio . ktor . application . feature Ċ import Ġio . ktor . http . HttpMethod Ċ import Ġio . ktor . routing . Route Ċ import Ġio . ktor . routing . application Ċ import Ġio . ktor . routing . method Ċ import Ġio . ktor . util . pipeline . Pipeline Interceptor Ċ Ċ /** Ċ Ġ* ĠNot ar ization Ġmethods Ġare Ġthe Ġprimary Ġway Ġthat Ġa ĠK tor ĠAPI Ġusing ĠK omp end ium Ġdifferent i ates Ċ Ġ* Ġfrom Ġa Ġdefault ĠK tor Ġapplication . ĠOn Ġinstantiation , Ġa Ġnot ar ized Ġroute , Ġprovided Ġwith Ġthe Ġproper Ġmetadata , Ċ Ġ* Ġwill Ġreflect ively Ġanalyze Ġall Ġpert inent Ġdata Ġto Ġbuild Ġa Ġcorresponding ĠOpenAPI Ġentry . Ċ Ġ*/ Ċ object ĠNot ar ized Ġ{ ĊĊĠ Ġ/** ĊĠĠ Ġ* ĠNot ar ization Ġfor Ġan ĠHTTP ĠGET Ġrequest ĊĠĠ Ġ* Ġ@ param ĠT Param ĠThe Ġclass Ġcontaining Ġall Ġparameter Ġfields . ĠEach Ġfield Ġmust Ġbe Ġannotated Ġwith Ġ@ [ Param ] ĊĠĠ Ġ* Ġ@ param ĠT Resp ĠClass Ġdetail ing Ġthe Ġexpected ĠAPI Ġresponse ĊĠĠ Ġ* Ġ@ param Ġinfo ĠRoute Ġmetadata ĊĠĠ Ġ* Ġ@ param Ġpost Process ĠAdds Ġan Ġoptional Ġcallback Ġhook Ġto Ġperform Ġmanual Ġoverrides Ġon Ġthe Ġgenerated Ġ[ Path Operation ] ĊĠĠ Ġ*/ ĊĠ Ġinline Ġfun Ġ< re ified ĠT Param Ġ: ĠAny , Ġre ified ĠT Resp Ġ: ĠAny > ĠRoute . not ar ized Get ( ĊĠĠĠ Ġinfo : ĠGet Info < T Param , ĠT Resp >, ĊĠĠĠ Ġpost Process : Ġ( Path Operation ) Ġ-> ĠPath Operation Ġ= Ġ{ Ġp Ġ-> Ġp Ġ}, ĊĠĠĠ Ġno inline Ġbody : ĠPipeline Interceptor < Unit , ĠApplication Call > ĊĠ Ġ): ĠRoute Ġ= Ġmethod Not ar ization Pre Flight < T Param , ĠUnit , ĠT Resp > Ġ{ Ġparam Type , Ġrequest Type , Ġresponse Type Ġ-> ĊĠĠĠ Ġval Ġfeature Ġ= Ġthis . application . feature ( K omp end ium ) ĊĠĠĠ Ġval Ġpath Ġ= Ġcalculate Route Path () ĊĠĠĠ Ġfeature . config . spec . paths . get Or Put ( path ) Ġ{ ĠPath () Ġ} ĊĠĠĠ Ġval Ġbase Info Ġ= Ġparse MethodInfo ( info , Ġparam Type , Ġrequest Type , Ġresponse Type , Ġfeature ) ĊĠĠĠ Ġfeature . config . spec . paths [ path ]?. get Ġ= Ġpost Process ( base Info ) ĊĠĠĠ Ġreturn Ġmethod ( HttpMethod . Get ) Ġ{ Ġhandle ( body ) Ġ} ĊĠ Ġ} ĊĊĠ Ġ/** ĊĠĠ Ġ* ĠNot ar ization Ġfor Ġan ĠHTTP ĠPOST Ġrequest ĊĠĠ Ġ* Ġ@ param ĠT Param ĠThe Ġclass Ġcontaining Ġall Ġparameter Ġfields . ĠEach Ġfield Ġmust Ġbe Ġannotated Ġwith Ġ@ [ Param ] ĊĠĠ Ġ* Ġ@ param ĠT Req ĠClass Ġdetail ing Ġthe Ġexpected ĠAPI Ġrequest Ġbody ĊĠĠ Ġ* Ġ@ param ĠT Resp ĠClass Ġdetail ing Ġthe Ġexpected ĠAPI Ġresponse ĊĠĠ Ġ* Ġ@ param Ġinfo ĠRoute Ġmetadata ĊĠĠ Ġ* Ġ@ param Ġpost Process ĠAdds Ġan Ġoptional Ġcallback Ġhook Ġto Ġperform Ġmanual Ġoverrides Ġon Ġthe Ġgenerated Ġ[ Path Operation ] ĊĠĠ Ġ*/ ĊĠ Ġinline Ġfun Ġ< re ified ĠT Param Ġ: ĠAny , Ġre ified ĠT Req Ġ: ĠAny , Ġre ified ĠT Resp Ġ: ĠAny > ĠRoute . not ar ized Post ( ĊĠĠĠ Ġinfo : ĠPost Info < T Param , ĠT Req , ĠT Resp >, ĊĠĠĠ Ġpost Process : Ġ( Path Operation ) Ġ-> ĠPath Operation Ġ= Ġ{ Ġp Ġ-> Ġp Ġ}, ĊĠĠĠ Ġno inline Ġbody : ĠPipeline Interceptor < Unit , ĠApplication Call > ĊĠ Ġ): ĠRoute Ġ= Ġmethod Not ar ization Pre Flight < T Param , ĠT Req , ĠT Resp > Ġ{ Ġparam Type , Ġrequest Type , Ġresponse Type Ġ-> ĊĠĠĠ Ġval Ġfeature Ġ= Ġthis . application . feature ( K omp end ium ) ĊĠĠĠ Ġval Ġpath Ġ= Ġcalculate Route Path () ĊĠĠĠ Ġfeature . config . spec . paths . get Or Put ( path ) Ġ{ ĠPath () Ġ} ĊĠĠĠ Ġval Ġbase Info Ġ= Ġparse MethodInfo ( info , Ġparam Type , Ġrequest Type , Ġresponse Type , Ġfeature ) ĊĠĠĠ Ġfeature . config . spec . paths [ path ]?. post Ġ= Ġpost Process ( base Info ) ĊĠĠĠ Ġreturn Ġmethod ( HttpMethod . Post ) Ġ{ Ġhandle ( body ) Ġ} ĊĠ Ġ} ĊĊĠ Ġ/** ĊĠĠ Ġ* ĠNot ar ization Ġfor Ġan ĠHTTP ĠPUT Ġrequest ĊĠĠ Ġ* Ġ@ param ĠT Param ĠThe Ġclass Ġcontaining Ġall Ġparameter Ġfields . ĠEach Ġfield Ġmust Ġbe Ġannotated Ġwith Ġ@ [ Param ] ĊĠĠ Ġ* Ġ@ param ĠT Req ĠClass Ġdetail ing Ġthe Ġexpected ĠAPI Ġrequest Ġbody ĊĠĠ Ġ* Ġ@ param ĠT Resp ĠClass Ġdetail ing Ġthe Ġexpected ĠAPI Ġresponse ĊĠĠ Ġ* Ġ@ param Ġinfo ĠRoute Ġmetadata ĊĠĠ Ġ* Ġ@ param Ġpost Process ĠAdds Ġan Ġoptional Ġcallback Ġhook Ġto Ġperform Ġmanual Ġoverrides Ġon Ġthe Ġgenerated Ġ[ Path Operation ] ĊĠĠ Ġ*/ ĊĠ Ġinline Ġfun Ġ< re ified ĠT Param Ġ: ĠAny , Ġre ified ĠT Req Ġ: ĠAny , Ġre ified ĠT Resp Ġ: ĠAny > ĠRoute . not ar ized Put ( ĊĠĠĠ Ġinfo : ĠPut Info < T Param , ĠT Req , ĠT Resp >, ĊĠĠĠ Ġpost Process : Ġ( Path Operation ) Ġ-> ĠPath Operation Ġ= Ġ{ Ġp Ġ-> Ġp Ġ}, ĊĠĠĠ Ġno inline Ġbody : ĠPipeline Interceptor < Unit , ĠApplication Call >, ĊĠ Ġ): ĠRoute Ġ= Ġmethod Not ar ization Pre Flight < T Param , ĠT Req , ĠT Resp > Ġ{ Ġparam Type , Ġrequest Type , Ġresponse Type Ġ-> ĊĠĠĠ Ġval Ġfeature Ġ= Ġthis . application . feature ( K omp end ium ) ĊĠĠĠ Ġval Ġpath Ġ= Ġcalculate Route Path () ĊĠĠĠ Ġfeature . config . spec . paths . get Or Put ( path ) Ġ{ ĠPath () Ġ} ĊĠĠĠ Ġval Ġbase Info Ġ= Ġparse MethodInfo ( info , Ġparam Type , Ġrequest Type , Ġresponse Type , Ġfeature ) ĊĠĠĠ Ġfeature . config . spec . paths [ path ]?. put Ġ= Ġpost Process ( base Info ) ĊĠĠĠ Ġreturn Ġmethod ( HttpMethod . Put ) Ġ{ Ġhandle ( body ) Ġ} ĊĠ Ġ} ĊĊĠ Ġ/** ĊĠĠ Ġ* ĠNot ar ization Ġfor Ġan ĠHTTP ĠP ATCH Ġrequest ĊĠĠ Ġ* Ġ@ param ĠT Param ĠThe Ġclass Ġcontaining Ġall Ġparameter Ġfields . ĠEach Ġfield Ġmust Ġbe Ġannotated Ġwith Ġ@ [ Param ] ĊĠĠ Ġ* Ġ@ param ĠT Req ĠClass Ġdetail ing Ġthe Ġexpected ĠAPI Ġrequest Ġbody ĊĠĠ Ġ* Ġ@ param ĠT Resp ĠClass Ġdetail ing Ġthe Ġexpected ĠAPI Ġresponse ĊĠĠ Ġ* Ġ@ param Ġinfo ĠRoute Ġmetadata ĊĠĠ Ġ* Ġ@ param Ġpost Process ĠAdds Ġan Ġoptional Ġcallback Ġhook Ġto Ġperform Ġmanual Ġoverrides Ġon Ġthe Ġgenerated Ġ[ Path Operation ] ĊĠĠ Ġ*/ ĊĠ Ġinline Ġfun Ġ< re ified ĠT Param Ġ: ĠAny , Ġre ified ĠT Req Ġ: ĠAny , Ġre ified ĠT Resp Ġ: ĠAny > ĠRoute . not ar ized Patch ( ĊĠĠĠ Ġinfo : ĠPatch Info < T Param , ĠT Req , ĠT Resp >, ĊĠĠĠ Ġpost Process : Ġ( Path Operation ) Ġ-> ĠPath Operation Ġ= Ġ{ Ġp Ġ-> Ġp Ġ}, ĊĠĠĠ Ġno inline Ġbody : ĠPipeline Interceptor < Unit , ĠApplication Call >, ĊĠ Ġ): ĠRoute Ġ= Ġmethod Not ar ization Pre Flight < T Param , ĠT Req , ĠT Resp > Ġ{ Ġparam Type , Ġrequest Type , Ġresponse Type Ġ-> ĊĠĠĠ Ġval Ġfeature Ġ= Ġthis . application . feature ( K omp end ium ) ĊĠĠĠ Ġval Ġpath Ġ= Ġcalculate Route Path () ĊĠĠĠ Ġfeature . config . spec . paths . get Or Put ( path ) Ġ{ ĠPath () Ġ} ĊĠĠĠ Ġval Ġbase Info Ġ= Ġparse MethodInfo ( info , Ġparam Type , Ġrequest Type , Ġresponse Type , Ġfeature ) ĊĠĠĠ Ġfeature . config . spec . paths [ path ]?. patch Ġ= Ġpost Process ( base Info ) ĊĠĠĠ Ġreturn Ġmethod ( HttpMethod . Patch ) Ġ{ Ġhandle ( body ) Ġ} ĊĠ Ġ} ĊĊĠ Ġ/** ĊĠĠ Ġ* ĠNot ar ization Ġfor Ġan ĠHTTP ĠDELETE Ġrequest ĊĠĠ Ġ* Ġ@ param ĠT Param ĠThe Ġclass Ġcontaining Ġall Ġparameter Ġfields . ĠEach Ġfield Ġmust Ġbe Ġannotated Ġwith Ġ@ [ Param ] ĊĠĠ Ġ* Ġ@ param ĠT Resp ĠClass Ġdetail ing Ġthe Ġexpected ĠAPI Ġresponse ĊĠĠ Ġ* Ġ@ param Ġinfo ĠRoute Ġmetadata ĊĠĠ Ġ* Ġ@ param Ġpost Process ĠAdds Ġan Ġoptional Ġcallback Ġhook Ġto Ġperform Ġmanual Ġoverrides Ġon Ġthe Ġgenerated Ġ[ Path Operation ] ĊĠĠ Ġ*/ ĊĠ Ġinline Ġfun Ġ< re ified ĠT Param Ġ: ĠAny , Ġre ified ĠT Resp Ġ: ĠAny > ĠRoute . not ar ized Delete ( ĊĠĠĠ Ġinfo : ĠDelete Info < T Param , ĠT Resp >, ĊĠĠĠ Ġpost Process : Ġ( Path Operation ) Ġ-> ĠPath Operation Ġ= Ġ{ Ġp Ġ-> Ġp Ġ}, ĊĠĠĠ Ġno inline Ġbody : ĠPipeline Interceptor < Unit , ĠApplication Call > ĊĠ Ġ): ĠRoute Ġ= Ġmethod Not ar ization Pre Flight < T Param , ĠUnit , ĠT Resp > Ġ{ Ġparam Type , Ġrequest Type , Ġresponse Type Ġ-> ĊĠĠĠ Ġval Ġfeature Ġ= Ġthis . application . feature ( K omp end ium ) ĊĠĠĠ Ġval Ġpath Ġ= Ġcalculate Route Path () ĊĠĠĠ Ġfeature . config . spec . paths . get Or Put ( path ) Ġ{ ĠPath () Ġ} ĊĠĠĠ Ġval Ġbase Info Ġ= Ġparse MethodInfo ( info , Ġparam Type , Ġrequest Type , Ġresponse Type , Ġfeature ) ĊĠĠĠ Ġfeature . config . spec . paths [ path ]?. delete Ġ= Ġpost Process ( base Info ) ĊĠĠĠ Ġreturn Ġmethod ( HttpMethod . Delete ) Ġ{ Ġhandle ( body ) Ġ} ĊĠ Ġ} ĊĊĠ Ġ/** ĊĠĠ Ġ* ĠNot ar ization Ġfor Ġan ĠHTTP ĠHEAD Ġrequest ĊĠĠ Ġ* Ġ@ param ĠT Param ĠThe Ġclass Ġcontaining Ġall Ġparameter Ġfields . ĠEach Ġfield Ġmust Ġbe Ġannotated Ġwith Ġ@ [ Param ] ĊĠĠ Ġ* Ġ@ param Ġinfo ĠRoute Ġmetadata ĊĠĠ Ġ* Ġ@ param Ġpost Process ĠAdds Ġan Ġoptional Ġcallback Ġhook Ġto Ġperform Ġmanual Ġoverrides Ġon Ġthe Ġgenerated Ġ[ Path Operation ] ĊĠĠ Ġ*/ ĊĠ Ġinline Ġfun Ġ< re ified ĠT Param Ġ: ĠAny > ĠRoute . not ar ized Head ( ĊĠĠĠ Ġinfo : ĠHead Info < T Param >, ĊĠĠĠ Ġpost Process : Ġ( Path Operation ) Ġ-> ĠPath Operation Ġ= Ġ{ Ġp Ġ-> Ġp Ġ}, ĊĠĠĠ Ġno inline Ġbody : ĠPipeline Interceptor < Unit , ĠApplication Call > ĊĠ Ġ): ĠRoute Ġ= Ġmethod Not ar ization Pre Flight < T Param , ĠUnit , ĠUnit > Ġ{ Ġparam Type , Ġrequest Type , Ġresponse Type Ġ-> ĊĠĠĠ Ġval Ġfeature Ġ= Ġthis . application . feature ( K omp end ium ) ĊĠĠĠ Ġval Ġpath Ġ= Ġcalculate Route Path () ĊĠĠĠ Ġfeature . config . spec . paths . get Or Put ( path ) Ġ{ ĠPath () Ġ} ĊĠĠĠ Ġval Ġbase Info Ġ= Ġparse MethodInfo ( info , Ġparam Type , Ġrequest Type , Ġresponse Type , Ġfeature ) ĊĠĠĠ Ġfeature . config . spec . paths [ path ]?. head Ġ= Ġpost Process ( base Info ) ĊĠĠĠ Ġreturn Ġmethod ( HttpMethod . Head ) Ġ{ Ġhandle ( body ) Ġ} ĊĠ Ġ} ĊĊĠ Ġ/** ĊĠĠ Ġ* ĠNot ar ization Ġfor Ġan ĠHTTP ĠOPTION Ġrequest ĊĠĠ Ġ* Ġ@ param ĠT Param ĠThe Ġclass Ġcontaining Ġall Ġparameter Ġfields . ĠEach Ġfield Ġmust Ġbe Ġannotated Ġwith Ġ@ [ Param ] ĊĠĠ Ġ* Ġ@ param ĠT Resp ĠClass Ġdetail ing Ġthe Ġexpected ĠAPI Ġresponse ĊĠĠ Ġ* Ġ@ param Ġinfo ĠRoute Ġmetadata ĊĠĠ Ġ* Ġ@ param Ġpost Process ĠAdds Ġan Ġoptional Ġcallback Ġhook Ġto Ġperform Ġmanual Ġoverrides Ġon Ġthe Ġgenerated Ġ[ Path Operation ] ĊĠĠ Ġ*/ ĊĠ Ġinline Ġfun Ġ< re ified ĠT Param Ġ: ĠAny , Ġre ified ĠT Resp Ġ: ĠAny > ĠRoute . not ar ized Options ( ĊĠĠĠ Ġinfo : ĠOptions Info < T Param , ĠT Resp >, ĊĠĠĠ Ġpost Process : Ġ( Path Operation ) Ġ-> ĠPath Operation Ġ= Ġ{ Ġp Ġ-> Ġp Ġ}, ĊĠĠĠ Ġno inline Ġbody : ĠPipeline Interceptor < Unit , ĠApplication Call > ĊĠ Ġ): ĠRoute Ġ= Ġmethod Not ar ization Pre Flight < T Param , ĠUnit , ĠT Resp > Ġ{ Ġparam Type , Ġrequest Type , Ġresponse Type Ġ-> ĊĠĠĠ Ġval Ġfeature Ġ= Ġthis . application . feature ( K omp end ium ) ĊĠĠĠ Ġval Ġpath Ġ= Ġcalculate Route Path () ĊĠĠĠ Ġfeature . config . spec . paths . get Or Put ( path ) Ġ{ ĠPath () Ġ} ĊĠĠĠ Ġval Ġbase Info Ġ= Ġparse MethodInfo ( info , Ġparam Type , Ġrequest Type , Ġresponse Type , Ġfeature ) ĊĠĠĠ Ġfeature . config . spec . paths [ path ]?. options Ġ= Ġpost Process ( base Info ) ĊĠĠĠ Ġreturn Ġmethod ( HttpMethod . Options ) Ġ{ Ġhandle ( body ) Ġ} ĊĠ Ġ} Ċ } Ċ