Skip to content

Commit

Permalink
Update the references to specmatic_json.html into configuration.html …
Browse files Browse the repository at this point in the history
…and make configuration.html as the default page
  • Loading branch information
yogeshnikam671 committed Jun 13, 2024
1 parent 41066ae commit f8d4f4a
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion archive/api_gateways.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ That leaves the external consumer, which needs to use the contract for service v

Specmatic provides a hook named `stub_load_contract` in which the necessary modifications can be made to the provider contract, so that it looks exactly the way a consumer sees it.

Register it in [specmatic.json](/documentation/specmatic_json.html#hooks) in the section on hooks.
Register it in [specmatic.json](/documentation/configuration.html#hooks) in the section on hooks.

The hooks snippet in specmatic.json would look like this:

Expand Down
2 changes: 1 addition & 1 deletion documentation/api_gateways.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ That leaves the external consumer, which needs to use the contract for service v

Specmatic provides a hook named `stub_load_contract` in which the necessary modifications can be made to the provider contract, so that it looks exactly the way a consumer sees it.

Register it in [specmatic.json](/documentation/specmatic_json.html#hooks) in the section on hooks.
Register it in [Specmatic configuration](/documentation/configuration.html#hooks) in the section on hooks.

The hooks snippet in specmatic.json would look like this:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ In `($auth.token)`, `auth` is the `value` that we declared above, and `token` is
## 3. Run the contract tests

### Declare the application contract in specmatic.json
Make sure to declare the contract you're running as a test in [specmatic.json](documentation/../specmatic_json.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).
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).

### Execute the tests
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.
Expand Down
4 changes: 2 additions & 2 deletions documentation/central_contract_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ The goal of Central Contract Repo is to help all stakeholders collaborate over A

### Specmatic Configuration

Both consumers and providers can leverage the specifications in the Central Contract Repository by listing it in [Specmatic config](https://specmatic.in/documentation/specmatic_json.html). Example:
Both consumers and providers can leverage the specifications in the Central Contract Repository by listing it in [Specmatic configuration](https://specmatic.in/documentation/configuration.html). Example:
* [Sample Consumer](https://github.com/znsio/specmatic-order-ui) referring to [api_order_v1.yaml](https://github.com/znsio/specmatic-order-contracts/blob/main/in/specmatic/examples/store/api_order_v1.yaml) as [Smart Mock](https://github.com/znsio/specmatic-order-ui/blob/main/specmatic.json)
* [Sample Provider / API](https://github.com/znsio/specmatic-order-api) referring [api_order_v1.yaml](https://github.com/znsio/specmatic-order-contracts/blob/main/in/specmatic/examples/store/api_order_v1.yaml) as [Contract as Test](https://github.com/znsio/specmatic-order-api)

Specmatic will always pull the latest specification files from the version control system for both applications.

[**Specmatic Configuration in detail**](/documentation/specmatic_json.html)
[**Specmatic Configuration in detail**](/documentation/configuration.html)
3 changes: 3 additions & 0 deletions documentation/configuration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
layout: default
title: Configuration
parent: Documentation
nav_order: 14
---
{% include specmatic_config.md %}

2 changes: 1 addition & 1 deletion documentation/service_virtualization_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ Now you can import the utilty to create the stub server. Below code snippets are
import `in`.specmatic.stub.createStub
```

This utility can now be used in your test ```setup``` / ```beforeAll``` method to start the stub server. Specmatic automatically looks for your [Specmatic configuration](/documentation/specmatic_json.html) file in project root directory / classpath to locate your API Specification files that need to run as part of the stub server.
This utility can now be used in your test ```setup``` / ```beforeAll``` method to start the stub server. Specmatic automatically looks for your [Specmatic configuration](/documentation/configuration.html) file in project root directory / classpath to locate your API Specification files that need to run as part of the stub server.

```kotlin
@BeforeAll
Expand Down
3 changes: 0 additions & 3 deletions documentation/specmatic_json.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
---
layout: default
title: Configuration
parent: Documentation
nav_order: 14
---
{% include specmatic_config.md %}
4 changes: 2 additions & 2 deletions roadmap/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ <h3 class="uael-timeline-heading">Completed</h3> </div>
<div class="uael-content">
<div class="uael-timeline-heading-text">
<h3 class="uael-timeline-heading">Completed</h3> </div>
<div class="uael-timeline-desc-content"><p>&#8211; <a href="https://specmatic.in/updates/redis-stubbing-with-specmatic-contract-testing/" target="_blank" rel="noopener">Redis Stub</a> &#8211; (Pro plan +)<br>&#8211; <a href="https://www.npmjs.com/package/specmatic" target="_blank" rel="noopener">Node wrapper v2</a><br>&#8211; <a href="https://specmatic.in/documentation/specmatic_json.html#hooks" target="_blank" rel="noopener">Hooks for emulating payment gateways</a><br>&#8211; Maintenance updates</p></div> </div>
<div class="uael-timeline-desc-content"><p>&#8211; <a href="https://specmatic.in/updates/redis-stubbing-with-specmatic-contract-testing/" target="_blank" rel="noopener">Redis Stub</a> &#8211; (Pro plan +)<br>&#8211; <a href="https://www.npmjs.com/package/specmatic" target="_blank" rel="noopener">Node wrapper v2</a><br>&#8211; <a href="https://specmatic.in/documentation/configuration.html#hooks" target="_blank" rel="noopener">Hooks for emulating payment gateways</a><br>&#8211; Maintenance updates</p></div> </div>
<div class="uael-timeline-arrow"></div>
</div>
</div>
Expand Down Expand Up @@ -1025,4 +1025,4 @@ <h3 class="elementor-heading-title elementor-size-default">Got an idea you would
<script>/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())},!1);</script>
<script data-cfasync="false" data-no-optimize="1" data-no-defer="1" data-no-minify="1">const swisAutoLoadDuration = 10;const swisEventList=["keydown","mousemove","scroll","wheel","touchstart","touchend","touchmove"],swisAutoLoadTimeout=setTimeout(swisLoadScripts,1e3*swisAutoLoadDuration);function swisTriggerScriptLoad(){swisLoadScripts(),clearTimeout(swisAutoLoadTimeout),swisEventList.forEach(function(s){window.removeEventListener(s,swisTriggerScriptLoad,{passive:!0})})}function swisLoadScripts(){document.querySelectorAll("script[data-swis-src]").forEach(function(s){s.setAttribute("src",s.getAttribute("data-swis-src"))})}swisEventList.forEach(function(s){window.addEventListener(s,swisTriggerScriptLoad,{passive:!0})});</script><script data-cfasync="false" data-no-optimize="1" data-no-defer="1" data-no-minify="1">function SWISRemoveCriticalCSS(){var e;document.querySelector('link[data-swis="loading"]')?setTimeout(SWISRemoveCriticalCSS,200):(e=document.getElementById("swis-critical-css"))&&"remove"in e&&e.remove()}window.addEventListener?window.addEventListener("load",SWISRemoveCriticalCSS):window.attachEvent&&window.attachEvent("onload",SWISRemoveCriticalCSS);</script>
</body>
</html>
</html>
8 changes: 7 additions & 1 deletion sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,12 @@
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://specmatic.in/documentation/configuration.html</loc>
<lastmod>2024-06-13</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://specmatic.in/documentation/authentication.html</loc>
<lastmod>2024-05-20</lastmod>
Expand Down Expand Up @@ -684,4 +690,4 @@
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
</urlset>
</urlset>
2 changes: 1 addition & 1 deletion wp-json/wp/v2/pages/2003/index.html

Large diffs are not rendered by default.

0 comments on commit f8d4f4a

Please sign in to comment.