You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,15 +40,17 @@ This will compile the code as you change automatically.
40
40
41
41
**Please fill out the template!** It’s a very lightweight template 🙂.
42
42
43
-
### TDD
43
+
### Use Test-driven Development!
44
44
45
-
This library is a great usecase for [test-driven development (TDD)](https://en.wikipedia.org/wiki/Test-driven_development). If you’re new to this, the basic workflow is:
45
+
Contributing to this library is hard-bordering-on-impossible without a [test-driven development (TDD)](https://en.wikipedia.org/wiki/Test-driven_development) strategy. If you’re new to this, the basic workflow is:
46
46
47
47
1. First, write a [test](#testing) that fully outlines what you’d _like_ the output to be.
48
-
2.Make sure this test **fails** when you run `npm test` (yes, _fails!_)
48
+
2.Next, make sure this test **fails** when you run `npm test` (yes, _fails!_)
49
49
3. Then, make changes to `src/` until the tests pass.
50
50
51
-
_Code generation is hard!_ And for that reason, starting with a very clear expectation of your end-goal can make working easier.
51
+
Reasoning about code generation can be quite difficult until you “invert your thinking” and approach it output-first. Adopting TDD can turn very unclear/abstract problems into concrete ones with clear steps to resolution.
52
+
53
+
✨ When starting any task, **write a failing test first!** ✨
/** The schema defining the content of the request, response, or parameter. */
279
-
schema?: SchemaObject;
279
+
schema?: SchemaObject|ReferenceObject;
280
280
/** Example of the media type. The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema. */
281
281
example?: any;
282
282
/** Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema. */
0 commit comments