Commit ee426e75 authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

review follow-up + fixes

parent 0b27e811
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ To see how to make this your own, look here:
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)

- API version: 0.0.1
- Build date: 2021-07-29T15:25:22.618-04:00
- Build date: 2021-07-30T10:28:36.704-04:00


### Running the server
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ To see how to make this your own, look here:
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)

- API version: 0.0.1
- Build date: 2021-07-29T15:25:24.062-04:00
- Build date: 2021-07-30T10:28:38.093-04:00


### Running the server
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ To see how to make this your own, look here:
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)

- API version: 2.1.1
- Build date: 2021-07-29T15:25:26.084878-04:00[America/Toronto]
- Build date: 2021-07-30T10:28:40.068467-04:00[America/Toronto]


### Running the server
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ To see how to make this your own, look here:
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)

- API version: 2.1.1
- Build date: 2021-07-29T15:25:28.566368-04:00[America/Toronto]
- Build date: 2021-07-30T10:28:42.485184-04:00[America/Toronto]


### Running the server
+10 −4
Original line number Diff line number Diff line
@@ -701,7 +701,7 @@ func applicationsSubscriptionsGET(w http.ResponseWriter, r *http.Request) {
	}

	// Retrieve subscription list
	subscriptionLinkList := new(MecServiceMgmtApiSubscriptionLinkList)
	var subscriptionLinkList MecServiceMgmtApiSubscriptionLinkList
	link := new(MecServiceMgmtApiSubscriptionLinkListLinks)
	self := new(LinkType)
	self.Href = hostUrl.String() + basePath + "applications/" + appInstanceId + "/subscriptions"
@@ -1033,13 +1033,19 @@ func populateSubscriptionsList(key string, jsonInfo string, data interface{}) er
		return errors.New("subscriptionLinkList not found")
	}

	// Retrieve user info from DB
	var subscription MecServiceMgmtApiSubscriptionLinkListSubscription
	err := json.Unmarshal([]byte(jsonInfo), &subscription)
	// Retrieve service availability subscription
	var serAvailSubscription SerAvailabilityNotificationSubscription
	err := json.Unmarshal([]byte(jsonInfo), &serAvailSubscription)
	if err != nil {
		return err
	}

	// Populate subscription to return
	var subscription MecServiceMgmtApiSubscriptionLinkListSubscription
	subscription.Href = serAvailSubscription.Links.Self.Href
	//in v2.1.1 it should be SubscriptionType, but spec is expecting "rel" as per v1.1.1
	subscription.Rel = SER_AVAILABILITY_NOTIFICATION_SUBSCRIPTION_TYPE

	// Add subscription to list
	subscriptionLinkList.Links.Subscriptions = append(subscriptionLinkList.Links.Subscriptions, subscription)
	return nil
Loading