Skip to content

Commit 9c84e36

Browse files
authored
Merge pull request #32 from specmatic/znsio-key-replace
chore: Replaced znsio key with specmatic
2 parents 0fdd294 + dfa084d commit 9c84e36

27 files changed

+211
-211
lines changed

404.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Welcome to the dark side of dynamic routing. But don't worry, Specmatic's got yo
3030

3131
- 🔁 [Return to Home](https://specmatic.io) — our landing page *does* exist. We tested it.
3232
- 📚 [Read the Docs](https://docs.specmatic.io) — for contract clarity and peace of mind.
33-
- 🐛 [Report an Issue](https://github.com/znsio/specmatic/issues) — unless this is the issue.
33+
- 🐛 [Report an Issue](https://github.com/specmatic/specmatic/issues) — unless this is the issue.
3434

3535
---
3636

_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ url: "https://docs.specmatic.io"
1313

1414
aux_links:
1515
"Specmatic on GitHub":
16-
- "https://github.com/znsio/specmatic"
16+
- "https://github.com/specmatic/specmatic"
1717

1818
plugins:
1919
- jekyll-seo-tag
@@ -38,7 +38,7 @@ mermaid:
3838
enable_copy_code_button: true
3939
gh_edit_link: true
4040
gh_edit_link_text: "Edit this page on GitHub"
41-
gh_edit_repository: "https://github.com/znsio/docs.specmatic.io"
41+
gh_edit_repository: "https://github.com/specmatic/docs.specmatic.io"
4242
gh_edit_branch: "main"
4343
gh_edit_view_mode: "edit"
4444

_includes/setup_command_line.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ The Specmatic standalone executable is accessible through various prominent dist
1010
You can run Specmatic using the following command:
1111

1212
``` bash
13-
docker run znsio/specmatic
13+
docker run specmatic/specmatic
1414
```
1515

1616
{% endtab %}
1717

1818
{% tab install java %}
19-
Download the standalone jar from our [Github releases](<https://github.com/znsio/specmatic/releases/download/{{ site.latest_release }}/specmatic.jar>) or [Maven Central](https://repo1.maven.org/maven2/io/specmatic/specmatic-executable-all/{{ site.latest_release }}/specmatic-executable-all-{{ site.latest_release }}.jar).
19+
Download the standalone jar from our [Github releases](<https://github.com/specmatic/specmatic/releases/download/{{ site.latest_release }}/specmatic.jar>) or [Maven Central](https://repo1.maven.org/maven2/io/specmatic/specmatic-executable-all/{{ site.latest_release }}/specmatic-executable-all-{{ site.latest_release }}.jar).
2020

2121
If you have downloaded the standalone jar from Maven Central, you may want to rename it as shown below for convenience.
2222

_includes/specmatic_config_v1.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Here is a sample configuration to get you started.
8989
"sources": [
9090
{
9191
"provider": "git",
92-
"repository": "https://github.com/znsio/specmatic-order-contracts.git",
92+
"repository": "https://github.com/specmatic/specmatic-order-contracts.git",
9393
"provides": [
9494
"io/specmatic/examples/store/openapi/api_order_v3.yaml"
9595
]
@@ -102,14 +102,14 @@ Here is a sample configuration to get you started.
102102
```yaml
103103
sources:
104104
- provider: git
105-
repository: https://github.com/znsio/specmatic-order-contracts.git
105+
repository: https://github.com/specmatic/specmatic-order-contracts.git
106106
provides:
107107
- io/specmatic/examples/store/openapi/api_order_v3.yaml
108108
```
109109
{% endtab %}
110110
{% endtabs %}
111111
112-
Place this file in the root folder of your project (Here is an [example](https://github.com/znsio/specmatic-order-api-java)). Let us now go through each of the lines in this file.
112+
Place this file in the root folder of your project (Here is an [example](https://github.com/specmatic/specmatic-order-api-java)). Let us now go through each of the lines in this file.
113113
* **provider** - At the moment we support all git based source control systems. Example: GitHub, Gitlab, Azure, etc.
114114
* **repository** - The git repository URL
115115
* **provides** - This is the list of API Specifications that need to be run as a test. Note that the path is relative to the source control repository root.
@@ -123,7 +123,7 @@ You can also specify the branch.
123123
"sources": [
124124
{
125125
"provider": "git",
126-
"repository": "https://github.com/znsio/specmatic-order-contracts.git",
126+
"repository": "https://github.com/specmatic/specmatic-order-contracts.git",
127127
"branch": "feature-1",
128128
"provides": [
129129
"io/specmatic/examples/store/openapi/api_order_v3.yaml"
@@ -137,7 +137,7 @@ You can also specify the branch.
137137
```yaml
138138
sources:
139139
- provider: git
140-
repository: https://github.com/znsio/specmatic-order-contracts.git
140+
repository: https://github.com/specmatic/specmatic-order-contracts.git
141141
branch: feature-1
142142
provides:
143143
- io/specmatic/examples/store/openapi/api_order_v3.yaml
@@ -152,7 +152,7 @@ Now if you run the ```specmatic test``` command line executable from the directo
152152
```shell
153153
% {{ site.spec_cmd }} test
154154
Loading config file ./specmatic.json
155-
Couldn't find local contracts, cloning https://github.com/znsio/specmatic-order-contracts.git into .specmatic/repos
155+
Couldn't find local contracts, cloning https://github.com/specmatic/specmatic-order-contracts.git into .specmatic/repos
156156
Resetting /<path where you are running the specmatic command>/.specmatic/repos/specmatic-order-contracts
157157
```
158158

@@ -169,7 +169,7 @@ By default, Specmatic searches for the directory ending with `_examples` to pick
169169
"sources": [
170170
{
171171
"provider": "git",
172-
"repository": "https://github.com/znsio/specmatic-order-contracts.git",
172+
"repository": "https://github.com/specmatic/specmatic-order-contracts.git",
173173
"provides": [
174174
"io/specmatic/examples/store/openapi/product_search_bff_v4.yaml"
175175
],
@@ -189,7 +189,7 @@ By default, Specmatic searches for the directory ending with `_examples` to pick
189189
```yaml
190190
sources:
191191
- provider: git
192-
repository: https://github.com/znsio/specmatic-order-contracts.git
192+
repository: https://github.com/specmatic/specmatic-order-contracts.git
193193
provides:
194194
- io/specmatic/examples/store/openapi/product_search_bff_v4.yaml
195195
consumes:
@@ -216,7 +216,7 @@ The default timeout is `6000 milliseconds`.
216216
"sources": [
217217
{
218218
"provider": "git",
219-
"repository": "https://github.com/znsio/specmatic-order-contracts.git",
219+
"repository": "https://github.com/specmatic/specmatic-order-contracts.git",
220220
"consumes": [
221221
"io/specmatic/examples/store/openapi/api_order_v3.yaml"
222222
]
@@ -232,7 +232,7 @@ The default timeout is `6000 milliseconds`.
232232
```yaml
233233
sources:
234234
- provider: git
235-
repository: https://github.com/znsio/specmatic-order-contracts.git
235+
repository: https://github.com/specmatic/specmatic-order-contracts.git
236236
consumes:
237237
- io/specmatic/examples/store/openapi/api_order_v3.yaml
238238
test:
@@ -252,7 +252,7 @@ The same configuration file can be leveraged to define stubs also.
252252
"sources": [
253253
{
254254
"provider": "git",
255-
"repository": "https://github.com/znsio/specmatic-order-contracts.git",
255+
"repository": "https://github.com/specmatic/specmatic-order-contracts.git",
256256
"consumes": [
257257
"io/specmatic/examples/store/openapi/api_order_v3.yaml"
258258
]
@@ -265,14 +265,14 @@ The same configuration file can be leveraged to define stubs also.
265265
```yaml
266266
sources:
267267
- provider: git
268-
repository: https://github.com/znsio/specmatic-order-contracts.git
268+
repository: https://github.com/specmatic/specmatic-order-contracts.git
269269
consumes:
270270
- io/specmatic/examples/store/openapi/api_order_v3.yaml
271271
```
272272
{% endtab %}
273273
{% endtabs %}
274274

275-
Please note that now we are now listing the ```api_order_v3.yaml``` is listed as a stub dependency. You can run the ```specmatic stub``` command and the Specmatic will clone the API specifications and run it as a stub. Here is an [example](https://github.com/znsio/specmatic-order-bff-java/blob/main/specmatic.yaml).
275+
Please note that now we are now listing the ```api_order_v3.yaml``` is listed as a stub dependency. You can run the ```specmatic stub``` command and the Specmatic will clone the API specifications and run it as a stub. Here is an [example](https://github.com/specmatic/specmatic-order-bff-java/blob/main/specmatic.yaml).
276276

277277
A single application may need to list the API Specifications it is implementing under the provides attribute and the API Specifications of its dependencies under the consumes attribute.
278278

@@ -393,7 +393,7 @@ Note that the `consumes` and `provides` can both contain URLs. `http` and `https
393393

394394
Usually source control requires authentication. Below are the ways in which you can set it up.
395395
* Recommended approach - Provide a Git SSH URL and make sure your environment already has necessary keys loaded. If the git clone command works on your regular command line, it will work within Specmatic too. This is most suitable in CI, because your CI server may already be setup to clone the application code (for which the CI server should already have the necessary keys). So it should already be able to clone your API Specifications also. The same also should be applicable for local development and testing environments.
396-
* Alternatives - With https URLs you can provide the bearer token or other means. Please reach us (raise a [github issue](https://github.com/znsio/specmatic/issues/new/choose)) if you need help with this.
396+
* Alternatives - With https URLs you can provide the bearer token or other means. Please reach us (raise a [github issue](https://github.com/specmatic/specmatic/issues/new/choose)) if you need help with this.
397397

398398
#### Report Configuration
399399
Specmatic can generate reports based on the below configuration:

documentation/authentication-by-reaching-another-service.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Authentication
2222

2323
Most APIs will not run unless provided a valid authentication token. When running contract tests, Specmatic needs to obtain a valid auth token to call authenticated APIs.
2424

25-
You can see how this in action in the [sample petstore project](https://github.com/znsio/petstore).
25+
You can see how this in action in the [sample petstore project](https://github.com/specmatic/petstore).
2626

2727
Here's a quick walk through of how it works.
2828

@@ -32,11 +32,11 @@ First off, write the contract of the auth API, and in it, declare tokens such as
3232

3333
In step 3, Specmatic will run this as as a test against the auth service to get the auth tokens. So we must provide the base url of the actual auth service in environment configuration.
3434

35-
Here's a [the petstore's auth contract](https://github.com/znsio/petstore-contracts/blob/master/in/specmatic/examples/petstore/auth.spec).
35+
Here's a [the petstore's auth contract](https://github.com/specmatic/petstore-contracts/blob/master/in/specmatic/examples/petstore/auth.spec).
3636

3737
### Setup the auth credentials
3838

39-
Look at the Examples table, in which we use the variables `$username` and `$password`. We do not hardcode them, because each environment (local, staging, etc) will need different auth credentials. These values come from environment configuration, where we can specify the auth credentials needed by each environment. See how this is done in `specmatic.json` in the [sample petstore application](https://github.com/znsio/petstore/blob/master/specmatic.json).
39+
Look at the Examples table, in which we use the variables `$username` and `$password`. We do not hardcode them, because each environment (local, staging, etc) will need different auth credentials. These values come from environment configuration, where we can specify the auth credentials needed by each environment. See how this is done in `specmatic.json` in the [sample petstore application](https://github.com/specmatic/petstore/blob/master/specmatic.json).
4040

4141
Note how we have declared two variables, username and password, in the staging environment:
4242

@@ -88,7 +88,7 @@ And export cookie = response-header.Cookie
8888

8989
Next we must connect auth contract with the actual contract that needs it.
9090

91-
Have a look at the sample petstore contract [api_petstore_v1.spec](https://github.com/znsio/petstore-contracts/blob/master/in/specmatic/examples/petstore/api_petstore_v1.spec).
91+
Have a look at the sample petstore contract [api_petstore_v1.spec](https://github.com/specmatic/petstore-contracts/blob/master/in/specmatic/examples/petstore/api_petstore_v1.spec).
9292

9393
You'll see in the background:
9494

@@ -121,14 +121,14 @@ In `($auth.token)`, `auth` is the `value` that we declared above, and `token` is
121121
## 3. Run the contract tests
122122

123123
### Declare the application contract in specmatic.json
124-
Make sure to declare the contract you're running as a test in [the Specmatic configuration](documentation/../configuration.html). Take a look at [specmatic.json in the petstore sample project](https://github.com/znsio/petstore/blob/master/specmatic.json) for an example of this. You can read more about [running contract tests using Specmatic here](documentation/../contract_tests.html).
124+
Make sure to declare the contract you're running as a test in [the Specmatic configuration](documentation/../configuration.html). Take a look at [specmatic.json in the petstore sample project](https://github.com/specmatic/petstore/blob/master/specmatic.json) for an example of this. You can read more about [running contract tests using Specmatic here](documentation/../contract_tests.html).
125125

126126
### Execute the tests
127127
Finally, run the tests. You must specify the environment while doing so, for Specmatic to pick up the variables and baseurls relevant to that environment.
128128

129129
If you're running the tests from a terminal, the command is `specmatic test --env=staging specfile.spec`
130130

131-
If you're running the tests from code, set a property named `environments`. Take a look at the [petstore sample](https://github.com/znsio/petstore/blob/master/src/test/java/com/petstore/test/PetStoreContractTest.java) to see an example of this.
131+
If you're running the tests from code, set a property named `environments`. Take a look at the [petstore sample](https://github.com/specmatic/petstore/blob/master/src/test/java/com/petstore/test/PetStoreContractTest.java) to see an example of this.
132132

133133
### How Specmatic runs the tests
134134
The tests are run in 2 stages.

documentation/authentication.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,27 +116,27 @@ So for Contract as Test we recommend having a “Test Security Configuration”
116116

117117
### OAuth2
118118

119-
Please refer to this [sample API](https://github.com/znsio/specmatic-order-contracts/blob/main/io/specmatic/examples/store/openapi/api_order_with_oauth_v3.yaml) specification which leverages [OAuth2](https://spec.openapis.org/oas/v3.0.1#implicit-oauth2-sample) to protect all endpoints that add, modify or delete data.
119+
Please refer to this [sample API](https://github.com/specmatic/specmatic-order-contracts/blob/main/io/specmatic/examples/store/openapi/api_order_with_oauth_v3.yaml) specification which leverages [OAuth2](https://spec.openapis.org/oas/v3.0.1#implicit-oauth2-sample) to protect all endpoints that add, modify or delete data.
120120

121121
#### Wiring up dummy / mock authentication
122122

123123
![Specmatic Sample Application to demonstrate OpenAPI OAuth2 security scheme support](/images/SpecmaticOAuth.gif)
124124

125-
Please refer to [sample springboot application](https://github.com/znsio/specmatic-order-api-java-with-oauth) that implements the [API](https://github.com/znsio/specmatic-order-contracts/blob/main/io/specmatic/examples/store/openapi/api_order_with_oauth_v3.yaml) we saw above.
125+
Please refer to [sample springboot application](https://github.com/specmatic/specmatic-order-api-java-with-oauth) that implements the [API](https://github.com/specmatic/specmatic-order-contracts/blob/main/io/specmatic/examples/store/openapi/api_order_with_oauth_v3.yaml) we saw above.
126126

127127
### API Key Authentication
128128

129-
Please refer to this [sample API](https://github.com/znsio/specmatic-order-contracts/blob/main/io/specmatic/examples/store/openapi/api_order_v3.yaml) specification which leverages [ApiKeyAuth](https://spec.openapis.org/oas/v3.0.1#api-key-sample) to protect all endpoints that add, modify or delete data.
129+
Please refer to this [sample API](https://github.com/specmatic/specmatic-order-contracts/blob/main/io/specmatic/examples/store/openapi/api_order_v3.yaml) specification which leverages [ApiKeyAuth](https://spec.openapis.org/oas/v3.0.1#api-key-sample) to protect all endpoints that add, modify or delete data.
130130

131131
#### Wiring up dummy / mock authentication
132132

133-
Please refer to [sample springboot application](https://github.com/znsio/specmatic-order-api-java) that implements the [API](https://github.com/znsio/specmatic-order-contracts/blob/main/io/specmatic/examples/store/openapi/api_order_v3.yaml) we saw above.
133+
Please refer to [sample springboot application](https://github.com/specmatic/specmatic-order-api-java) that implements the [API](https://github.com/specmatic/specmatic-order-contracts/blob/main/io/specmatic/examples/store/openapi/api_order_v3.yaml) we saw above.
134134

135135
This has two API security configurations
136-
* [Production Security Config](https://github.com/znsio/specmatic-order-api-java/blob/main/src/main/java/com/store/config/SecurityConfig.kt) - This fetches user from the DB based on api token in request header
137-
* [Test Security Config](https://github.com/znsio/specmatic-order-api-java/blob/main/src/test/java/com/store/config/TestSecurityConfig.kt) - This always returns a dummy user principal. However rest of the code such as reading the authentication token from header etc. are still tested.
136+
* [Production Security Config](https://github.com/specmatic/specmatic-order-api-java/blob/main/src/main/java/com/store/config/SecurityConfig.kt) - This fetches user from the DB based on api token in request header
137+
* [Test Security Config](https://github.com/specmatic/specmatic-order-api-java/blob/main/src/test/java/com/store/config/TestSecurityConfig.kt) - This always returns a dummy user principal. However rest of the code such as reading the authentication token from header etc. are still tested.
138138

139-
So when you run the [ContractTest](https://github.com/znsio/specmatic-order-api-java/blob/main/src/test/java/com/store/ContractTest.java) it will still exercise your security plumbing (does the application accept the proper header name, datatype, etc.).
139+
So when you run the [ContractTest](https://github.com/specmatic/specmatic-order-api-java/blob/main/src/test/java/com/store/ContractTest.java) it will still exercise your security plumbing (does the application accept the proper header name, datatype, etc.).
140140

141141
This is just an example of how we can wire up security configurations for test and production environments. Even in SpringBoot you can leverage other techniques such as [Spring Profiles](https://docs.spring.io/spring-boot/docs/1.2.0.M1/reference/html/boot-features-profiles.html) to achieve the same effect.
142142

documentation/authoring_contracts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ OR
4646

4747
Using docker:
4848
```shell
49-
docker run -p 9000:9000 -v "$PWD/specification:/specification" znsio/specmatic proxy --target=https://dummyjson.com /specification
49+
docker run -p 9000:9000 -v "$PWD/specification:/specification" specmatic/specmatic proxy --target=https://dummyjson.com /specification
5050
```
5151

5252
You will get following confirmation message: <br> `Proxy server is running on http://localhost:9000. Ctrl + C to stop.`

documentation/backward_compatibility.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ npx specmatic compare api_products_v1.yaml api_products_v2.yaml
534534
{% endtab %}
535535
{% tab compare docker %}
536536
```bash
537-
docker run -v "/local-directory:/specs" znsio/specmatic compare "/specs/api_products_v1.yaml" "/specs/api_products_v2.yaml"
537+
docker run -v "/local-directory:/specs" specmatic/specmatic compare "/specs/api_products_v1.yaml" "/specs/api_products_v2.yaml"
538538
```
539539
{% endtab %}
540540
{% endtabs %}
@@ -601,7 +601,7 @@ npx specmaitc compare api_products_v1.yaml api_products_v2.yaml
601601
{% endtab %}
602602
{% tab compare2 docker %}
603603
```bash
604-
docker run -v "/local-directory:/specs" znsio/specmatic compare "/specs/api_products_v1.yaml" "/specs/api_products_v2.yaml"
604+
docker run -v "/local-directory:/specs" specmatic/specmatic compare "/specs/api_products_v1.yaml" "/specs/api_products_v2.yaml"
605605
```
606606
{% endtab %}
607607
{% endtabs %}
@@ -642,7 +642,7 @@ npx specmatic compatible git file api_products_v1.yaml
642642
{% endtab %}
643643
{% tab git-compare docker %}
644644
```bash
645-
docker run -v "/git-repo:/git-repo" znsio/specmatic compatible git file "/git-repo/api_products_v1.yaml"
645+
docker run -v "/git-repo:/git-repo" specmatic/specmatic compatible git file "/git-repo/api_products_v1.yaml"
646646
```
647647
{% endtab %}
648648
{% endtabs %}
@@ -674,7 +674,7 @@ npx specmatic compatible git commits api_products_v1.yaml HEAD HEAD^1
674674
{% endtab %}
675675
{% tab ci-compare docker %}
676676
```bash
677-
docker run -v "/git-repo:/git-repo" znsio/specmatic compatible git commits "/git-repo/api_products_v1.yaml" HEAD HEAD^1
677+
docker run -v "/git-repo:/git-repo" specmatic/specmatic compatible git commits "/git-repo/api_products_v1.yaml" HEAD HEAD^1
678678
```
679679
{% endtab %}
680680
{% endtabs %}

0 commit comments

Comments
 (0)