{"id":16481224,"url":"https://github.com/dfinke/psmatcher","last_synced_at":"2025-07-28T19:10:21.341Z","repository":{"id":66743390,"uuid":"120051182","full_name":"dfinke/PSMatcher","owner":"dfinke","description":"PSMatcher is a test utility, that lets you easily test responses and json, when some part of the response is something out of your control (autogenerated id, guid, datetime etc). (And More)","archived":false,"fork":false,"pushed_at":"2018-03-08T00:44:07.000Z","size":1236,"stargazers_count":29,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T15:21:18.126Z","etag":null,"topics":["powershell"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dfinke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-02-03T02:06:03.000Z","updated_at":"2025-01-23T20:56:13.000Z","dependencies_parsed_at":"2023-04-18T17:30:45.725Z","dependency_job_id":null,"html_url":"https://github.com/dfinke/PSMatcher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dfinke/PSMatcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinke%2FPSMatcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinke%2FPSMatcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinke%2FPSMatcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinke%2FPSMatcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfinke","download_url":"https://codeload.github.com/dfinke/PSMatcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinke%2FPSMatcher/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267570022,"owners_count":24109182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["powershell"],"created_at":"2024-10-11T13:06:47.392Z","updated_at":"2025-07-28T19:10:21.291Z","avatar_url":"https://github.com/dfinke.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PSMatcher\nPSMatcher is a test utility, that lets you easier test responses and json, when some part of the response is something out of your control (autogenerated id, guid, datetime etc).\n\nIt's here on the [PowerShell Gallery](https://www.powershellgallery.com/packages/PSMatcher)\n\n* Appveyor build - [![Build status](https://ci.appveyor.com/api/projects/status/8yhhd5qu00pp04ue/branch/master?svg=true)](https://ci.appveyor.com/project/dfinke/psmatcher/branch/master)\n\n* Travis-ci build - [![Build Status](https://travis-ci.org/dfinke/PSMatcher.svg?branch=master)](https://travis-ci.org/dfinke/PSMatcher)\n\n# Overview\nThis PowerShell has been tested on Windows in both v5.1 and v6.0\n\n```powershell\nImport-Module -Name \"$PSScriptRoot\\..\\PSMatcher.psm1\" -Force\n\n$actual = @\"\n{\n    \"id\" : \"5a645a20-5225-431b-8c62-031b87f58b73\",\n    \"subnode\" : {\n        \"city\" : \"NY\",\n        \"zipCode\" : \"80-000\",\n        \"meta\" : {\n            \"name\" : \"foobar\",\n            \"shipping\": 99.99,            \n            \"enabled\" : false,\n            \"_link\" : \"http://example.com?page=2\",\n            \"_something\" : null,\n            \"_arr\" : [1, 2, 3],\n            \"_date\" : \"2018-01-01\"\n        }\n    }\n}\n\"@\n\n$expected = @\"\n{\n    \"id\" : \"@guid@\",\n    \"subnode\" : {\n        \"city\" : \"NY\",\n        \"zipCode\" : \"@string@\",\n        \"meta\" : {\n            \"name\" : \"@string@.Contains('bar')\",\n            \"shipping\": \"@double@\",\n            \"enabled\" : \"@bool@\",\n            \"_link\" : \"@any@\",\n            \"_something\" : \"@null@\",\n            \"_arr\" : [1, 2, 3],\n            \"_date\" : \"@string@.IsDateTime()\"\n        }\n    }\n}\n\"@\n\n# True Result\nTest-Json -Value $actual -Reference $expected\n\n# False Result\nTest-Json -Value $actual -Reference '{}'\n```\n# Results\n```\nSuccessful ErrorMessage                              Result                  \n---------- ------------                              ------                  \n      True                                           NMatcher.Matching.Result\n     False Expected value did not appear at path id. NMatcher.Matching.Result\n```\n\n# In addition\nThe matcher also checks if elements are missing or if too many are supplied.\n\n**Stay Tuned**: Examples will be added showing how well this works with PowerShell objects and Hashtables.\n\n# Available Expressions\n\n* @string@\n* @int@\n* @double@\n* @bool@\n* @null@\n* @any@\n* @guid@\n\n# Credits\nThis wraps [NMatcher](https://github.com/defrag/NMatcher). Check out that readme for more detail.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfinke%2Fpsmatcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfinke%2Fpsmatcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfinke%2Fpsmatcher/lists"}