@@ -6,7 +6,7 @@ defmodule WebtritAdapterWeb.Api.V1.User.ContactController do
66 alias Portabilling.Api
77 alias WebtritAdapterWeb.Api.V1.CastAndValidateRenderError
88 alias WebtritAdapterWeb.Api.V1.FallbackController
9- alias WebtritAdapterWeb.Api.V1.CommonResponse
9+ alias WebtritAdapterWeb.Api.V1 . { CommonResponse , CommonSchema }
1010 alias WebtritAdapterWeb.Api.V1.User.ContactSchema
1111 alias WebtritAdapterWeb.Api.V1.User.ControllerMapping
1212
@@ -104,4 +104,40 @@ defmodule WebtritAdapterWeb.Api.V1.User.ContactController do
104104 { :error , :internal_server_error , :external_api_issue }
105105 end
106106 end
107+
108+ OpenApiSpexExt . operation ( :show ,
109+ summary: "Retrieve a contact by UserId" ,
110+ description: """
111+ Retrieve extension number and name of a specific user
112+ within the same **Adaptee** by their UserId.
113+ """ ,
114+ parameters: [
115+ user_id: [
116+ in: :path ,
117+ description: "The unique identifier of the user" ,
118+ schema: CommonSchema.UserId
119+ ]
120+ ] ,
121+ responses: [
122+ CommonResponse . unauthorized ( ) ,
123+ CommonResponse . forbidden ( ) ,
124+ CommonResponse . not_found ( [
125+ :session_not_found ,
126+ :user_not_found ,
127+ :contact_not_found
128+ ] ) ,
129+ CommonResponse . unprocessable ( ) ,
130+ CommonResponse . external_api_issue ( ) ,
131+ CommonResponse . functionality_not_implemented ( ) ,
132+ ok: {
133+ "Ok" ,
134+ "application/json" ,
135+ CommonSchema.Contact
136+ }
137+ ]
138+ )
139+
140+ def show ( _conn , _params , _user_id ) do
141+ { :error , :not_implemented , :functionality_not_implemented }
142+ end
107143end
0 commit comments