Skip to content

Commit

Permalink
PP-4862 Fix API specs for paymentId, providerId
Browse files Browse the repository at this point in the history
- paymentId, providerId are currently generated as-is as @JsonPropery/@ApiModelProperty doesn't name the fields explicitly.
  • Loading branch information
kbottla committed Feb 26, 2019
1 parent 062a60b commit 4ae5f8a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/java/uk/gov/pay/api/model/CreatePaymentResult.java
Expand Up @@ -35,7 +35,7 @@ public class CreatePaymentResult {
private SupportedLanguage language;

@JsonProperty
@ApiModelProperty(example = "hu20sqlact5260q2nanm0q8u93")
@ApiModelProperty(name = "payment_id", example = "hu20sqlact5260q2nanm0q8u93")
private String paymentId;

@JsonProperty
Expand Down Expand Up @@ -65,6 +65,6 @@ public class CreatePaymentResult {
private PaymentLinks links;

@JsonProperty
@ApiModelProperty(example = "null")
@ApiModelProperty(name = "provider_id", example = "null")
private String providerId;
}
8 changes: 7 additions & 1 deletion swagger/swagger.json
Expand Up @@ -743,7 +743,7 @@
"example" : "en",
"enum" : [ "ENGLISH", "WELSH" ]
},
"paymentId" : {
"payment_id" : {
"type" : "string",
"example" : "hu20sqlact5260q2nanm0q8u93"
},
Expand All @@ -765,6 +765,10 @@
"_links" : {
"$ref" : "#/definitions/PaymentLinks"
},
"provider_id" : {
"type" : "string",
"example" : "null"
},
"refund_summary" : {
"$ref" : "#/definitions/RefundSummary"
},
Expand Down Expand Up @@ -878,6 +882,7 @@
},
"provider_id" : {
"type" : "string",
"example" : "reference-from-payment-gateway",
"readOnly" : true
},
"_links" : {
Expand Down Expand Up @@ -987,6 +992,7 @@
},
"provider_id" : {
"type" : "string",
"example" : "reference-from-payment-gateway",
"readOnly" : true
},
"_links" : {
Expand Down

0 comments on commit 4ae5f8a

Please sign in to comment.