diff --git a/apps/jsii-docgen/src/docgen/render/markdown-render.ts b/apps/jsii-docgen/src/docgen/render/markdown-render.ts index f6dde0dded0..1f66604fea7 100644 --- a/apps/jsii-docgen/src/docgen/render/markdown-render.ts +++ b/apps/jsii-docgen/src/docgen/render/markdown-render.ts @@ -373,6 +373,11 @@ export class MarkdownRenderer { const md = new MarkdownDocument({ header: { title: "Members" } }); md.table(this.createTable(enus, false)); + md.split(); + + for (const enu of enus) { + md.section(this.visitEnumMember(enu)); + } return md; } @@ -470,19 +475,9 @@ export class MarkdownRenderer { } public visitEnumMember(em: EnumMemberSchema): MarkdownDocument { - const md = new MarkdownDocument({ - id: this.anchorFormatter({ - id: em.id, - displayName: em.displayName, - fqn: em.fqn, - ...this.metadata, - }), - header: { - title: em.displayName, - pre: true, - strike: em.docs.deprecated, - }, - }); + const md = new MarkdownDocument(); + + md.lines(MarkdownDocument.bold(MarkdownDocument.pre(em.displayName))); if (em.docs.deprecated) { md.bullet( @@ -545,22 +540,11 @@ export class MarkdownRenderer { } public visitParameter(parameter: ParameterSchema): MarkdownDocument { - const optionality = parameter.optional ? "Optional" : "Required"; + const md = new MarkdownDocument(); - const md = new MarkdownDocument({ - id: this.anchorFormatter({ - id: parameter.id, - displayName: parameter.displayName, - fqn: parameter.fqn, - ...this.metadata, - }), - header: { - title: parameter.displayName, - sup: optionality, - pre: true, - strike: parameter.docs.deprecated, - }, - }); + md.lines( + MarkdownDocument.bold(MarkdownDocument.pre(parameter.displayName)) + ); if (parameter.docs.deprecated) { md.bullet( diff --git a/apps/jsii-docgen/src/docgen/transpile/wing.ts b/apps/jsii-docgen/src/docgen/transpile/wing.ts index d95e30c4c44..4e128c270d4 100644 --- a/apps/jsii-docgen/src/docgen/transpile/wing.ts +++ b/apps/jsii-docgen/src/docgen/transpile/wing.ts @@ -16,7 +16,8 @@ const typeToString: TranspiledTypeReferenceToStringOptions = { const formatStructInitialization = (type: transpile.TranspiledType) => { const target = type.submodule ? `${type.namespace}.${type.name}` : type.name; - return `let ${type.name.toLowerCase()} = ${target} { ... }`; + let typeName = type.name[0].toLowerCase() + type.name.slice(1); + return `let ${typeName} = ${target} { ... }`; }; const formatClassInitialization = ( diff --git a/docs/docs/04-standard-library/01-cloud/api-reference.md b/docs/docs/04-standard-library/01-cloud/api-reference.md index e00989ba472..591467c7d40 100644 --- a/docs/docs/04-standard-library/01-cloud/api-reference.md +++ b/docs/docs/04-standard-library/01-cloud/api-reference.md @@ -1091,7 +1091,7 @@ Options for Api patch endpoint. ```wing bring cloud; -let apiconnectprops = cloud.ApiConnectProps { ... } +let apiConnectProps = cloud.ApiConnectProps { ... } ``` @@ -1104,7 +1104,7 @@ Options for Api put endpoint. ```wing bring cloud; -let apideleteprops = cloud.ApiDeleteProps { ... } +let apiDeleteProps = cloud.ApiDeleteProps { ... } ``` @@ -1117,7 +1117,7 @@ Options for Api get endpoint. ```wing bring cloud; -let apigetprops = cloud.ApiGetProps { ... } +let apiGetProps = cloud.ApiGetProps { ... } ``` @@ -1130,7 +1130,7 @@ Options for Api patch endpoint. ```wing bring cloud; -let apiheadprops = cloud.ApiHeadProps { ... } +let apiHeadProps = cloud.ApiHeadProps { ... } ``` @@ -1143,7 +1143,7 @@ Options for Api patch endpoint. ```wing bring cloud; -let apioptionsprops = cloud.ApiOptionsProps { ... } +let apiOptionsProps = cloud.ApiOptionsProps { ... } ``` @@ -1156,7 +1156,7 @@ Options for Api patch endpoint. ```wing bring cloud; -let apipatchprops = cloud.ApiPatchProps { ... } +let apiPatchProps = cloud.ApiPatchProps { ... } ``` @@ -1169,7 +1169,7 @@ Options for Api post endpoint. ```wing bring cloud; -let apipostprops = cloud.ApiPostProps { ... } +let apiPostProps = cloud.ApiPostProps { ... } ``` @@ -1182,7 +1182,7 @@ Properties for `Api`. ```wing bring cloud; -let apiprops = cloud.ApiProps { ... } +let apiProps = cloud.ApiProps { ... } ``` @@ -1195,7 +1195,7 @@ Options for Api put endpoint. ```wing bring cloud; -let apiputprops = cloud.ApiPutProps { ... } +let apiPutProps = cloud.ApiPutProps { ... } ``` @@ -1208,7 +1208,7 @@ Shape of a request to an inflight handler. ```wing bring cloud; -let apirequest = cloud.ApiRequest { ... } +let apiRequest = cloud.ApiRequest { ... } ``` #### Properties @@ -1299,7 +1299,7 @@ Shape of a response from a inflight handler. ```wing bring cloud; -let apiresponse = cloud.ApiResponse { ... } +let apiResponse = cloud.ApiResponse { ... } ``` #### Properties @@ -1354,7 +1354,7 @@ Interface for delete method inside `Bucket`. ```wing bring cloud; -let bucketdeleteoptions = cloud.BucketDeleteOptions { ... } +let bucketDeleteOptions = cloud.BucketDeleteOptions { ... } ``` #### Properties @@ -1386,7 +1386,7 @@ on_event notification payload- will be in use after solving issue: https://githu ```wing bring cloud; -let bucketevent = cloud.BucketEvent { ... } +let bucketEvent = cloud.BucketEvent { ... } ``` #### Properties @@ -1429,7 +1429,7 @@ on create event options. ```wing bring cloud; -let bucketoncreateprops = cloud.BucketOnCreateProps { ... } +let bucketOnCreateProps = cloud.BucketOnCreateProps { ... } ``` @@ -1442,7 +1442,7 @@ on delete event options. ```wing bring cloud; -let bucketondeleteprops = cloud.BucketOnDeleteProps { ... } +let bucketOnDeleteProps = cloud.BucketOnDeleteProps { ... } ``` @@ -1455,7 +1455,7 @@ on any event options. ```wing bring cloud; -let bucketoneventprops = cloud.BucketOnEventProps { ... } +let bucketOnEventProps = cloud.BucketOnEventProps { ... } ``` @@ -1468,7 +1468,7 @@ on update event options. ```wing bring cloud; -let bucketonupdateprops = cloud.BucketOnUpdateProps { ... } +let bucketOnUpdateProps = cloud.BucketOnUpdateProps { ... } ``` @@ -1481,7 +1481,7 @@ Properties for `Bucket`. ```wing bring cloud; -let bucketprops = cloud.BucketProps { ... } +let bucketProps = cloud.BucketProps { ... } ``` #### Properties @@ -1513,7 +1513,7 @@ Properties for `Counter`. ```wing bring cloud; -let counterprops = cloud.CounterProps { ... } +let counterProps = cloud.CounterProps { ... } ``` #### Properties @@ -1547,7 +1547,7 @@ This is the type users see when constructing a cloud.Function instance. ```wing bring cloud; -let functionprops = cloud.FunctionProps { ... } +let functionProps = cloud.FunctionProps { ... } ``` #### Properties @@ -1605,7 +1605,7 @@ Options when getting a secret value. ```wing bring cloud; -let getsecretvalueoptions = cloud.GetSecretValueOptions { ... } +let getSecretValueOptions = cloud.GetSecretValueOptions { ... } ``` #### Properties @@ -1637,7 +1637,7 @@ Properties for `Queue`. ```wing bring cloud; -let queueprops = cloud.QueueProps { ... } +let queueProps = cloud.QueueProps { ... } ``` #### Properties @@ -1695,7 +1695,7 @@ Options for Queue.setConsumer. ```wing bring cloud; -let queuesetconsumerprops = cloud.QueueSetConsumerProps { ... } +let queueSetConsumerProps = cloud.QueueSetConsumerProps { ... } ``` #### Properties @@ -1766,7 +1766,7 @@ Options for Schedule.onTick. ```wing bring cloud; -let scheduleontickprops = cloud.ScheduleOnTickProps { ... } +let scheduleOnTickProps = cloud.ScheduleOnTickProps { ... } ``` #### Properties @@ -1824,7 +1824,7 @@ Properties for `Schedule`. ```wing bring cloud; -let scheduleprops = cloud.ScheduleProps { ... } +let scheduleProps = cloud.ScheduleProps { ... } ``` #### Properties @@ -1885,7 +1885,7 @@ Properties for `Secret`. ```wing bring cloud; -let secretprops = cloud.SecretProps { ... } +let secretProps = cloud.SecretProps { ... } ``` #### Properties @@ -1921,7 +1921,7 @@ Options for Service.onStart. ```wing bring cloud; -let serviceonstartprops = cloud.ServiceOnStartProps { ... } +let serviceOnStartProps = cloud.ServiceOnStartProps { ... } ``` #### Properties @@ -1979,7 +1979,7 @@ Properties for `Service`. ```wing bring cloud; -let serviceprops = cloud.ServiceProps { ... } +let serviceProps = cloud.ServiceProps { ... } ``` #### Properties @@ -2036,7 +2036,7 @@ Properties for `Table`. ```wing bring cloud; -let tableprops = cloud.TableProps { ... } +let tableProps = cloud.TableProps { ... } ``` #### Properties @@ -2110,7 +2110,7 @@ A result of a single test. ```wing bring cloud; -let testresult = cloud.TestResult { ... } +let testResult = cloud.TestResult { ... } ``` #### Properties @@ -2177,7 +2177,7 @@ Properties for `TestRunner`. ```wing bring cloud; -let testrunnerprops = cloud.TestRunnerProps { ... } +let testRunnerProps = cloud.TestRunnerProps { ... } ``` @@ -2190,7 +2190,7 @@ Options for `Topic.onMessage`. ```wing bring cloud; -let topiconmessageprops = cloud.TopicOnMessageProps { ... } +let topicOnMessageProps = cloud.TopicOnMessageProps { ... } ``` #### Properties @@ -2248,7 +2248,7 @@ Properties for `Topic`. ```wing bring cloud; -let topicprops = cloud.TopicProps { ... } +let topicProps = cloud.TopicProps { ... } ``` @@ -2347,7 +2347,7 @@ website props. ```wing bring cloud; -let websiteprops = cloud.WebsiteProps { ... } +let websiteProps = cloud.WebsiteProps { ... } ``` #### Properties @@ -3477,6 +3477,26 @@ bucket events to subscribe to. | DELETE | delete. | | UPDATE | update. | +--- + +**CREATE** +create. + +--- + + +**DELETE** +delete. + +--- + + +**UPDATE** +update. + +--- + + ### ColumnType Table column types. @@ -3491,6 +3511,38 @@ Table column types. | DATE | date type. | | JSON | json type. | +--- + +**STRING** +string type. + +--- + + +**NUMBER** +number type. + +--- + + +**BOOLEAN** +bool type. + +--- + + +**DATE** +date type. + +--- + + +**JSON** +json type. + +--- + + ### HttpMethod Allowed HTTP methods for a endpoint. @@ -3508,6 +3560,56 @@ Allowed HTTP methods for a endpoint. | OPTIONS | Options. | | PATCH | Patch. | +--- + +**GET** +Get. + +--- + + +**HEAD** +Head. + +--- + + +**POST** +Post. + +--- + + +**PUT** +Put. + +--- + + +**DELETE** +Delete. + +--- + + +**CONNECT** +Connect. + +--- + + +**OPTIONS** +Options. + +--- + + +**PATCH** +Patch. + +--- + + ### TraceType The type of a trace. @@ -3518,3 +3620,17 @@ The type of a trace. | --- | --- | | RESOURCE | A trace representing a resource activity. | | LOG | A trace representing a message emitted by the logger. | + +--- + +**RESOURCE** +A trace representing a resource activity. + +--- + + +**LOG** +A trace representing a message emitted by the logger. + +--- + diff --git a/docs/docs/04-standard-library/02-std/api-reference.md b/docs/docs/04-standard-library/02-std/api-reference.md index ab47dbbeb1c..6081446477e 100644 --- a/docs/docs/04-standard-library/02-std/api-reference.md +++ b/docs/docs/04-standard-library/02-std/api-reference.md @@ -131,7 +131,7 @@ Props for `Resource.addConnection`. ```wing bring std; -let addconnectionprops = std.AddConnectionProps { ... } +let addConnectionProps = std.AddConnectionProps { ... } ``` #### Properties @@ -266,7 +266,7 @@ Properties for the Display class. ```wing bring std; -let displayprops = std.DisplayProps { ... } +let displayProps = std.DisplayProps { ... } ``` #### Properties @@ -326,7 +326,7 @@ This is the type users see when constructing a std.Test instance. ```wing bring std; -let testprops = std.TestProps { ... } +let testProps = std.TestProps { ... } ``` #### Properties @@ -2051,3 +2051,17 @@ the arrow would point from A to B, and vice versa for inbound connections. | --- | --- | | OUTBOUND | Indicates that this resource calls, triggers, or references the resource it is connected to. | | INBOUND | Indicates that this resource is called, triggered, or referenced by the resource it is connected to. | + +--- + +**OUTBOUND** +Indicates that this resource calls, triggers, or references the resource it is connected to. + +--- + + +**INBOUND** +Indicates that this resource is called, triggered, or referenced by the resource it is connected to. + +--- + diff --git a/docs/docs/04-standard-library/03-http/api-reference.md b/docs/docs/04-standard-library/03-http/api-reference.md index 489dd540cdd..c42a26a7786 100644 --- a/docs/docs/04-standard-library/03-http/api-reference.md +++ b/docs/docs/04-standard-library/03-http/api-reference.md @@ -23,7 +23,7 @@ An object containing any custom settings that you want to apply to the request. ```wing bring http; -let requestoptions = http.RequestOptions { ... } +let requestOptions = http.RequestOptions { ... } ``` #### Properties @@ -342,6 +342,38 @@ The request's method. | PATCH | PATCH. | | POST | POST. | +--- + +**GET** +GET. + +--- + + +**PUT** +PUT. + +--- + + +**DELETE** +DELETE. + +--- + + +**PATCH** +PATCH. + +--- + + +**POST** +POST. + +--- + + ### RequestCache The cache mode of the request. @@ -358,6 +390,51 @@ It controls how a request will interact with the system's HTTP cache. | NO_CACHE | The runtime environment looks for a matching request in its HTTP cache. | | FORCE_CACHE | The runtime environment looks for a matching request in its HTTP cache. | +--- + +**DEFAULT** +The runtime environment looks for a matching request in its HTTP cache. + +* If there is a match and it is fresh, it will be returned from the cache. +* If there is a match but it is stale, the runtime environment will make a conditional request to the remote server. +* If the server indicates that the resource has not changed, it will be returned from the cache. +* Otherwise the resource will be downloaded from the server and the cache will be updated. +* If there is no match, the runtime environment will make a normal request, and will update the cache with the downloaded resource. + +--- + + +**NO_STORE** +The runtime environment fetches the resource from the remote server without first looking in the cache, and will not update the cache with the downloaded resource. + +--- + + +**RELOAD** +The runtime environment fetches the resource from the remote server without first looking in the cache, but then will update the cache with the downloaded resource. + +--- + + +**NO_CACHE** +The runtime environment looks for a matching request in its HTTP cache. + +* If there is a match, fresh or stale, the runtime environment will make a conditional request to the remote server. +* If the server indicates that the resource has not changed, it will be returned from the cache. Otherwise the resource will be downloaded from the server and the cache will be updated. +* If there is no match, the runtime environment will make a normal request, and will update the cache with the downloaded resource. + +--- + + +**FORCE_CACHE** +The runtime environment looks for a matching request in its HTTP cache. + +* If there is a match, fresh or stale, it will be returned from the cache. +* If there is no match, the runtime environment will make a normal request, and will update the cache with the downloaded resource. + +--- + + ### RequestRedirect The redirect read-only property that contains the mode for how redirects are handled. @@ -368,3 +445,17 @@ The redirect read-only property that contains the mode for how redirects are han | --- | --- | | FOLLOW | Follow all redirects incurred when fetching a resource. | | ERROR | Return a network error when a request is met with a redirect. | + +--- + +**FOLLOW** +Follow all redirects incurred when fetching a resource. + +--- + + +**ERROR** +Return a network error when a request is met with a redirect. + +--- + diff --git a/docs/docs/04-standard-library/04-util/api-reference.md b/docs/docs/04-standard-library/04-util/api-reference.md index 35bb7b54280..df0aadcbe13 100644 --- a/docs/docs/04-standard-library/04-util/api-reference.md +++ b/docs/docs/04-standard-library/04-util/api-reference.md @@ -23,7 +23,7 @@ Properties for `util.waitUntil`. ```wing bring util; -let waituntilprops = util.WaitUntilProps { ... } +let waitUntilProps = util.WaitUntilProps { ... } ``` #### Properties