Skip to content

Commit a860545

Browse files
authored
doc: reviewed and fix documentation (#39)
Signed-off-by: Frédéric BIDON <fredbi@yahoo.com>
1 parent 9791cfa commit a860545

16 files changed

Lines changed: 364 additions & 349 deletions

File tree

docs/doc-site/_index.md

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ Import this library in your project like so.
7171

7272
const expected = "expected result"
7373

74-
result := printImports(input)
75-
if result != expected {
76-
t.Errorf(
77-
"Expected: %s. Got: %s",
78-
expected, result,
79-
)
80-
81-
return
82-
}
74+
result := printImports(input)
75+
if result != expected {
76+
t.Errorf(
77+
"Expected: %s. Got: %s",
78+
expected, result,
79+
)
80+
81+
return
82+
}
8383
```
8484
{{% /card %}}
8585

@@ -94,10 +94,9 @@ Import this library in your project like so.
9494

9595
const expected = "expected result"
9696

97-
require.Equalf(t,
98-
expected, printImports(input),
99-
"Expected: %s. Got: %s",
100-
expected, result,
97+
result := printImports(input)
98+
require.Equalf(t, expected, result,
99+
"Expected: %s. Got: %s", expected, result,
101100
)
102101
```
103102
{{% /card %}}
@@ -169,6 +168,23 @@ See also our [CONTRIBUTING guidelines](./project/contributing/CONTRIBUTING.md).
169168

170169
---
171170

171+
## See Also
172+
173+
**Getting Started:**
174+
- [Usage Guide](./usage/USAGE.md) - API conventions and how to navigate the documentation
175+
- [Tutorial](./usage/TUTORIAL.md) - Best practices and patterns for writing great tests
176+
- [Examples](./usage/EXAMPLES.md) - Practical code examples for common testing scenarios
177+
178+
**Advanced Topics:**
179+
- [Generics Guide](./usage/GENERICS.md) - Type-safe assertions with 38 generic functions
180+
- [Migration Guide](./usage/MIGRATION.md) - Migrating from stretchr/testify v1
181+
- [Changes from v1](./usage/CHANGES.md) - All changes and improvements in v2
182+
183+
**Reference:**
184+
- [API Reference](./api/_index.md) - Complete assertion catalog organized by domain
185+
186+
---
187+
172188
{{< children type="card" description="true" >}}
173189

174190
[doc-examples]: ./usage/examples

docs/doc-site/api/_index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ Each domain contains assertions regrouped by their use case (e.g. http, json, er
5353

5454
---
5555

56+
## See Also
57+
58+
- [Usage Guide](../usage/USAGE.md) - API conventions, naming patterns, and how to navigate assertions
59+
- [Examples](../usage/EXAMPLES.md) - Practical examples showing how to use these assertions
60+
- [Generics Guide](../usage/GENERICS.md) - Type-safe variants of assertions (marked with {{% icon icon="star" color=orange %}})
61+
- [Tutorial](../usage/TUTORIAL.md) - Best practices for writing tests with testify
62+
- [pkg.go.dev](https://pkg.go.dev/github.com/go-openapi/testify/v2) - Full API reference documentation
63+
64+
---
65+
5666
Generated with github.com/go-openapi/testify/codegen/v2
5767

5868
[godoc-badge]: https://pkg.go.dev/badge/github.com/go-openapi/testify/v2

docs/doc-site/project/README.md

Lines changed: 26 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ weight: 1
2020
> occasions.
2121
>
2222
> In this fork, all external stuff is either internalized (`go-spew`, `difflib`),
23-
> removed (`mocks`, `suite`, `http`) or specifically enabled by importing a specific module
24-
> (`github.com/go-openapi/testify/v2/enable/yaml`).
23+
> removed (`mocks`, `suite`, `http`) or specifically enabled by importing this module
24+
> (`github.com/go-openapi/testify/enable/yaml/v2`).
2525
2626
2. Make it easy to maintain and extend.
2727

@@ -74,52 +74,30 @@ while maintaining the flexibility that makes testify useful for real-world testi
7474
* removed the `suite`, `mocks` and `http` packages
7575
* replaced internal utility package `_codegen` by `codegen`
7676

77-
### Other (non-breaking) changes
78-
79-
* added `JSONEqBytes`
80-
* added `YAMLEqBytes`
81-
* adapted & merged fixes: see [ROADMAP](./maintainers/ROADMAP.md).
82-
83-
## Usage at go-openapi
84-
85-
At this moment, we have identified the following usage in our tools. This API shall remain stable.
86-
Currently, there are no guarantees about the entry points not in this list.
87-
88-
```
89-
Condition
90-
Contains,Containsf
91-
Empty,Emptyf
92-
Equal,Equalf
93-
EqualError,EqualErrorf
94-
EqualValues,EqualValuesf
95-
Error,Errorf
96-
ErrorContains
97-
ErrorIs
98-
Fail,Failf
99-
FailNow
100-
False,Falsef
101-
Greater
102-
Implements
103-
InDelta,InDeltaf
104-
IsType,IsTypef
105-
JSONEq,JSONEqf
106-
Len,Lenf
107-
Nil,Nilf
108-
NoError,NoErrorf
109-
NotContains,NotContainsf
110-
NotEmpty,NotEmptyf
111-
NotEqual
112-
NotNil,NotNilf
113-
NotPanics
114-
NotZeroG
115-
Panics,PanicsWithValue
116-
Subset
117-
True,Truef
118-
YAMLEq,YAMLEqf
119-
Zero,Zerof
120-
```
121-
122-
## [The original README](./maintainers/ORIGINAL.md)
77+
See [all changes from v1](../usage/CHANGES.md) and check out our [ROADMAP](./maintainers/ROADMAP.md).
78+
79+
## API Stability Guarantee
80+
81+
The assertions currently used by go-openapi projects constitute our **stable API**.
82+
These entry points will remain backward compatible. Other assertions may evolve as we refine the v2 API.
83+
84+
---
85+
86+
## See Also
87+
88+
**Getting Started:**
89+
- [Examples](../usage/EXAMPLES.md) - Practical code examples for using testify v2
90+
- [Usage Guide](../usage/USAGE.md) - API conventions and navigation guide
91+
- [Migration Guide](../usage/MIGRATION.md) - Migrating from stretchr/testify v1
92+
93+
**Project Documentation:**
94+
- [Changes from v1](../usage/CHANGES.md) - Complete list of changes and new features
95+
- [Roadmap](./maintainers/ROADMAP.md) - Future development plans
96+
- [Architecture](./maintainers/ARCHITECTURE.md) - Technical architecture and design decisions
97+
- [Contributing](./contributing/CONTRIBUTING.md) - How to contribute to this project
98+
- [The original README](./maintainers/ORIGINAL.md)
99+
100+
---
123101

124102
<!-- Badges: status -->
125103
[test-badge]: https://github.com/go-openapi/testify/actions/workflows/go-test.yml/badge.svg

docs/doc-site/project/contributing/CONTRIBUTORS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ description: Acknowledgements to all-time contributors
44
weight: 10
55
---
66

7+
{{% notice primary "TL;DR" "meteor" %}}
8+
> Recognition and thanks to all 256 contributors who have helped build testify from its origins to this fork.
9+
> Complete list of contributors with commit counts and links to their contributions.
10+
{{% /notice %}}
11+
712
## Emeritus
813

914
We thank these members for their service to this community.

docs/doc-site/project/maintainers/ARCHITECTURE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ The generator scans `internal/assertions/` and produces:
4141

4242
**Generated Packages: `assert/` and `require/`**
4343

44+
**Generated Documentation: `docs/doc-site/api/`**
45+
4446
Everything in these packages is generated. Never edit generated files directly.
4547

4648
Exceptions:

0 commit comments

Comments
 (0)