@@ -35,61 +35,61 @@ import Data.Swagger.Internal.Utils
3535data Swagger = Swagger
3636 { -- | Provides metadata about the API.
3737 -- The metadata can be used by the clients if needed.
38− swaggerInfo :: SwaggerInfo
38+ _swaggerInfo :: SwaggerInfo
3939
4040 -- | The host (name or ip) serving the API. It MAY include a port.
4141 -- If the host is not included, the host serving the documentation is to be used (including the port).
42− , swaggerHost :: Maybe SwaggerHost
42+ , _swaggerHost :: Maybe SwaggerHost
4343
4444 -- | The base path on which the API is served, which is relative to the host.
4545 -- If it is not included, the API is served directly under the host.
4646 -- The value MUST start with a leading slash (/).
47− , swaggerBasePath :: Maybe FilePath
47+ , _swaggerBasePath :: Maybe FilePath
4848
4949 -- | The transfer protocol of the API.
5050 -- If the schemes is not included, the default scheme to be used is the one used to access the Swagger definition itself.
51− , swaggerSchemes :: Maybe [SwaggerScheme]
51+ , _swaggerSchemes :: Maybe [SwaggerScheme]
5252
5353 -- | A list of MIME types the APIs can consume.
5454 -- This is global to all APIs but can be overridden on specific API calls.
55− , swaggerConsumes :: SwaggerMimeList
55+ , _swaggerConsumes :: SwaggerMimeList
5656
5757 -- | A list of MIME types the APIs can produce.
5858 -- This is global to all APIs but can be overridden on specific API calls.
59− , swaggerProduces :: SwaggerMimeList
59+ , _swaggerProduces :: SwaggerMimeList
6060
6161 -- | The available paths and operations for the API.
62− , swaggerPaths :: SwaggerPaths
62+ , _swaggerPaths :: SwaggerPaths
6363
6464 -- | An object to hold data types produced and consumed by operations.
65− , swaggerDefinitions :: HashMap Text SwaggerSchema
65+ , _swaggerDefinitions :: HashMap Text SwaggerSchema
6666
6767 -- | An object to hold parameters that can be used across operations.
6868 -- This property does not define global parameters for all operations.
69− , swaggerParameters :: HashMap Text SwaggerParameter
69+ , _swaggerParameters :: HashMap Text SwaggerParameter
7070
7171 -- | An object to hold responses that can be used across operations.
7272 -- This property does not define global responses for all operations.
73− , swaggerResponses :: HashMap Text SwaggerResponse
73+ , _swaggerResponses :: HashMap Text SwaggerResponse
7474
7575 -- | Security scheme definitions that can be used across the specification.
76− , swaggerSecurityDefinitions :: HashMap Text SwaggerSecurityScheme
76+ , _swaggerSecurityDefinitions :: HashMap Text SwaggerSecurityScheme
7777
7878 -- | A declaration of which security schemes are applied for the API as a whole.
7979 -- The list of values describes alternative security schemes that can be used
8080 -- (that is, there is a logical OR between the security requirements).
8181 -- Individual operations can override this definition.
82− , swaggerSecurity :: [SwaggerSecurityRequirement]
82+ , _swaggerSecurity :: [SwaggerSecurityRequirement]
8383
8484 -- | A list of tags used by the specification with additional metadata.
8585 -- The order of the tags can be used to reflect on their order by the parsing tools.
8686 -- Not all tags that are used by the Operation Object must be declared.
8787 -- The tags that are not declared may be organized randomly or based on the tools' logic.
8888 -- Each tag name in the list MUST be unique.
89− , swaggerTags :: [SwaggerTag]
89+ , _swaggerTags :: [SwaggerTag]
9090
9191 -- | Additional external documentation.
92− , swaggerExternalDocs :: Maybe SwaggerExternalDocs
92+ , _swaggerExternalDocs :: Maybe SwaggerExternalDocs
9393 } deriving (Eq, Show, Generic)
9494
9595-- | The object provides metadata about the API.
@@ -97,51 +97,51 @@ data Swagger = Swagger
9797-- and can be presented in the Swagger-UI for convenience.
9898data SwaggerInfo = SwaggerInfo
9999 { -- | The title of the application.
100− swaggerInfoTitle :: Text
100+ _swaggerInfoTitle :: Text
101101
102102 -- | A short description of the application.
103103 -- GFM syntax can be used for rich text representation.
104− , swaggerInfoDescription :: Maybe Text
104+ , _swaggerInfoDescription :: Maybe Text
105105
106106 -- | The Terms of Service for the API.
107− , swaggerInfoTermsOfService :: Maybe Text
107+ , _swaggerInfoTermsOfService :: Maybe Text
108108
109109 -- | The contact information for the exposed API.
110− , swaggerInfoContact :: Maybe SwaggerContact
110+ , _swaggerInfoContact :: Maybe SwaggerContact
111111
112112 -- | The license information for the exposed API.
113− , swaggerInfoLicense :: Maybe SwaggerLicense
113+ , _swaggerInfoLicense :: Maybe SwaggerLicense
114114
115115 -- | Provides the version of the application API
116116 -- (not to be confused with the specification version).
117− , swaggerInfoVersion :: Text
117+ , _swaggerInfoVersion :: Text
118118 } deriving (Eq, Show, Generic)
119119
120120-- | Contact information for the exposed API.
121121data SwaggerContact = SwaggerContact
122122 { -- | The identifying name of the contact person/organization.
123− swaggerContactName :: Maybe Text
123+ _swaggerContactName :: Maybe Text
124124
125125 -- | The URL pointing to the contact information.
126− , swaggerContactUrl :: Maybe URL
126+ , _swaggerContactUrl :: Maybe URL
127127
128128 -- | The email address of the contact person/organization.
129− , swaggerContactEmail :: Maybe Text
129+ , _swaggerContactEmail :: Maybe Text
130130 } deriving (Eq, Show)
131131
132132-- | License information for the exposed API.
133133data SwaggerLicense = SwaggerLicense
134134 { -- | The license name used for the API.
135− swaggerLicenseName :: Text
135+ _swaggerLicenseName :: Text
136136
137137 -- | A URL to the license used for the API.
138− , swaggerLicenseUrl :: Maybe URL
138+ , _swaggerLicenseUrl :: Maybe URL
139139 } deriving (Eq, Show)
140140
141141-- | The host (name or ip) serving the API. It MAY include a port.
142142data SwaggerHost = SwaggerHost
143− { swaggerHostName :: HostName -- ^ Host name.
144− , swaggerHostPort :: Maybe PortNumber -- ^ Optional port.
143+ { _swaggerHostName :: HostName -- ^ Host name.
144+ , _swaggerHostPort :: Maybe PortNumber -- ^ Optional port.
145145 } deriving (Eq, Show)
146146
147147-- | The transfer protocol of the API.
@@ -156,7 +156,7 @@ data SwaggerScheme
156156data SwaggerPaths = SwaggerPaths
157157 { -- | Holds the relative paths to the individual endpoints.
158158 -- The path is appended to the @'swaggerBasePath'@ in order to construct the full URL.
159− swaggerPathsMap :: HashMap FilePath SwaggerPathItem
159+ _swaggerPathsMap :: HashMap FilePath SwaggerPathItem
160160 } deriving (Eq, Show, Generic)
161161
162162-- | Describes the operations available on a single path.
@@ -165,91 +165,91 @@ data SwaggerPaths = SwaggerPaths
165165-- but they will not know which operations and parameters are available.
166166data SwaggerPathItem = SwaggerPathItem
167167 { -- | A definition of a GET operation on this path.
168− swaggerPathItemGet :: Maybe SwaggerOperation
168+ _swaggerPathItemGet :: Maybe SwaggerOperation
169169
170170 -- | A definition of a PUT operation on this path.
171− , swaggerPathItemPut :: Maybe SwaggerOperation
171+ , _swaggerPathItemPut :: Maybe SwaggerOperation
172172
173173 -- | A definition of a POST operation on this path.
174− , swaggerPathItemPost :: Maybe SwaggerOperation
174+ , _swaggerPathItemPost :: Maybe SwaggerOperation
175175
176176 -- | A definition of a DELETE operation on this path.
177− , swaggerPathItemDelete :: Maybe SwaggerOperation
177+ , _swaggerPathItemDelete :: Maybe SwaggerOperation
178178
179179 -- | A definition of a OPTIONS operation on this path.
180− , swaggerPathItemOptions :: Maybe SwaggerOperation
180+ , _swaggerPathItemOptions :: Maybe SwaggerOperation
181181
182182 -- | A definition of a HEAD operation on this path.
183− , swaggerPathItemHead :: Maybe SwaggerOperation
183+ , _swaggerPathItemHead :: Maybe SwaggerOperation
184184
185185 -- | A definition of a PATCH operation on this path.
186− , swaggerPathItemPatch :: Maybe SwaggerOperation
186+ , _swaggerPathItemPatch :: Maybe SwaggerOperation
187187
188188 -- | A list of parameters that are applicable for all the operations described under this path.
189189 -- These parameters can be overridden at the operation level, but cannot be removed there.
190190 -- The list MUST NOT include duplicated parameters.
191191 -- A unique parameter is defined by a combination of a name and location.
192− , swaggerPathItemParameters :: [SwaggerReferenced SwaggerParameter]
192+ , _swaggerPathItemParameters :: [SwaggerReferenced SwaggerParameter]
193193 } deriving (Eq, Show, Generic)
194194
195195-- | Describes a single API operation on a path.
196196data SwaggerOperation = SwaggerOperation
197197 { -- | A list of tags for API documentation control.
198198 -- Tags can be used for logical grouping of operations by resources or any other qualifier.
199− swaggerOperationTags :: [Text]
199+ _swaggerOperationTags :: [Text]
200200
201201 -- | A short summary of what the operation does.
202202 -- For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters.
203− , swaggerOperationSummary :: Maybe Text
203+ , _swaggerOperationSummary :: Maybe Text
204204
205205 -- | A verbose explanation of the operation behavior.
206206 -- GFM syntax can be used for rich text representation.
207− , swaggerOperationDescription :: Maybe Text
207+ , _swaggerOperationDescription :: Maybe Text
208208
209209 -- | Additional external documentation for this operation.
210− , swaggerOperationExternalDocs :: Maybe SwaggerExternalDocs
210+ , _swaggerOperationExternalDocs :: Maybe SwaggerExternalDocs
211211
212212 -- | Unique string used to identify the operation.
213213 -- The id MUST be unique among all operations described in the API.
214214 -- Tools and libraries MAY use the it to uniquely identify an operation,
215215 -- therefore, it is recommended to follow common programming naming conventions.
216− , swaggerOperationOperationId :: Maybe Text
216+ , _swaggerOperationOperationId :: Maybe Text
217217
218218 -- | A list of MIME types the operation can consume.
219219 -- This overrides the @'swaggerConsumes'@.
220220 -- @Just []@ MAY be used to clear the global definition.
221− , swaggerOperationConsumes :: Maybe SwaggerMimeList
221+ , _swaggerOperationConsumes :: Maybe SwaggerMimeList
222222
223223 -- | A list of MIME types the operation can produce.
224224 -- This overrides the @'swaggerProduces'@.
225225 -- @Just []@ MAY be used to clear the global definition.
226− , swaggerOperationProduces :: Maybe SwaggerMimeList
226+ , _swaggerOperationProduces :: Maybe SwaggerMimeList
227227
228228 -- | A list of parameters that are applicable for this operation.
229229 -- If a parameter is already defined at the @'SwaggerPathItem'@,
230230 -- the new definition will override it, but can never remove it.
231231 -- The list MUST NOT include duplicated parameters.
232232 -- A unique parameter is defined by a combination of a name and location.
233− , swaggerOperationParameters :: [SwaggerReferenced SwaggerParameter]
233+ , _swaggerOperationParameters :: [SwaggerReferenced SwaggerParameter]
234234
235235 -- | The list of possible responses as they are returned from executing this operation.
236− , swaggerOperationResponses :: SwaggerResponses
236+ , _swaggerOperationResponses :: SwaggerResponses
237237
238238 -- | The transfer protocol for the operation.
239239 -- The value overrides @'swaggerSchemes'@.
240− , swaggerOperationSchemes :: Maybe [SwaggerScheme]
240+ , _swaggerOperationSchemes :: Maybe [SwaggerScheme]
241241
242242 -- | Declares this operation to be deprecated.
243243 -- Usage of the declared operation should be refrained.
244244 -- Default value is @False@.
245− , swaggerOperationDeprecated :: Bool
245+ , _swaggerOperationDeprecated :: Bool
246246
247247 -- | A declaration of which security schemes are applied for this operation.
248248 -- The list of values describes alternative security schemes that can be used
249249 -- (that is, there is a logical OR between the security requirements).
250250 -- This definition overrides any declared top-level security.
251251 -- To remove a top-level security declaration, @Just []@ can be used.
252− , swaggerOperationSecurity :: [SwaggerSecurityRequirement]
252+ , _swaggerOperationSecurity :: [SwaggerSecurityRequirement]
253253 } deriving (Eq, Show, Generic)
254254
255255newtype SwaggerMimeList = SwaggerMimeList { getSwaggerMimeList :: [MediaType] }
@@ -260,20 +260,20 @@ newtype SwaggerMimeList = SwaggerMimeList { getSwaggerMimeList :: [MediaType] }
260260data SwaggerParameter = SwaggerParameter
261261 { -- | The name of the parameter.
262262 -- Parameter names are case sensitive.
263− swaggerParameterName :: Text
263+ _swaggerParameterName :: Text
264264
265265 -- | A brief description of the parameter.
266266 -- This could contain examples of use.
267267 -- GFM syntax can be used for rich text representation.
268− , swaggerParameterDescription :: Maybe Text
268+ , _swaggerParameterDescription :: Maybe Text
269269
270270 -- | Determines whether this parameter is mandatory.
271271 -- If the parameter is in "path", this property is required and its value MUST be true.
272272 -- Otherwise, the property MAY be included and its default value is @False@.
273− , swaggerParameterRequired :: Bool
273+ , _swaggerParameterRequired :: Bool
274274
275275 -- | Parameter schema.
276− , swaggerParameterSchema :: SwaggerParameterSchema
276+ , _swaggerParameterSchema :: SwaggerParameterSchema
277277 } deriving (Eq, Show, Generic)
278278
279279data SwaggerParameterSchema
@@ -283,7 +283,7 @@ data SwaggerParameterSchema
283283
284284data SwaggerParameterOtherSchema = SwaggerParameterOtherSchema
285285 { -- | The location of the parameter.
286− swaggerParameterOtherSchemaIn :: SwaggerParameterLocation
286+ _swaggerParameterOtherSchemaIn :: SwaggerParameterLocation
287287
288288 -- | The type of the parameter.
289289 -- Since the parameter is not located at the request body,
@@ -291,26 +291,26 @@ data SwaggerParameterOtherSchema = SwaggerParameterOtherSchema
291291 -- If type is @'SwaggerParamFile'@, the @consumes@ MUST be either
292292 -- "multipart/form-data" or " application/x-www-form-urlencoded"
293293 -- and the parameter MUST be in @'SwaggerParameterFormData'@.
294− , swaggerParameterOtherSchemaType :: SwaggerParameterType
294+ , _swaggerParameterOtherSchemaType :: SwaggerParameterType
295295
296296 -- | The extending format for the previously mentioned type.
297− , swaggerParameterOtherSchemaFormat :: Maybe SwaggerFormat
297+ , _swaggerParameterOtherSchemaFormat :: Maybe SwaggerFormat
298298
299299 -- | Sets the ability to pass empty-valued parameters.
300300 -- This is valid only for either @'SwaggerParameterQuery'@ or @'SwaggerParameterFormData'@
301301 -- and allows you to send a parameter with a name only or an empty value.
302302 -- Default value is @False@.
303− , swaggerParameterOtherSchemaAllowEmptyValue :: Bool
303+ , _swaggerParameterOtherSchemaAllowEmptyValue :: Bool
304304
305305 -- | __Required if type is @'SwaggerParamArray'@__.
306306 -- Describes the type of items in the array.
307− , swaggerParameterOtherSchemaItems :: Maybe SwaggerItems
307+ , _swaggerParameterOtherSchemaItems :: Maybe SwaggerItems
308308
309309 -- | Determines the format of the array if @'SwaggerParamArray'@ is used.
310310 -- Default value is csv.
311− , swaggerParameterOtherSchemaCollectionFormat :: Maybe SwaggerCollectionFormat
311+ , _swaggerParameterOtherSchemaCollectionFormat :: Maybe SwaggerCollectionFormat
312312
313− , swaggerParameterOtherSchemaCommon :: SwaggerSchemaCommon
313+ , _swaggerParameterOtherSchemaCommon :: SwaggerSchemaCommon
314314 } deriving (Eq, Show, Generic)
315315
316316data SwaggerParameterType
@@ -384,27 +384,27 @@ data SwaggerItemsCollectionFormat
384384type SwaggerParamName = Text
385385
386386data SwaggerSchema = SwaggerSchema
387− { swaggerSchemaType :: SwaggerSchemaType
388− , swaggerSchemaFormat :: Maybe SwaggerFormat
389− , swaggerSchemaTitle :: Maybe Text
390− , swaggerSchemaDescription :: Maybe Text
391− , swaggerSchemaRequired :: [SwaggerParamName]
392−
393− , swaggerSchemaItems :: Maybe SwaggerSchemaItems
394− , swaggerSchemaAllOf :: Maybe [SwaggerSchema]
395− , swaggerSchemaProperties :: HashMap Text (SwaggerReferenced SwaggerSchema)
396− , swaggerSchemaAdditionalProperties :: Maybe SwaggerSchema
397−
398− , swaggerSchemaDiscriminator :: Maybe Text
399− , swaggerSchemaReadOnly :: Maybe Bool
400− , swaggerSchemaXml :: Maybe SwaggerXml
401− , swaggerSchemaExternalDocs :: Maybe SwaggerExternalDocs
402− , swaggerSchemaExample :: Maybe Value
403−
404− , swaggerSchemaMaxProperties :: Maybe Integer
405− , swaggerSchemaMinProperties :: Maybe Integer
406−
407− , swaggerSchemaCommon :: SwaggerSchemaCommon
387+ { _swaggerSchemaType :: SwaggerSchemaType
388+ , _swaggerSchemaFormat :: Maybe SwaggerFormat
389+ , _swaggerSchemaTitle :: Maybe Text
390+ , _swaggerSchemaDescription :: Maybe Text
391+ , _swaggerSchemaRequired :: [SwaggerParamName]
392+
393+ , _swaggerSchemaItems :: Maybe SwaggerSchemaItems
394+ , _swaggerSchemaAllOf :: Maybe [SwaggerSchema]
395+ , _swaggerSchemaProperties :: HashMap Text (SwaggerReferenced SwaggerSchema)
396+ , _swaggerSchemaAdditionalProperties :: Maybe SwaggerSchema
397+
398+ , _swaggerSchemaDiscriminator :: Maybe Text
399+ , _swaggerSchemaReadOnly :: Maybe Bool
400+ , _swaggerSchemaXml :: Maybe SwaggerXml
401+ , _swaggerSchemaExternalDocs :: Maybe SwaggerExternalDocs
402+ , _swaggerSchemaExample :: Maybe Value
403+
404+ , _swaggerSchemaMaxProperties :: Maybe Integer
405+ , _swaggerSchemaMinProperties :: Maybe Integer
406+
407+ , _swaggerSchemaCommon :: SwaggerSchemaCommon
408408 } deriving (Eq, Show, Generic)
409409
410410data SwaggerSchemaItems
@@ -418,20 +418,20 @@ data SwaggerSchemaCommon = SwaggerSchemaCommon
418418 -- if not supplied by the client in the request.
419419 -- (Note: "default" has no meaning for required parameters.)
420420 -- Unlike JSON Schema this value MUST conform to the defined type for this parameter.
421− swaggerSchemaDefault :: Maybe Value
422−
423− , swaggerSchemaMaximum :: Maybe Integer
424− , swaggerSchemaExclusiveMaximum :: Maybe Bool
425− , swaggerSchemaMinimum :: Maybe Integer
426− , swaggerSchemaExclusiveMinimum :: Maybe Bool
427− , swaggerSchemaMaxLength :: Maybe Integer
428− , swaggerSchemaMinLength :: Maybe Integer
429− , swaggerSchemaPattern :: Maybe Text
430− , swaggerSchemaMaxItems :: Maybe Integer
431− , swaggerSchemaMinItems :: Maybe Integer
432− , swaggerSchemaUniqueItems :: Maybe Bool
433− , swaggerSchemaEnum :: Maybe [Value]
434− , swaggerSchemaMultipleOf :: Maybe Integer
421+ _swaggerSchemaDefault :: Maybe Value
422+
423+ , _swaggerSchemaMaximum :: Maybe Integer
424+ , _swaggerSchemaExclusiveMaximum :: Maybe Bool
425+ , _swaggerSchemaMinimum :: Maybe Integer
426+ , _swaggerSchemaExclusiveMinimum :: Maybe Bool
427+ , _swaggerSchemaMaxLength :: Maybe Integer
428+ , _swaggerSchemaMinLength :: Maybe Integer
429+ , _swaggerSchemaPattern :: Maybe Text
430+ , _swaggerSchemaMaxItems :: Maybe Integer
431+ , _swaggerSchemaMinItems :: Maybe Integer
432+ , _swaggerSchemaUniqueItems :: Maybe Bool
433+ , _swaggerSchemaEnum :: Maybe [Value]
434+ , _swaggerSchemaMultipleOf :: Maybe Integer
435435 } deriving (Eq, Show, Generic)
436436
437437data SwaggerXml = SwaggerXml
@@ -440,18 +440,18 @@ data SwaggerXml = SwaggerXml
440440 -- When defined alongside type being array (outside the items),
441441 -- it will affect the wrapping element and only if wrapped is true.
442442 -- If wrapped is false, it will be ignored.
443− swaggerXmlName :: Maybe Text
443+ _swaggerXmlName :: Maybe Text
444444
445445 -- | The URL of the namespace definition.
446446 -- Value SHOULD be in the form of a URL.
447− , swaggerXmlNamespace :: Maybe Text
447+ , _swaggerXmlNamespace :: Maybe Text
448448
449449 -- | The prefix to be used for the name.
450− , swaggerXmlPrefix :: Maybe Text
450+ , _swaggerXmlPrefix :: Maybe Text
451451
452452 -- | Declares whether the property definition translates to an attribute instead of an element.
453453 -- Default value is @False@.
454− , swaggerXmlAttribute :: Bool
454+ , _swaggerXmlAttribute :: Bool
455455
456456 -- | MAY be used only for an array definition.
457457 -- Signifies whether the array is wrapped
@@ -459,25 +459,25 @@ data SwaggerXml = SwaggerXml
459459 -- or unwrapped (@\<book/\>\<book/\>@).
460460 -- Default value is @False@.
461461 -- The definition takes effect only when defined alongside type being array (outside the items).
462− , swaggerXmlWrapped :: Bool
462+ , _swaggerXmlWrapped :: Bool
463463 } deriving (Eq, Show, Generic)
464464
465465data SwaggerItems = SwaggerItems
466466 { -- | The internal type of the array.
467− swaggerItemsType :: SwaggerItemsType
467+ _swaggerItemsType :: SwaggerItemsType
468468
469469 -- | The extending format for the previously mentioned type.
470− , swaggerItemsFormat :: Maybe SwaggerFormat
470+ , _swaggerItemsFormat :: Maybe SwaggerFormat
471471
472472 -- | __Required if type is @'SwaggerItemsArray'@.__
473473 -- Describes the type of items in the array.
474− , swaggerItemsItems :: Maybe SwaggerItems
474+ , _swaggerItemsItems :: Maybe SwaggerItems
475475
476476 -- | Determines the format of the array if type array is used.
477477 -- Default value is @'SwaggerItemsCollectionCSV'@.
478− , swaggerItemsCollectionFormat :: Maybe SwaggerItemsCollectionFormat
478+ , _swaggerItemsCollectionFormat :: Maybe SwaggerItemsCollectionFormat
479479
480− , swaggerItemsCommon :: SwaggerSchemaCommon
480+ , _swaggerItemsCommon :: SwaggerSchemaCommon
481481 } deriving (Eq, Show, Generic)
482482
483483-- | A container for the expected responses of an operation.
@@ -488,11 +488,11 @@ data SwaggerItems = SwaggerItems
488488data SwaggerResponses = SwaggerResponses
489489 { -- | The documentation of responses other than the ones declared for specific HTTP response codes.
490490 -- It can be used to cover undeclared responses.
491− swaggerResponsesDefault :: Maybe (SwaggerReferenced SwaggerResponse)
491+ _swaggerResponsesDefault :: Maybe (SwaggerReferenced SwaggerResponse)
492492
493493 -- | Any HTTP status code can be used as the property name (one property per HTTP status code).
494494 -- Describes the expected response for those HTTP status codes.
495− , swaggerResponsesResponses :: HashMap HttpStatusCode (SwaggerReferenced SwaggerResponse)
495+ , _swaggerResponsesResponses :: HashMap HttpStatusCode (SwaggerReferenced SwaggerResponse)
496496 } deriving (Eq, Show, Generic)
497497
498498type HttpStatusCode = Int
@@ -501,43 +501,43 @@ type HttpStatusCode = Int
501501data SwaggerResponse = SwaggerResponse
502502 { -- | A short description of the response.
503503 -- GFM syntax can be used for rich text representation.
504− swaggerResponseDescription :: Text
504+ _swaggerResponseDescription :: Text
505505
506506 -- | A definition of the response structure.
507507 -- It can be a primitive, an array or an object.
508508 -- If this field does not exist, it means no content is returned as part of the response.
509509 -- As an extension to the Schema Object, its root type value may also be "file".
510510 -- This SHOULD be accompanied by a relevant produces mime-type.
511− , swaggerResponseSchema :: Maybe (SwaggerReferenced SwaggerSchema)
511+ , _swaggerResponseSchema :: Maybe (SwaggerReferenced SwaggerSchema)
512512
513513 -- | A list of headers that are sent with the response.
514− , swaggerResponseHeaders :: HashMap HeaderName SwaggerHeader
514+ , _swaggerResponseHeaders :: HashMap HeaderName SwaggerHeader
515515
516516 -- | An example of the response message.
517− , swaggerResponseExamples :: Maybe SwaggerExample
517+ , _swaggerResponseExamples :: Maybe SwaggerExample
518518 } deriving (Eq, Show, Generic)
519519
520520type HeaderName = Text
521521
522522data SwaggerHeader = SwaggerHeader
523523 { -- | A short description of the header.
524− swaggerHeaderDescription :: Maybe String
524+ _swaggerHeaderDescription :: Maybe Text
525525
526526 -- | The type of the object.
527− , swaggerHeaderType :: SwaggerItemsType
527+ , _swaggerHeaderType :: SwaggerItemsType
528528
529529 -- | The extending format for the previously mentioned type. See Data Type Formats for further details.
530− , swaggerHeaderFormat :: Maybe SwaggerFormat
530+ , _swaggerHeaderFormat :: Maybe SwaggerFormat
531531
532532 -- | __Required if type is @'SwaggerItemsArray'@__.
533533 -- Describes the type of items in the array.
534− , swaggerHeaderItems :: Maybe SwaggerItems
534+ , _swaggerHeaderItems :: Maybe SwaggerItems
535535
536536 -- | Determines the format of the array if type array is used.
537537 -- Default value is @'SwaggerItemsCollectionCSV'@.
538− , swaggerHeaderCollectionFormat :: Maybe SwaggerItemsCollectionFormat
538+ , _swaggerHeaderCollectionFormat :: Maybe SwaggerItemsCollectionFormat
539539
540− , swaggerHeaderCommon :: SwaggerSchemaCommon
540+ , _swaggerHeaderCommon :: SwaggerSchemaCommon
541541 } deriving (Eq, Show, Generic)
542542
543543data SwaggerExample = SwaggerExample { getSwaggerExample :: Map MediaType Value }
@@ -551,10 +551,10 @@ data SwaggerApiKeyLocation
551551
552552data SwaggerApiKeyParams = SwaggerApiKeyParams
553553 { -- | The name of the header or query parameter to be used.
554− swaggerApiKeyName :: Text
554+ _swaggerApiKeyName :: Text
555555
556556 -- | The location of the API key.
557− , swaggerApiKeyIn :: SwaggerApiKeyLocation
557+ , _swaggerApiKeyIn :: SwaggerApiKeyLocation
558558 } deriving (Eq, Show)
559559
560560-- | The authorization URL to be used for OAuth2 flow. This SHOULD be in the form of a URL.
@@ -572,10 +572,10 @@ data SwaggerOAuth2Flow
572572
573573data SwaggerOAuth2Params = SwaggerOAuth2Params
574574 { -- | The flow used by the OAuth2 security scheme.
575− swaggerOAuth2Flow :: SwaggerOAuth2Flow
575+ _swaggerOAuth2Flow :: SwaggerOAuth2Flow
576576
577577 -- | The available scopes for the OAuth2 security scheme.
578− , swaggerOAuth2Scopes :: HashMap Text Text
578+ , _swaggerOAuth2Scopes :: HashMap Text Text
579579 } deriving (Eq, Show, Generic)
580580
581581data SwaggerSecuritySchemeType
@@ -586,10 +586,10 @@ data SwaggerSecuritySchemeType
586586
587587data SwaggerSecurityScheme = SwaggerSecurityScheme
588588 { -- | The type of the security scheme.
589− swaggerSecuritySchemeType :: SwaggerSecuritySchemeType
589+ _swaggerSecuritySchemeType :: SwaggerSecuritySchemeType
590590
591591 -- | A short description for security scheme.
592− , swaggerSecuritySchemeDescription :: Maybe Text
592+ , _swaggerSecuritySchemeDescription :: Maybe Text
593593 } deriving (Eq, Show, Generic)
594594
595595-- | Lists the required security schemes to execute this operation.
@@ -603,24 +603,24 @@ newtype SwaggerSecurityRequirement = SwaggerSecurityRequirement
603603-- It is not mandatory to have a @SwaggerTag@ per tag used there.
604604data SwaggerTag = SwaggerTag
605605 { -- | The name of the tag.
606− swaggerTagName :: Text
606+ _swaggerTagName :: Text
607607
608608 -- | A short description for the tag.
609609 -- GFM syntax can be used for rich text representation.
610− , swaggerTagDescription :: Maybe Text
610+ , _swaggerTagDescription :: Maybe Text
611611
612612 -- | Additional external documentation for this tag.
613− , swaggerTagExternalDocs :: Maybe SwaggerExternalDocs
613+ , _swaggerTagExternalDocs :: Maybe SwaggerExternalDocs
614614 } deriving (Eq, Show)
615615
616616-- | Allows referencing an external resource for extended documentation.
617617data SwaggerExternalDocs = SwaggerExternalDocs
618618 { -- | A short description of the target documentation.
619619 -- GFM syntax can be used for rich text representation.
620− swaggerExternalDocsDescription :: Maybe Text
620+ _swaggerExternalDocsDescription :: Maybe Text
621621
622622 -- | The URL for the target documentation.
623− , swaggerExternalDocsUrl :: URL
623+ , _swaggerExternalDocsUrl :: URL
624624 } deriving (Eq, Show, Generic)
625625
626626-- | A simple object to allow referencing other definitions in the specification.