Matt Corby
01/30/2023, 11:52 AMEugene Malihins
01/31/2023, 3:46 PMswagger-mock-validator
output? What confuses me is comparison of mock response body to value: [ [Object], [Object] ]
. It's not clear what is incompatible. I've omitted a bunch of fields in the mock for brevity.
1 error(s)
response.body.incompatible: 1
0 warning(s)
{
warnings: [],
errors: [
{
code: 'response.body.incompatible',
message: 'Response body is incompatible with the response body schema in the spec file: should match exactly one schema in oneOf',
mockDetails: {
interactionDescription: '6cee5dad-fe47-4ab7-9384-d53d5260427a',
interactionState: '[none]',
location: '[root].interactions[27].response.body',
mockFile: './msw_generated_pacts/dashboard-web-api-1675179158185.json',
value: {
createdAt: '2022-10-30T00:00:00Z',
"...": "...",
status: 'DRAFT',
}
},
source: 'spec-mock-validation',
specDetails: {
location: '[root].paths./api/invoices/{id}/payment-status.put.responses.200.content.application/json.schema.oneOf',
pathMethod: 'put',
pathName: '/api/invoices/{id}/payment-status',
specFile: 'dereferencedSchema.json',
value: [ [Object], [Object] ]
},
type: 'error'
}
]
}
Jerome Hordies
02/02/2023, 1:31 PMKeith Waters
02/02/2023, 4:44 PMJoão Farias
02/03/2023, 9:45 AMWerner Lauterfeld
02/03/2023, 1:56 PMEugene Malihins
02/03/2023, 3:15 PMMatt Yao
02/06/2023, 6:36 AMError making request to https://{PACTFLOW_HOST} status=400 {"errors":{"verificationResults.success":["success is missing"],"verificationResults.content":["content is missing"],"verificationResults.contentType":["contentType is missing"]}}
. So obviously, some of the params are mandatory that I missed, but the doc didn't clearly say which ones are and I am trying to figure it out.
The followings are the references and the examples I am following, with my scriptsEugene Malihins
02/06/2023, 3:06 PMERROR: Error making request - Net::ReadTimeout Net::ReadTimeout with #<TCPSocket:(closed)> /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/http_client.rb:80:in `block (2 levels) in perform_request', attempt 1 of 5
ERROR: Error making request - Net::ReadTimeout Net::ReadTimeout with #<TCPSocket:(closed)> /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/http_client.rb:80:in `block (2 levels) in perform_request', attempt 2 of 5
ERROR: Error making request - Net::ReadTimeout Net::ReadTimeout with #<TCPSocket:(closed)> /usr/lib/ruby/gems/3.0.0/gems/pact_broker-client-1.66.0/lib/pact_broker/client/hal/http_client.rb:80:in `block (2 levels) in perform_request', attempt 4 of 5
Error retrieving matrix. PactBroker::Client::Hal::ErrorResponseReturned - Error making request to ***/matrix status=502 <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
</body>
Priyanka Soni
02/09/2023, 1:17 PMTommy Chen
02/10/2023, 1:11 AMNoor Hashem
02/10/2023, 2:43 PMJacob Buckley
02/13/2023, 10:58 PMpact-provider-verifier
keeps returning with something similar to the following: (organization and project have been masked)
/usr/lib/ruby/gems/3.1.0/gems/pact-1.63.0/lib/pact/hal/entity.rb:102:in 'assert_success!': Error retrieving https://${organization}.<http://pactflow.io/pacts/provider/${project}-provider-golang/for-verification|pactflow.io/pacts/provider/${project}-provider-golang/for-verification> status=404 {"error":"The requested document was not found on this server."} (Pact::hal::ErrorResponseReturned)
Tomer Ghelber
02/15/2023, 12:45 PMJay Wang
02/16/2023, 11:56 PMThomas
02/17/2023, 11:42 AMGET /users/{user_id}/settings
{user_id}
is defined as string
with a regex to validate the format in detail (int, uuid or other formats).
The consumer calls the API with GET /users/1234/settings
and the pact check fails with "No request method is found /users/1234/settings" => "Path or method not defined in spec file: GET /users/1234/settings"
.
When I remove the regex check from the producer OAS file, then the pact check works.Noor Hashem
02/17/2023, 7:59 PMrequire 'pact/provider/rspec'
require "./spec/pact/provider_states_for_order_item_categories"
Pact.service_provider "monolith" do
honours_pact_with 'testDemo_platform_payment_service' do
pact_broker_base_url = ''
pact_broker_client = PactBroker::Client.new(base_url: pact_broker_base_url)
pact_url = pact_broker_client.pact_url('monolith', 'testDemo_platform_payment_service')
pact_uri pact_url
publish_verification_results true
enable_pending true
include_wip_pacts_since "2020-01-01"
end
end
Mayank Chugh
02/17/2023, 10:24 PMNoor Hashem
02/21/2023, 3:33 PMError retrieving <https://applyboard>.<name>.io status=401 Unauthorized. Please see <https://docs.pactflow.io/docs/login-help> for more information. (Pact::Error)
I have already followed the steps outlined here: https://docs.pactflow.io/docs/login-help/#getting-a-401-unauthorized-when-publishing-or-verifying-pacts
Package should be up to date, i'm using pact gem version 1.32. Using the read/write token from pactflow. And I followed the provider code in pact_helper.spec here: https://docs.pactflow.io/#configuring-your-api-tokenJerry Wang
02/27/2023, 7:34 AMpactfoundation/pact-cli:0.51.0.0
. The audit was done by running the Trivy security scanner and result can be easily reproduced locally. As the latest tag is published 3 months ago, I'm wondering if there is a plan to release a newer image to patch those vulnerabilities?Noor Hashem
02/28/2023, 8:45 PMconfig.include Devise::Test::IntegrationHelpers, type: :request
This is the code I have atm:
require "rails_helper"
Pact.provider_states_for "testDemo_platform_payment_service" do
provider_state "Order items exist" do
set_up do
user = User.create!(
username: "admin1",
email: "<mailto:example@applyboard.net|example@applyboard.net>",
role: "admin",
password: "example",
password_setup: true,
blocked: false,
has_accepted_terms: false,
has_accepted_privacy: false,
)
sign_in user
end
end
end
Nigel Finley
02/28/2023, 9:03 PM???
and we can't click into it to delete it or anything (see image below). When we do we get a blank screen. Is there a way to delete this via api or otherwise? We'd really like to remove this from our dashboard. Thank you so much.Thomas
03/01/2023, 12:15 PMresponses:
error-400-bad-request:
description: ''
content:
application/vnd.api+json:
schema:
type: object
properties:
errors:
type: array
items:
type: object
properties:
source:
type: object
properties:
parameter:
type: string
pointer:
type: string
code:
type: string
enum:
- BAD_REQUEST
- UNPROCESSABLE_ENTITY
status:
type: string
enum:
- '400'
- '422'
details:
type: string
required:
- code
- status
required:
- errors
examples:
Example 1:
value:
errors:
- source:
parameter: id
detail: is in invalid format
code: BAD_REQUEST
status: '400'
Example:
{
"errors": [
{
"source": {
"parameter": "id"
},
"detail": "is in invalid format",
"code": "BAD_REQUEST",
"status": "400"
}
]
}
The client/consumer used the following mocked response body:
{
errors: [
{
status: "400",
code: "INVALID_QUERY_PARAMETER",
source: {
params: "foobar"
}
}
]
}
It expected the undefined params
instead of parameters
, but pactflow didn't detect an error.Abraham
03/01/2023, 4:30 PMMayank Chugh
03/02/2023, 10:23 AMcontract_requiring_verification_published
is being fired even when there is no change in the contract from last “latest” published contractDominik Chmielarz
03/02/2023, 5:08 PMSugi S
03/03/2023, 3:55 PMYousaf Nabi (pactflow.io)
Mark Wilson
03/07/2023, 3:20 PMHazem Borham
03/07/2023, 5:03 PMfor-verification
pacts, however we have a pending pact to be verified on a feature branch for both the consumer and provider.