Skip to content

Commit d45dc59

Browse files
srchasealextwoods
authored andcommitted
Fix smithy-build.json version numbers (smithy-lang#1918)
1 parent 49ccd1c commit d45dc59

File tree

2 files changed

+61
-30
lines changed

2 files changed

+61
-30
lines changed

docs/source-2.0/guides/converting-to-openapi.rst

Lines changed: 59 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ that builds an OpenAPI specification from a service for the
144144
:name: open-api-smithy-build-json
145145
146146
{
147-
"version": "2.0",
147+
"version": "1.0",
148148
"plugins": {
149149
"openapi": {
150150
"service": "example.weather#Weather",
@@ -181,9 +181,10 @@ service (``string``)
181181
For example, ``example.weather#Weather``.
182182

183183
.. code-block:: json
184+
:caption: smithy-build.json
184185
185186
{
186-
"version": "2.0",
187+
"version": "1.0",
187188
"plugins": {
188189
"openapi": {
189190
"service": "example.weather#Weather"
@@ -211,9 +212,10 @@ protocol (``string``)
211212
service provider found on the classpath.
212213

213214
.. code-block:: json
215+
:caption: smithy-build.json
214216
215217
{
216-
"version": "2.0",
218+
"version": "1.0",
217219
"plugins": {
218220
"openapi": {
219221
"service": "example.weather#Weather",
@@ -235,6 +237,7 @@ version (``string``)
235237
``3.1.0`` will use JSON schema version ``draft2020-12`` for model schemas.
236238

237239
.. code-block:: json
240+
:caption: smithy-build.json
238241
239242
{
240243
"version": "1.0",
@@ -254,9 +257,10 @@ tags (``boolean``)
254257
model to the OpenAPI model.
255258

256259
.. code-block:: json
260+
:caption: smithy-build.json
257261
258262
{
259-
"version": "2.0",
263+
"version": "1.0",
260264
"plugins": {
261265
"openapi": {
262266
"service": "example.weather#Weather",
@@ -273,9 +277,10 @@ supportedTags (``[string]``)
273277
``true`` in order to have an effect.
274278

275279
.. code-block:: json
280+
:caption: smithy-build.json
276281
277282
{
278-
"version": "2.0",
283+
"version": "1.0",
279284
"plugins": {
280285
"openapi": {
281286
"service": "example.weather#Weather",
@@ -293,9 +298,10 @@ defaultBlobFormat (``string``)
293298
See `OpenAPI Data types`_ for more information.
294299

295300
.. code-block:: json
301+
:caption: smithy-build.json
296302
297303
{
298-
"version": "2.0",
304+
"version": "1.0",
299305
"plugins": {
300306
"openapi": {
301307
"service": "example.weather#Weather",
@@ -314,9 +320,10 @@ externalDocs (``[string]``)
314320
"Reference", and "Guide".
315321

316322
.. code-block:: json
323+
:caption: smithy-build.json
317324
318325
{
319-
"version": "2.0",
326+
"version": "1.0",
320327
"plugins": {
321328
"openapi": {
322329
"service": "example.weather#Weather",
@@ -335,9 +342,10 @@ keepUnusedComponents (``boolean``)
335342
removed from the created specification.
336343

337344
.. code-block:: json
345+
:caption: smithy-build.json
338346
339347
{
340-
"version": "2.0",
348+
"version": "1.0",
341349
"plugins": {
342350
"openapi": {
343351
"service": "example.weather#Weather",
@@ -353,9 +361,10 @@ jsonContentType (``string``)
353361
JSON-based protocols.
354362

355363
.. code-block:: json
364+
:caption: smithy-build.json
356365
357366
{
358-
"version": "2.0",
367+
"version": "1.0",
359368
"plugins": {
360369
"openapi": {
361370
"service": "example.weather#Weather",
@@ -372,9 +381,10 @@ forbidGreedyLabels (``boolean``)
372381
"/{foo+}".
373382

374383
.. code-block:: json
384+
:caption: smithy-build.json
375385
376386
{
377-
"version": "2.0",
387+
"version": "1.0",
378388
"plugins": {
379389
"openapi": {
380390
"service": "example.weather#Weather",
@@ -392,9 +402,10 @@ removeGreedyParameterSuffix (``boolean``)
392402
If enabled, the parameter name will instead be "foo".
393403

394404
.. code-block:: json
405+
:caption: smithy-build.json
395406
396407
{
397-
"version": "2.0",
408+
"version": "1.0",
398409
"plugins": {
399410
"openapi": {
400411
"service": "example.weather#Weather",
@@ -416,9 +427,10 @@ onHttpPrefixHeaders (``string``)
416427
* WARN: The header is omitted from the OpenAPI model and a warning is logged.
417428

418429
.. code-block:: json
430+
:caption: smithy-build.json
419431
420432
{
421-
"version": "2.0",
433+
"version": "1.0",
422434
"plugins": {
423435
"openapi": {
424436
"service": "example.weather#Weather",
@@ -434,9 +446,10 @@ ignoreUnsupportedTraits (``boolean``)
434446
``endpoint`` and ``hostLabel`` are encountered.
435447

436448
.. code-block:: json
449+
:caption: smithy-build.json
437450
438451
{
439-
"version": "2.0",
452+
"version": "1.0",
440453
"plugins": {
441454
"openapi": {
442455
"service": "example.weather#Weather",
@@ -468,9 +481,10 @@ substitutions (``Map<String, any>``)
468481
change.
469482

470483
.. code-block:: json
484+
:caption: smithy-build.json
471485
472486
{
473-
"version": "2.0",
487+
"version": "1.0",
474488
"plugins": {
475489
"openapi": {
476490
"service": "example.weather#Weather",
@@ -497,9 +511,10 @@ jsonAdd (``Map<String, Node>``)
497511
result as needed.
498512

499513
.. code-block:: json
514+
:caption: smithy-build.json
500515
501516
{
502-
"version": "2.0",
517+
"version": "1.0",
503518
"plugins": {
504519
"openapi": {
505520
"service": "example.weather#Weather",
@@ -525,9 +540,10 @@ useIntegerType (``boolean``)
525540
"number".
526541

527542
.. code-block:: json
543+
:caption: smithy-build.json
528544
529545
{
530-
"version": "2.0",
546+
"version": "1.0",
531547
"plugins": {
532548
"openapi": {
533549
"service": "example.weather#Weather",
@@ -545,9 +561,10 @@ disableIntegerFormat (``boolean``)
545561
configuration setting.
546562

547563
.. code-block:: json
564+
:caption: smithy-build.json
548565
549566
{
550-
"version": "2.0",
567+
"version": "1.0",
551568
"plugins": {
552569
"openapi": {
553570
"service": "example.weather#Weather",
@@ -614,6 +631,7 @@ onErrorStatusConflict (``String``)
614631
By default, this setting is set to ``oneOf``.
615632

616633
.. code-block:: json
634+
:caption: smithy-build.json
617635
618636
{
619637
"version": "1.0",
@@ -651,9 +669,10 @@ useJsonName (``boolean``)
651669
automatically set to ``true`` depending on the protocol being converted.
652670

653671
.. code-block:: json
672+
:caption: smithy-build.json
654673
655674
{
656-
"version": "2.0",
675+
"version": "1.0",
657676
"plugins": {
658677
"openapi": {
659678
"service": "example.weather#Weather",
@@ -671,9 +690,10 @@ defaultTimestampFormat (``string``)
671690
"epoch-seconds", or "http-date".
672691

673692
.. code-block:: json
693+
:caption: smithy-build.json
674694
675695
{
676-
"version": "2.0",
696+
"version": "1.0",
677697
"plugins": {
678698
"openapi": {
679699
"service": "example.weather#Weather",
@@ -696,9 +716,10 @@ unionStrategy (``string``)
696716
structure.
697717

698718
.. code-block:: json
719+
:caption: smithy-build.json
699720
700721
{
701-
"version": "2.0",
722+
"version": "1.0",
702723
"plugins": {
703724
"openapi": {
704725
"service": "example.weather#Weather",
@@ -723,9 +744,10 @@ mapStrategy (``string``)
723744
is applied.
724745

725746
.. code-block:: json
747+
:caption: smithy-build.json
726748
727749
{
728-
"version": "2.0",
750+
"version": "1.0",
729751
"plugins": {
730752
"openapi": {
731753
"service": "example.weather#Weather",
@@ -741,9 +763,10 @@ schemaDocumentExtensions (``Map<String, any>``)
741763
Any existing value is overwritten.
742764

743765
.. code-block:: json
766+
:caption: smithy-build.json
744767
745768
{
746-
"version": "2.0",
769+
"version": "1.0",
747770
"plugins": {
748771
"openapi": {
749772
"service": "example.weather#Weather",
@@ -764,9 +787,10 @@ disableFeatures (``[string]``)
764787
generated OpenAPI model.
765788

766789
.. code-block:: json
790+
:caption: smithy-build.json
767791
768792
{
769-
"version": "2.0",
793+
"version": "1.0",
770794
"plugins": {
771795
"openapi": {
772796
"service": "example.weather#Weather",
@@ -787,9 +811,10 @@ supportNonNumericFloats (``boolean``)
787811
By default, these non-numeric values are not supported.
788812

789813
.. code-block:: json
814+
:caption: smithy-build.json
790815
791816
{
792-
"version": "2.0",
817+
"version": "1.0",
793818
"plugins": {
794819
"openapi": {
795820
"service": "example.weather#Weather",
@@ -838,9 +863,10 @@ disableDefaultValues (``boolean``)
838863
Set to true to disable adding default values.
839864

840865
.. code-block:: json
866+
:caption: smithy-build.json
841867
842868
{
843-
"version": "2.0",
869+
"version": "1.0",
844870
"plugins": {
845871
"openapi": {
846872
"service": "example.weather#Weather",
@@ -921,9 +947,10 @@ disableIntEnums (``boolean``)
921947
Set to true to disable setting the ``enum`` property for intEnum shapes.
922948

923949
.. code-block:: json
950+
:caption: smithy-build.json
924951
925952
{
926-
"version": "2.0",
953+
"version": "1.0",
927954
"plugins": {
928955
"openapi": {
929956
"service": "example.weather#Weather",
@@ -1164,9 +1191,10 @@ apiGatewayType (``string``)
11641191
is inadvertently placed on the classpath by a dependency.
11651192

11661193
.. code-block:: json
1194+
:caption: smithy-build.json
11671195
11681196
{
1169-
"version": "2.0",
1197+
"version": "1.0",
11701198
"plugins": {
11711199
"openapi": {
11721200
"service": "example.weather#Weather",
@@ -1180,9 +1208,10 @@ disableCloudFormationSubstitution (``boolean``)
11801208
into CloudFormation intrinsic functions.
11811209

11821210
.. code-block:: json
1211+
:caption: smithy-build.json
11831212
11841213
{
1185-
"version": "2.0",
1214+
"version": "1.0",
11861215
"plugins": {
11871216
"openapi": {
11881217
"service": "example.weather#Weather",
@@ -1201,9 +1230,10 @@ additionalAllowedCorsHeaders (``[string]``)
12011230
headers will be omitted.
12021231

12031232
.. code-block:: json
1233+
:caption: smithy-build.json
12041234
12051235
{
1206-
"version": "2.0",
1236+
"version": "1.0",
12071237
"plugins": {
12081238
"openapi": {
12091239
"service": "example.weather#Weather",

docs/source-2.0/guides/generating-cloudformation-resources.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,10 @@ useIntegerType (``boolean``)
492492
By default, these shape types are converted with a type of ``number``.
493493

494494
.. code-block:: json
495+
:caption: smithy-build.json
495496
496497
{
497-
"version": "2.0",
498+
"version": "1.0",
498499
"plugins": {
499500
"cloudformation": {
500501
"service": "smithy.example#Queues",

0 commit comments

Comments
 (0)