git.iko.soy/typeable/openapi3
on 23caa64 help sign in
typeable/openapi3/test/Data/SwaggerSpec.hs
946 lines 26 kB history raw
1{-# LANGUAGE OverloadedLists #-}
2{-# LANGUAGE OverloadedStrings #-}
3{-# LANGUAGE ScopedTypeVariables #-}
4{-# LANGUAGE QuasiQuotes #-}
5module Data.SwaggerSpec where
7import Prelude ()
8import Prelude.Compat
10import Control.Lens
12import Data.Aeson
13import Data.Aeson.QQ.Simple
14import Data.HashMap.Strict (HashMap)
15import qualified Data.HashSet.InsOrd as InsOrdHS
16import Data.Text (Text)
18import Data.Swagger
19import SpecCommon
20import Test.Hspec hiding (example)
22spec :: Spec
23spec = do
24 describe "License Object" $ licenseExample <=> licenseExampleJSON
25 describe "Contact Object" $ contactExample <=> contactExampleJSON
26 describe "Info Object" $ infoExample <=> infoExampleJSON
27 describe "Operation Object" $ operationExample <=> operationExampleJSON
28 describe "Schema Object" $ do
29 context "Primitive Sample" $ schemaPrimitiveExample <=> schemaPrimitiveExampleJSON
30 context "Simple Model" $ schemaSimpleModelExample <=> schemaSimpleModelExampleJSON
31 context "Model with Map/Dictionary Properties" $ schemaModelDictExample <=> schemaModelDictExampleJSON
32 context "Model with Arbitrary Properties" $ schemaAdditionalExample <=> schemaAdditionalExampleJSON
33 context "Model with Example" $ schemaWithExampleExample <=> schemaWithExampleExampleJSON
34 describe "Definitions Object" $ definitionsExample <=> definitionsExampleJSON
35 describe "Parameters Definition Object" $ paramsDefinitionExample <=> paramsDefinitionExampleJSON
36 describe "Responses Definition Object" $ responsesDefinitionExample <=> responsesDefinitionExampleJSON
37 describe "Security Definitions Object" $ securityDefinitionsExample <=> securityDefinitionsExampleJSON
38 describe "OAuth2 Security Definitions with merged Scope" $ oAuth2SecurityDefinitionsExample <=> oAuth2SecurityDefinitionsExampleJSON
39 describe "Composition Schema Example" $ compositionSchemaExample <=> compositionSchemaExampleJSON
40 describe "Swagger Object" $ do
41 context "Example with no paths" $ emptyPathsFieldExample <=> emptyPathsFieldExampleJSON
42 context "Todo Example" $ swaggerExample <=> swaggerExampleJSON
43 context "PetStore Example" $ do
44 it "decodes successfully" $ do
45 fromJSON petstoreExampleJSON `shouldSatisfy` (\x -> case x of Success (_ :: Swagger) -> True; _ -> False)
46 it "roundtrips: fmap toJSON . fromJSON" $ do
47 (toJSON :: Swagger -> Value) <$> fromJSON petstoreExampleJSON `shouldBe` Success petstoreExampleJSON
49main :: IO ()
50main = hspec spec
52-- =======================================================================
53-- Info object
54-- =======================================================================
56infoExample :: Info
57infoExample = mempty
58 & title .~ "Swagger Sample App"
59 & description ?~ "This is a sample server Petstore server."
60 & termsOfService ?~ "http://swagger.io/terms/"
61 & contact ?~ contactExample
62 & license ?~ licenseExample
63 & version .~ "1.0.1"
65infoExampleJSON :: Value
66infoExampleJSON = [aesonQQ|
68 "title": "Swagger Sample App",
69 "description": "This is a sample server Petstore server.",
70 "termsOfService": "http://swagger.io/terms/",
71 "contact": {
72 "name": "API Support",
73 "url": "http://www.swagger.io/support",
74 "email": "support@swagger.io"
75 },
76 "license": {
77 "name": "Apache 2.0",
78 "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
79 },
80 "version": "1.0.1"
82|]
84-- =======================================================================
85-- Contact object
86-- =======================================================================
88contactExample :: Contact
89contactExample = mempty
90 & name ?~ "API Support"
91 & url ?~ URL "http://www.swagger.io/support"
92 & email ?~ "support@swagger.io"
94contactExampleJSON :: Value
95contactExampleJSON = [aesonQQ|
97 "name": "API Support",
98 "url": "http://www.swagger.io/support",
99 "email": "support@swagger.io"
101|]
103-- =======================================================================
104-- License object
105-- =======================================================================
107licenseExample :: License
108licenseExample = "Apache 2.0"
109 & url ?~ URL "http://www.apache.org/licenses/LICENSE-2.0.html"
111licenseExampleJSON :: Value
112licenseExampleJSON = [aesonQQ|
114 "name": "Apache 2.0",
115 "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
117|]
120-- =======================================================================
121-- Operation object
122-- =======================================================================
124operationExample :: Operation
125operationExample = mempty
126 & tags .~ InsOrdHS.fromList ["pet"]
127 & summary ?~ "Updates a pet in the store with form data"
128 & description ?~ ""
129 & operationId ?~ "updatePetWithForm"
130 & parameters .~ [Inline (mempty
131 & name .~ "petId"
132 & description ?~ "ID of pet that needs to be updated"
133 & required ?~ True
134 & in_ .~ ParamPath
135 & schema ?~ Inline (mempty & type_ ?~ SwaggerString))]
136 & requestBody ?~ Inline (
137 mempty & content . at "application/x-www-form-urlencoded" ?~ (mempty & schema ?~ (Inline (mempty
138 & properties . at "petId" ?~ Inline (mempty
139 & description ?~ "Updated name of the pet"
140 & type_ ?~ SwaggerString)
141 & properties . at "status" ?~ Inline (mempty
142 & description ?~ "Updated status of the pet"
143 & type_ ?~ SwaggerString)))))
144 & at 200 ?~ "Pet updated."
145 & at 405 ?~ "Invalid input"
146 & security .~ [SecurityRequirement [("petstore_auth", ["write:pets", "read:pets"])]]
148operationExampleJSON :: Value
149operationExampleJSON = [aesonQQ|
151 "tags": [
152 "pet"
153 ],
154 "summary": "Updates a pet in the store with form data",
155 "description": "",
156 "operationId": "updatePetWithForm",
157 "parameters": [
158 {
159 "required": true,
160 "schema": {
161 "type": "string"
162 },
163 "in": "path",
164 "name": "petId",
165 "description": "ID of pet that needs to be updated"
166 }
167 ],
168 "requestBody": {
169 "content": {
170 "application/x-www-form-urlencoded": {
171 "schema": {
172 "properties": {
173 "petId": {
174 "type": "string",
175 "description": "Updated name of the pet"
176 },
177 "status": {
178 "type": "string",
179 "description": "Updated status of the pet"
180 }
181 }
182 }
183 }
184 }
185 },
186 "responses": {
187 "200": {
188 "description": "Pet updated."
189 },
190 "405": {
191 "description": "Invalid input"
192 }
193 },
194 "security": [
195 {
196 "petstore_auth": [
197 "write:pets",
198 "read:pets"
199 ]
200 }
201 ]
203|]
205-- =======================================================================
206-- Schema object
207-- =======================================================================
209schemaPrimitiveExample :: Schema
210schemaPrimitiveExample = mempty
211 & type_ ?~ SwaggerString
212 & format ?~ "email"
214schemaPrimitiveExampleJSON :: Value
215schemaPrimitiveExampleJSON = [aesonQQ|
217 "type": "string",
218 "format": "email"
220|]
222schemaSimpleModelExample :: Schema
223schemaSimpleModelExample = mempty
224 & type_ ?~ SwaggerObject
225 & required .~ [ "name" ]
226 & properties .~
227 [ ("name", Inline (mempty & type_ ?~ SwaggerString))
228 , ("address", Ref (Reference "Address"))
229 , ("age", Inline $ mempty
230 & minimum_ ?~ 0
231 & type_ ?~ SwaggerInteger
232 & format ?~ "int32" ) ]
234schemaSimpleModelExampleJSON :: Value
235schemaSimpleModelExampleJSON = [aesonQQ|
236{ "required": [ "name" ],
237 "properties": {
238 "name": {
239 "type": "string"
240 },
241 "address": {
242 "$ref": "#/components/schemas/Address"
243 },
244 "age": {
245 "format": "int32",
246 "minimum": 0,
247 "type": "integer"
248 }
249 },
250 "type": "object"
252|]
254schemaModelDictExample :: Schema
255schemaModelDictExample = mempty
256 & type_ ?~ SwaggerObject
257 & additionalProperties ?~ AdditionalPropertiesSchema (Inline (mempty & type_ ?~ SwaggerString))
259schemaModelDictExampleJSON :: Value
260schemaModelDictExampleJSON = [aesonQQ|
262 "type": "object",
263 "additionalProperties": {
264 "type": "string"
265 }
267|]
269schemaAdditionalExample :: Schema
270schemaAdditionalExample = mempty
271 & type_ ?~ SwaggerObject
272 & additionalProperties ?~ AdditionalPropertiesAllowed True
274schemaAdditionalExampleJSON :: Value
275schemaAdditionalExampleJSON = [aesonQQ|
277 "type": "object",
278 "additionalProperties": true
280|]
282schemaWithExampleExample :: Schema
283schemaWithExampleExample = mempty
284 & type_ ?~ SwaggerObject
285 & properties .~
286 [ ("id", Inline $ mempty
287 & type_ ?~ SwaggerInteger
288 & format ?~ "int64" )
289 , ("name", Inline $ mempty
290 & type_ ?~ SwaggerString) ]
291 & required .~ [ "name" ]
292 & example ?~ [aesonQQ|
293 {
294 "name": "Puma",
295 "id": 1
296 }
297 |]
299schemaWithExampleExampleJSON :: Value
300schemaWithExampleExampleJSON = [aesonQQ|
302 "type": "object",
303 "properties": {
304 "id": {
305 "type": "integer",
306 "format": "int64"
307 },
308 "name": {
309 "type": "string"
310 }
311 },
312 "required": [
313 "name"
314 ],
315 "example": {
316 "name": "Puma",
317 "id": 1
318 }
320|]
322-- =======================================================================
323-- Definitions object
324-- =======================================================================
326definitionsExample :: HashMap Text Schema
327definitionsExample =
328 [ ("Category", mempty
329 & type_ ?~ SwaggerObject
330 & properties .~
331 [ ("id", Inline $ mempty
332 & type_ ?~ SwaggerInteger
333 & format ?~ "int64")
334 , ("name", Inline (mempty & type_ ?~ SwaggerString)) ] )
335 , ("Tag", mempty
336 & type_ ?~ SwaggerObject
337 & properties .~
338 [ ("id", Inline $ mempty
339 & type_ ?~ SwaggerInteger
340 & format ?~ "int64")
341 , ("name", Inline (mempty & type_ ?~ SwaggerString)) ] ) ]
343definitionsExampleJSON :: Value
344definitionsExampleJSON = [aesonQQ|
346 "Category": {
347 "type": "object",
348 "properties": {
349 "id": {
350 "type": "integer",
351 "format": "int64"
352 },
353 "name": {
354 "type": "string"
355 }
356 }
357 },
358 "Tag": {
359 "type": "object",
360 "properties": {
361 "id": {
362 "type": "integer",
363 "format": "int64"
364 },
365 "name": {
366 "type": "string"
367 }
368 }
369 }
371|]
373-- =======================================================================
374-- Parameters Definition object
375-- =======================================================================
377paramsDefinitionExample :: HashMap Text Param
378paramsDefinitionExample =
379 [ ("skipParam", mempty
380 & name .~ "skip"
381 & description ?~ "number of items to skip"
382 & required ?~ True
383 & in_ .~ ParamQuery
384 & schema ?~ Inline (mempty
385 & type_ ?~ SwaggerInteger
386 & format ?~ "int32" ))
387 , ("limitParam", mempty
388 & name .~ "limit"
389 & description ?~ "max records to return"
390 & required ?~ True
391 & in_ .~ ParamQuery
392 & schema ?~ Inline (mempty
393 & type_ ?~ SwaggerInteger
394 & format ?~ "int32" )) ]
396paramsDefinitionExampleJSON :: Value
397paramsDefinitionExampleJSON = [aesonQQ|
399 "skipParam": {
400 "name": "skip",
401 "in": "query",
402 "description": "number of items to skip",
403 "required": true,
404 "schema": {
405 "type": "integer",
406 "format": "int32"
407 }
408 },
409 "limitParam": {
410 "name": "limit",
411 "in": "query",
412 "description": "max records to return",
413 "required": true,
414 "schema": {
415 "type": "integer",
416 "format": "int32"
417 }
418 }
420|]
422-- =======================================================================
423-- Responses Definition object
424-- =======================================================================
426responsesDefinitionExample :: HashMap Text Response
427responsesDefinitionExample =
428 [ ("NotFound", mempty & description .~ "Entity not found.")
429 , ("IllegalInput", mempty & description .~ "Illegal input for operation.") ]
431responsesDefinitionExampleJSON :: Value
432responsesDefinitionExampleJSON = [aesonQQ|
434 "NotFound": {
435 "description": "Entity not found."
436 },
437 "IllegalInput": {
438 "description": "Illegal input for operation."
439 }
441|]
443-- =======================================================================
444-- Responses Definition object
445-- =======================================================================
447securityDefinitionsExample :: SecurityDefinitions
448securityDefinitionsExample = SecurityDefinitions
449 [ ("api_key", SecurityScheme
450 { _securitySchemeType = SecuritySchemeApiKey (ApiKeyParams "api_key" ApiKeyHeader)
451 , _securitySchemeDescription = Nothing })
452 , ("petstore_auth", SecurityScheme
453 { _securitySchemeType = SecuritySchemeOAuth2 (mempty & implicit ?~ OAuth2Flow
454 { _oAuth2Params = OAuth2ImplicitFlow "http://swagger.io/api/oauth/dialog"
455 , _oAath2RefreshUrl = Nothing
456 , _oAuth2Scopes =
457 [ ("write:pets", "modify pets in your account")
458 , ("read:pets", "read your pets") ] } )
459 , _securitySchemeDescription = Nothing }) ]
461securityDefinitionsExampleJSON :: Value
462securityDefinitionsExampleJSON = [aesonQQ|
464 "api_key": {
465 "in": "header",
466 "name": "api_key",
467 "type": "apiKey"
468 },
469 "petstore_auth": {
470 "type": "oauth2",
471 "flows": {
472 "implicit": {
473 "scopes": {
474 "write:pets": "modify pets in your account",
475 "read:pets": "read your pets"
476 },
477 "authorizationUrl": "http://swagger.io/api/oauth/dialog"
478 }
479 }
480 }
483|]
485oAuth2SecurityDefinitionsReadExample :: SecurityDefinitions
486oAuth2SecurityDefinitionsReadExample = SecurityDefinitions
487 [ ("petstore_auth", SecurityScheme
488 { _securitySchemeType = SecuritySchemeOAuth2 (mempty & implicit ?~ OAuth2Flow
489 { _oAuth2Params = OAuth2ImplicitFlow "http://swagger.io/api/oauth/dialog"
490 , _oAath2RefreshUrl = Nothing
491 , _oAuth2Scopes =
492 [ ("read:pets", "read your pets") ] } )
493 , _securitySchemeDescription = Nothing })
494 ]
496oAuth2SecurityDefinitionsWriteExample :: SecurityDefinitions
497oAuth2SecurityDefinitionsWriteExample = SecurityDefinitions
498 [ ("petstore_auth", SecurityScheme
499 { _securitySchemeType = SecuritySchemeOAuth2 (mempty & implicit ?~ OAuth2Flow
500 { _oAuth2Params = OAuth2ImplicitFlow "http://swagger.io/api/oauth/dialog"
501 , _oAath2RefreshUrl = Nothing
502 , _oAuth2Scopes =
503 [ ("write:pets", "modify pets in your account") ] } )
504 , _securitySchemeDescription = Nothing })
505 ]
507oAuth2SecurityDefinitionsExample :: SecurityDefinitions
508oAuth2SecurityDefinitionsExample =
509 oAuth2SecurityDefinitionsWriteExample <>
510 oAuth2SecurityDefinitionsReadExample
512oAuth2SecurityDefinitionsExampleJSON :: Value
513oAuth2SecurityDefinitionsExampleJSON = [aesonQQ|
515 "petstore_auth": {
516 "type": "oauth2",
517 "flows": {
518 "implicit": {
519 "scopes": {
520 "write:pets": "modify pets in your account",
521 "read:pets": "read your pets"
522 },
523 "authorizationUrl": "http://swagger.io/api/oauth/dialog"
524 }
525 }
526 }
528|]
530-- =======================================================================
531-- Swagger object
532-- =======================================================================
534emptyPathsFieldExample :: Swagger
535emptyPathsFieldExample = mempty
537emptyPathsFieldExampleJSON :: Value
538emptyPathsFieldExampleJSON = [aesonQQ|
540 "openapi": "3.0.0",
541 "info": {"version": "", "title": ""},
542 "paths": {},
543 "components": {}
545|]
547swaggerExample :: Swagger
548swaggerExample = mempty
549 -- & basePath ?~ "/"
550 -- & schemes ?~ [Http]
551 & info .~ (mempty
552 & version .~ "1.0"
553 & title .~ "Todo API"
554 & license ?~ "MIT"
555 & license._Just.url ?~ URL "http://mit.com"
556 & description ?~ "This is an API that tests servant-swagger support for a Todo API")
557 & paths.at "/todo/{id}" ?~ (mempty & get ?~ ((mempty :: Operation)
558 & responses . at 200 ?~ Inline (mempty
559 & description .~ "OK"
560 & content . at "application/json" ?~ (mempty
561 & schema ?~ Inline (mempty
562 & type_ ?~ SwaggerObject
563 & example ?~ [aesonQQ|
564 {
565 "created": 100,
566 "description": "get milk"
567 } |]
568 & description ?~ "This is some real Todo right here"
569 & properties .~
570 [ ("created", Inline $ mempty
571 & type_ ?~ SwaggerInteger
572 & format ?~ "int32")
573 , ("description", Inline (mempty & type_ ?~ SwaggerString))])))
574 & parameters .~
575 [ Inline $ mempty
576 & required ?~ True
577 & name .~ "id"
578 & description ?~ "TodoId param"
579 & in_ .~ ParamPath
580 & schema ?~ Inline (mempty
581 & type_ ?~ SwaggerString ) ]
582 & tags .~ InsOrdHS.fromList [ "todo" ] ))
584swaggerExampleJSON :: Value
585swaggerExampleJSON = [aesonQQ|
587 "openapi": "3.0.0",
588 "info": {
589 "version": "1.0",
590 "title": "Todo API",
591 "license": {
592 "url": "http://mit.com",
593 "name": "MIT"
594 },
595 "description": "This is an API that tests servant-swagger support for a Todo API"
596 },
597 "paths": {
598 "/todo/{id}": {
599 "get": {
600 "tags": [
601 "todo"
602 ],
603 "parameters": [
604 {
605 "required": true,
606 "schema": {
607 "type": "string"
608 },
609 "in": "path",
610 "name": "id",
611 "description": "TodoId param"
612 }
613 ],
614 "responses": {
615 "200": {
616 "content": {
617 "application/json": {
618 "schema": {
619 "example": {
620 "created": 100,
621 "description": "get milk"
622 },
623 "type": "object",
624 "description": "This is some real Todo right here",
625 "properties": {
626 "created": {
627 "format": "int32",
628 "type": "integer"
629 },
630 "description": {
631 "type": "string"
632 }
633 }
634 }
635 }
636 },
637 "description": "OK"
638 }
639 }
640 }
641 }
642 },
643 "components": {}
645|]
647petstoreExampleJSON :: Value
648petstoreExampleJSON = [aesonQQ|
650 "openapi": "3.0.0",
651 "info": {
652 "version": "1.0.0",
653 "title": "Swagger Petstore",
654 "license": {
655 "name": "MIT"
656 }
657 },
658 "servers": [
659 {
660 "url": "http://petstore.swagger.io/v1"
661 }
662 ],
663 "paths": {
664 "/pets": {
665 "get": {
666 "summary": "List all pets",
667 "operationId": "listPets",
668 "tags": [
669 "pets"
670 ],
671 "parameters": [
672 {
673 "name": "limit",
674 "in": "query",
675 "description": "How many items to return at one time (max 100)",
676 "required": false,
677 "schema": {
678 "type": "integer",
679 "format": "int32"
680 }
681 }
682 ],
683 "responses": {
684 "200": {
685 "description": "A paged array of pets",
686 "headers": {
687 "x-next": {
688 "description": "A link to the next page of responses",
689 "schema": {
690 "type": "string"
691 }
692 }
693 },
694 "content": {
695 "application/json": {
696 "schema": {
697 "type": "array",
698 "items": {
699 "type": "object",
700 "required": [
701 "id",
702 "name"
703 ],
704 "properties": {
705 "id": {
706 "type": "integer",
707 "format": "int64"
708 },
709 "name": {
710 "type": "string"
711 },
712 "tag": {
713 "type": "string"
714 }
715 }
716 }
717 }
718 }
719 }
720 },
721 "default": {
722 "description": "unexpected error",
723 "content": {
724 "application/json": {
725 "schema": {
726 "type": "object",
727 "required": [
728 "code",
729 "message"
730 ],
731 "properties": {
732 "code": {
733 "type": "integer",
734 "format": "int32"
735 },
736 "message": {
737 "type": "string"
738 }
739 }
740 }
741 }
742 }
743 }
744 }
745 },
746 "post": {
747 "summary": "Create a pet",
748 "operationId": "createPets",
749 "tags": [
750 "pets"
751 ],
752 "responses": {
753 "201": {
754 "description": "Null response"
755 },
756 "default": {
757 "description": "unexpected error",
758 "content": {
759 "application/json": {
760 "schema": {
761 "type": "object",
762 "required": [
763 "code",
764 "message"
765 ],
766 "properties": {
767 "code": {
768 "type": "integer",
769 "format": "int32"
770 },
771 "message": {
772 "type": "string"
773 }
774 }
775 }
776 }
777 }
778 }
779 }
780 }
781 },
782 "/pets/{petId}": {
783 "get": {
784 "summary": "Info for a specific pet",
785 "operationId": "showPetById",
786 "tags": [
787 "pets"
788 ],
789 "parameters": [
790 {
791 "name": "petId",
792 "in": "path",
793 "required": true,
794 "description": "The id of the pet to retrieve",
795 "schema": {
796 "type": "string"
797 }
798 }
799 ],
800 "responses": {
801 "200": {
802 "description": "Expected response to a valid request",
803 "content": {
804 "application/json": {
805 "schema": {
806 "type": "object",
807 "required": [
808 "id",
809 "name"
810 ],
811 "properties": {
812 "id": {
813 "type": "integer",
814 "format": "int64"
815 },
816 "name": {
817 "type": "string"
818 },
819 "tag": {
820 "type": "string"
821 }
822 }
823 }
824 }
825 }
826 },
827 "default": {
828 "description": "unexpected error",
829 "content": {
830 "application/json": {
831 "schema": {
832 "type": "object",
833 "required": [
834 "code",
835 "message"
836 ],
837 "properties": {
838 "code": {
839 "type": "integer",
840 "format": "int32"
841 },
842 "message": {
843 "type": "string"
844 }
845 }
846 }
847 }
848 }
849 }
850 }
851 }
852 }
853 },
854 "components": {
855 "schemas": {
856 "Pet": {
857 "type": "object",
858 "required": [
859 "id",
860 "name"
861 ],
862 "properties": {
863 "id": {
864 "type": "integer",
865 "format": "int64"
866 },
867 "name": {
868 "type": "string"
869 },
870 "tag": {
871 "type": "string"
872 }
873 }
874 },
875 "Pets": {
876 "type": "array",
877 "items": {
878 "type": "object",
879 "required": [
880 "id",
881 "name"
882 ],
883 "properties": {
884 "id": {
885 "type": "integer",
886 "format": "int64"
887 },
888 "name": {
889 "type": "string"
890 },
891 "tag": {
892 "type": "string"
893 }
894 }
895 }
896 },
897 "Error": {
898 "type": "object",
899 "required": [
900 "code",
901 "message"
902 ],
903 "properties": {
904 "code": {
905 "type": "integer",
906 "format": "int32"
907 },
908 "message": {
909 "type": "string"
910 }
911 }
912 }
913 }
914 }
916|]
918compositionSchemaExample :: Schema
919compositionSchemaExample = mempty
920 & type_ ?~ SwaggerObject
921 & Data.Swagger.allOf ?~ [
922 Ref (Reference "Other")
923 , Inline (mempty
924 & type_ ?~ SwaggerObject
925 & properties .~
926 [ ("greet", Inline $ mempty
927 & type_ ?~ SwaggerString) ])
928 ]
930compositionSchemaExampleJSON :: Value
931compositionSchemaExampleJSON = [aesonQQ|
933 "type": "object",
934 "allOf": [
935 {
936 "$ref": "#/components/schemas/Other"
937 },
938 {
939 "type": "object",
940 "properties": {
941 "greet": { "type": "string" }
942 }
943 }
944 ]
946|]