@@ -70,13 +70,109 @@ func NewHTTPHandler(config localconfig.ChannelParticipation, registrar ChannelMa
7070 router : mux .NewRouter (),
7171 }
7272
73+ // swagger:operation GET /v1/participation/channels/{channelID} channels listChannel
74+ // ---
75+ // summary: Returns detailed channel information for a specific channel Ordering Service Node (OSN) has joined.
76+ // parameters:
77+ // - name: channelID
78+ // in: path
79+ // description: Channel ID
80+ // required: true
81+ // type: string
82+ // responses:
83+ // '200':
84+ // description: Successfully retrieved channel.
85+ // schema:
86+ // "$ref": "#/definitions/channelInfo"
87+ // headers:
88+ // Content-Type:
89+ // description: The media type of the resource
90+ // type: string
91+ // Cache-Control:
92+ // description: The directives for caching responses
93+ // type: string
94+
7395 handler .router .HandleFunc (urlWithChannelIDKey , handler .serveListOne ).Methods (http .MethodGet )
7496
97+ // swagger:operation DELETE /v1/participation/channels/{channelID} channels removeChannel
98+ // ---
99+ // summary: Removes an Ordering Service Node (OSN) from a channel.
100+ // parameters:
101+ // - name: channelID
102+ // in: path
103+ // description: Channel ID
104+ // required: true
105+ // type: string
106+ // responses:
107+ // '204':
108+ // description: Successfully removed channel.
109+ // '400':
110+ // description: Bad request.
111+ // '404':
112+ // description: The channel does not exist.
113+ // '405':
114+ // description: The system channel exists, removal is not allowed.
115+ // '409':
116+ // description: The channel is pending removal.
117+
75118 handler .router .HandleFunc (urlWithChannelIDKey , handler .serveRemove ).Methods (http .MethodDelete )
76119 handler .router .HandleFunc (urlWithChannelIDKey , handler .serveNotAllowed )
77120
121+ // swagger:operation GET /v1/participation/channels channels listChannels
122+ // ---
123+ // summary: Returns the complete list of channels an Ordering Service Node (OSN) has joined.
124+ // responses:
125+ // '200':
126+ // description: Successfully retrieved channels.
127+ // schema:
128+ // "$ref": "#/definitions/channelList"
129+ // headers:
130+ // Content-Type:
131+ // description: The media type of the resource
132+ // type: string
133+ // Cache-Control:
134+ // description: The directives for caching responses
135+ // type: string
136+
78137 handler .router .HandleFunc (URLBaseV1Channels , handler .serveListAll ).Methods (http .MethodGet )
79138
139+ // swagger:operation POST /v1/participation/channels channels joinChannel
140+ // ---
141+ // summary: Joins an Ordering Service Node (OSN) to a channel.
142+ // description: If a channel does not yet exist, it will be created.
143+ // parameters:
144+ // - name: configBlock
145+ // in: formData
146+ // type: string
147+ // required: true
148+ // responses:
149+ // '201':
150+ // description: Successfully joined channel.
151+ // schema:
152+ // "$ref": "#/definitions/channelInfo"
153+ // headers:
154+ // Content-Type:
155+ // description: The media type of the resource
156+ // type: string
157+ // Location:
158+ // description: The URL to redirect a page to
159+ // type: string
160+ // '400':
161+ // description: Cannot join channel.
162+ // '403':
163+ // description: The client is trying to join the system-channel that does not exist, but application channels exist.
164+ // '405':
165+ // description: |
166+ // The client is trying to join an app-channel, but the system channel exists.
167+ // The client is trying to join an app-channel that exists, but the system channel does not.
168+ // The client is trying to join the system-channel, and it exists.
169+ // '409':
170+ // description: The client is trying to join a channel that is currently being removed.
171+ // '500':
172+ // description: Removal of channel failed.
173+ // consumes:
174+ // - multipart/form-data
175+
80176 handler .router .HandleFunc (URLBaseV1Channels , handler .serveJoin ).Methods (http .MethodPost ).HeadersRegexp (
81177 "Content-Type" , "multipart/form-data*" )
82178 handler .router .HandleFunc (URLBaseV1Channels , handler .serveBadContentType ).Methods (http .MethodPost )
0 commit comments