Commit 738a37ab authored by M. Hamza's avatar M. Hamza
Browse files

add endpoint subscriptions POST in VIS API

parent 0b1abddb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -192,7 +192,7 @@ paths:
  /subscriptions:
    get:
      tags:
        - 'unsupported'
        - 'v2xi'
      summary: 'Request information about the subscriptions for this requestor.'
      description: 'Request information about the subscriptions for this requestor.'
      operationId: subGET
@@ -224,7 +224,7 @@ paths:
          $ref: '#/components/responses/429'
    post:
      tags:
        - 'unsupported'
        - 'v2xi'
      summary: ' create a new subscription to VIS notifications.'
      description: ' create a new subscription to VIS notifications.'
      operationId: subPOST
+0 −4
Original line number Diff line number Diff line
@@ -55,10 +55,6 @@ func SubGET(w http.ResponseWriter, r *http.Request) {
	notImplemented(w, r)
}

func SubPOST(w http.ResponseWriter, r *http.Request) {
	notImplemented(w, r)
}

func V2xMessagePOST(w http.ResponseWriter, r *http.Request) {
	notImplemented(w, r)
}
+4 −0
Original line number Diff line number Diff line
@@ -34,3 +34,7 @@ func Mec011AppTerminationPOST(w http.ResponseWriter, r *http.Request) {
func PredictedQosPOST(w http.ResponseWriter, r *http.Request) {
	predictedQosPost(w, r)
}

func SubPOST(w http.ResponseWriter, r *http.Request) {
	subscriptionsPost(w, r)
}
+9 −0
Original line number Diff line number Diff line
@@ -39,3 +39,12 @@ func convertProblemDetailstoJson(probdetails *ProblemDetails) string {
	}
	return string(jsonInfo)
}

func convertV2xMsgSubscriptionToJson(v2xMsgSubscription *V2xMsgSubscription) string {
	jsonInfo, err := json.Marshal(*v2xMsgSubscription)
	if err != nil {
		log.Error(err.Error())
		return ""
	}
	return string(jsonInfo)
}
+34 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2022  The AdvantEDGE Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * AdvantEDGE V2X Information Service REST API
 *
 * V2X Information Service is AdvantEDGE's implementation of [ETSI MEC ISG MEC030 V2XI API](http://www.etsi.org/deliver/etsi_gs/MEC/001_099/030/02.02.01_60/gs_MEC030v020201p.pdf) <p>[Copyright (c) ETSI 2017](https://forge.etsi.org/etsi-forge-copyright-notice.txt) <p>**Micro-service**<br>[meep-vis](https://github.com/InterDigitalInc/AdvantEDGE/tree/master/go-apps/meep-vis) <p>**Type & Usage**<br>Edge Service used by edge applications that want to get information about radio conditions in the network <p>**Note**<br>AdvantEDGE supports a selected subset of RNI API endpoints (see below) and a subset of subscription types.
 *
 * API version: 2.2.1
 * Contact: AdvantEDGE@InterDigital.com
 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
 */
package server

type ExpiryNotification struct {
	Links *ExpiryNotificationLinks `json:"_links"`

	ExpiryDeadline *TimeStamp `json:"expiryDeadline"`

	TimeStamp *TimeStamp `json:"timeStamp,omitempty"`
	// Shall be set to \"ExpiryNotification\"
	NotificationType string `json:"notificationType"`
}
Loading