@@ -35,61 +35,61 @@ import Data.Swagger.Internal.Utils
35data Swagger = Swagger
35data Swagger = Swagger
36 { -- | Provides metadata about the API.
36 { -- | Provides metadata about the API.
37 -- The metadata can be used by the clients if needed.
37 -- The metadata can be used by the clients if needed.
38− swaggerInfo :: SwaggerInfo
38+ _swaggerInfo :: SwaggerInfo
40 -- | The host (name or ip) serving the API. It MAY include a port.
40 -- | The host (name or ip) serving the API. It MAY include a port.
41 -- If the host is not included, the host serving the documentation is to be used (including the port).
41 -- 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
44 -- | The base path on which the API is served, which is relative to the host.
44 -- | The base path on which the API is served, which is relative to the host.
45 -- If it is not included, the API is served directly under the host.
45 -- If it is not included, the API is served directly under the host.
46 -- The value MUST start with a leading slash (/).
46 -- The value MUST start with a leading slash (/).
47− , swaggerBasePath :: Maybe FilePath
47+ , _swaggerBasePath :: Maybe FilePath
49 -- | The transfer protocol of the API.
49 -- | The transfer protocol of the API.
50 -- If the schemes is not included, the default scheme to be used is the one used to access the Swagger definition itself.
50 -- 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]
53 -- | A list of MIME types the APIs can consume.
53 -- | A list of MIME types the APIs can consume.
54 -- This is global to all APIs but can be overridden on specific API calls.
54 -- This is global to all APIs but can be overridden on specific API calls.
55− , swaggerConsumes :: SwaggerMimeList
55+ , _swaggerConsumes :: SwaggerMimeList
57 -- | A list of MIME types the APIs can produce.
57 -- | A list of MIME types the APIs can produce.
58 -- This is global to all APIs but can be overridden on specific API calls.
58 -- This is global to all APIs but can be overridden on specific API calls.
59− , swaggerProduces :: SwaggerMimeList
59+ , _swaggerProduces :: SwaggerMimeList
61 -- | The available paths and operations for the API.
61 -- | The available paths and operations for the API.
62− , swaggerPaths :: SwaggerPaths
62+ , _swaggerPaths :: SwaggerPaths
64 -- | An object to hold data types produced and consumed by operations.
64 -- | An object to hold data types produced and consumed by operations.
65− , swaggerDefinitions :: HashMap Text SwaggerSchema
65+ , _swaggerDefinitions :: HashMap Text SwaggerSchema
67 -- | An object to hold parameters that can be used across operations.
67 -- | An object to hold parameters that can be used across operations.
68 -- This property does not define global parameters for all operations.
68 -- This property does not define global parameters for all operations.
69− , swaggerParameters :: HashMap Text SwaggerParameter
69+ , _swaggerParameters :: HashMap Text SwaggerParameter
71 -- | An object to hold responses that can be used across operations.
71 -- | An object to hold responses that can be used across operations.
72 -- This property does not define global responses for all operations.
72 -- This property does not define global responses for all operations.
73− , swaggerResponses :: HashMap Text SwaggerResponse
73+ , _swaggerResponses :: HashMap Text SwaggerResponse
75 -- | Security scheme definitions that can be used across the specification.
75 -- | Security scheme definitions that can be used across the specification.
76− , swaggerSecurityDefinitions :: HashMap Text SwaggerSecurityScheme
76+ , _swaggerSecurityDefinitions :: HashMap Text SwaggerSecurityScheme
78 -- | A declaration of which security schemes are applied for the API as a whole.
78 -- | A declaration of which security schemes are applied for the API as a whole.
79 -- The list of values describes alternative security schemes that can be used
79 -- The list of values describes alternative security schemes that can be used
80 -- (that is, there is a logical OR between the security requirements).
80 -- (that is, there is a logical OR between the security requirements).
81 -- Individual operations can override this definition.
81 -- Individual operations can override this definition.
82− , swaggerSecurity :: [SwaggerSecurityRequirement]
82+ , _swaggerSecurity :: [SwaggerSecurityRequirement]
84 -- | A list of tags used by the specification with additional metadata.
84 -- | A list of tags used by the specification with additional metadata.
85 -- The order of the tags can be used to reflect on their order by the parsing tools.
85 -- The order of the tags can be used to reflect on their order by the parsing tools.
86 -- Not all tags that are used by the Operation Object must be declared.
86 -- Not all tags that are used by the Operation Object must be declared.
87 -- The tags that are not declared may be organized randomly or based on the tools' logic.
87 -- The tags that are not declared may be organized randomly or based on the tools' logic.
88 -- Each tag name in the list MUST be unique.
88 -- Each tag name in the list MUST be unique.
89− , swaggerTags :: [SwaggerTag]
89+ , _swaggerTags :: [SwaggerTag]
91 -- | Additional external documentation.
91 -- | Additional external documentation.
92− , swaggerExternalDocs :: Maybe SwaggerExternalDocs
92+ , _swaggerExternalDocs :: Maybe SwaggerExternalDocs
93 } deriving (Eq, Show, Generic)
93 } deriving (Eq, Show, Generic)
95-- | The object provides metadata about the API.
95-- | The object provides metadata about the API.
@@ -97,51 +97,51 @@ data Swagger = Swagger
97-- and can be presented in the Swagger-UI for convenience.
97-- and can be presented in the Swagger-UI for convenience.
98data SwaggerInfo = SwaggerInfo
98data SwaggerInfo = SwaggerInfo
99 { -- | The title of the application.
99 { -- | The title of the application.
100− swaggerInfoTitle :: Text
100+ _swaggerInfoTitle :: Text
102 -- | A short description of the application.
102 -- | A short description of the application.
103 -- GFM syntax can be used for rich text representation.
103 -- GFM syntax can be used for rich text representation.
104− , swaggerInfoDescription :: Maybe Text
104+ , _swaggerInfoDescription :: Maybe Text
106 -- | The Terms of Service for the API.
106 -- | The Terms of Service for the API.
107− , swaggerInfoTermsOfService :: Maybe Text
107+ , _swaggerInfoTermsOfService :: Maybe Text
109 -- | The contact information for the exposed API.
109 -- | The contact information for the exposed API.
110− , swaggerInfoContact :: Maybe SwaggerContact
110+ , _swaggerInfoContact :: Maybe SwaggerContact
112 -- | The license information for the exposed API.
112 -- | The license information for the exposed API.
113− , swaggerInfoLicense :: Maybe SwaggerLicense
113+ , _swaggerInfoLicense :: Maybe SwaggerLicense
115 -- | Provides the version of the application API
115 -- | Provides the version of the application API
116 -- (not to be confused with the specification version).
116 -- (not to be confused with the specification version).
117− , swaggerInfoVersion :: Text
117+ , _swaggerInfoVersion :: Text
118 } deriving (Eq, Show, Generic)
118 } deriving (Eq, Show, Generic)
120-- | Contact information for the exposed API.
120-- | Contact information for the exposed API.
121data SwaggerContact = SwaggerContact
121data SwaggerContact = SwaggerContact
122 { -- | The identifying name of the contact person/organization.
122 { -- | The identifying name of the contact person/organization.
123− swaggerContactName :: Maybe Text
123+ _swaggerContactName :: Maybe Text
125 -- | The URL pointing to the contact information.
125 -- | The URL pointing to the contact information.
126− , swaggerContactUrl :: Maybe URL
126+ , _swaggerContactUrl :: Maybe URL
128 -- | The email address of the contact person/organization.
128 -- | The email address of the contact person/organization.
129− , swaggerContactEmail :: Maybe Text
129+ , _swaggerContactEmail :: Maybe Text
130 } deriving (Eq, Show)
130 } deriving (Eq, Show)
132-- | License information for the exposed API.
132-- | License information for the exposed API.
133data SwaggerLicense = SwaggerLicense
133data SwaggerLicense = SwaggerLicense
134 { -- | The license name used for the API.
134 { -- | The license name used for the API.
135− swaggerLicenseName :: Text
135+ _swaggerLicenseName :: Text
137 -- | A URL to the license used for the API.
137 -- | A URL to the license used for the API.
138− , swaggerLicenseUrl :: Maybe URL
138+ , _swaggerLicenseUrl :: Maybe URL
139 } deriving (Eq, Show)
139 } deriving (Eq, Show)
141-- | The host (name or ip) serving the API. It MAY include a port.
141-- | The host (name or ip) serving the API. It MAY include a port.
142data SwaggerHost = SwaggerHost
142data SwaggerHost = SwaggerHost
143− { swaggerHostName :: HostName -- ^ Host name.
143+ { _swaggerHostName :: HostName -- ^ Host name.
144− , swaggerHostPort :: Maybe PortNumber -- ^ Optional port.
144+ , _swaggerHostPort :: Maybe PortNumber -- ^ Optional port.
145 } deriving (Eq, Show)
145 } deriving (Eq, Show)
147-- | The transfer protocol of the API.
147-- | The transfer protocol of the API.
@@ -156,7 +156,7 @@ data SwaggerScheme
156data SwaggerPaths = SwaggerPaths
156data SwaggerPaths = SwaggerPaths
157 { -- | Holds the relative paths to the individual endpoints.
157 { -- | Holds the relative paths to the individual endpoints.
158 -- The path is appended to the @'swaggerBasePath'@ in order to construct the full URL.
158 -- The path is appended to the @'swaggerBasePath'@ in order to construct the full URL.
159− swaggerPathsMap :: HashMap FilePath SwaggerPathItem
159+ _swaggerPathsMap :: HashMap FilePath SwaggerPathItem
160 } deriving (Eq, Show, Generic)
160 } deriving (Eq, Show, Generic)
162-- | Describes the operations available on a single path.
162-- | Describes the operations available on a single path.
@@ -165,91 +165,91 @@ data SwaggerPaths = SwaggerPaths
165-- but they will not know which operations and parameters are available.
165-- but they will not know which operations and parameters are available.
166data SwaggerPathItem = SwaggerPathItem
166data SwaggerPathItem = SwaggerPathItem
167 { -- | A definition of a GET operation on this path.
167 { -- | A definition of a GET operation on this path.
168− swaggerPathItemGet :: Maybe SwaggerOperation
168+ _swaggerPathItemGet :: Maybe SwaggerOperation
170 -- | A definition of a PUT operation on this path.
170 -- | A definition of a PUT operation on this path.
171− , swaggerPathItemPut :: Maybe SwaggerOperation
171+ , _swaggerPathItemPut :: Maybe SwaggerOperation
173 -- | A definition of a POST operation on this path.
173 -- | A definition of a POST operation on this path.
174− , swaggerPathItemPost :: Maybe SwaggerOperation
174+ , _swaggerPathItemPost :: Maybe SwaggerOperation
176 -- | A definition of a DELETE operation on this path.
176 -- | A definition of a DELETE operation on this path.
177− , swaggerPathItemDelete :: Maybe SwaggerOperation
177+ , _swaggerPathItemDelete :: Maybe SwaggerOperation
179 -- | A definition of a OPTIONS operation on this path.
179 -- | A definition of a OPTIONS operation on this path.
180− , swaggerPathItemOptions :: Maybe SwaggerOperation
180+ , _swaggerPathItemOptions :: Maybe SwaggerOperation
182 -- | A definition of a HEAD operation on this path.
182 -- | A definition of a HEAD operation on this path.
183− , swaggerPathItemHead :: Maybe SwaggerOperation
183+ , _swaggerPathItemHead :: Maybe SwaggerOperation
185 -- | A definition of a PATCH operation on this path.
185 -- | A definition of a PATCH operation on this path.
186− , swaggerPathItemPatch :: Maybe SwaggerOperation
186+ , _swaggerPathItemPatch :: Maybe SwaggerOperation
188 -- | A list of parameters that are applicable for all the operations described under this path.
188 -- | A list of parameters that are applicable for all the operations described under this path.
189 -- These parameters can be overridden at the operation level, but cannot be removed there.
189 -- These parameters can be overridden at the operation level, but cannot be removed there.
190 -- The list MUST NOT include duplicated parameters.
190 -- The list MUST NOT include duplicated parameters.
191 -- A unique parameter is defined by a combination of a name and location.
191 -- A unique parameter is defined by a combination of a name and location.
192− , swaggerPathItemParameters :: [SwaggerReferenced SwaggerParameter]
192+ , _swaggerPathItemParameters :: [SwaggerReferenced SwaggerParameter]
193 } deriving (Eq, Show, Generic)
193 } deriving (Eq, Show, Generic)
195-- | Describes a single API operation on a path.
195-- | Describes a single API operation on a path.
196data SwaggerOperation = SwaggerOperation
196data SwaggerOperation = SwaggerOperation
197 { -- | A list of tags for API documentation control.
197 { -- | A list of tags for API documentation control.
198 -- Tags can be used for logical grouping of operations by resources or any other qualifier.
198 -- Tags can be used for logical grouping of operations by resources or any other qualifier.
199− swaggerOperationTags :: [Text]
199+ _swaggerOperationTags :: [Text]
201 -- | A short summary of what the operation does.
201 -- | A short summary of what the operation does.
202 -- For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters.
202 -- For maximum readability in the swagger-ui, this field SHOULD be less than 120 characters.
203− , swaggerOperationSummary :: Maybe Text
203+ , _swaggerOperationSummary :: Maybe Text
205 -- | A verbose explanation of the operation behavior.
205 -- | A verbose explanation of the operation behavior.
206 -- GFM syntax can be used for rich text representation.
206 -- GFM syntax can be used for rich text representation.
207− , swaggerOperationDescription :: Maybe Text
207+ , _swaggerOperationDescription :: Maybe Text
209 -- | Additional external documentation for this operation.
209 -- | Additional external documentation for this operation.
210− , swaggerOperationExternalDocs :: Maybe SwaggerExternalDocs
210+ , _swaggerOperationExternalDocs :: Maybe SwaggerExternalDocs
212 -- | Unique string used to identify the operation.
212 -- | Unique string used to identify the operation.
213 -- The id MUST be unique among all operations described in the API.
213 -- The id MUST be unique among all operations described in the API.
214 -- Tools and libraries MAY use the it to uniquely identify an operation,
214 -- Tools and libraries MAY use the it to uniquely identify an operation,
215 -- therefore, it is recommended to follow common programming naming conventions.
215 -- therefore, it is recommended to follow common programming naming conventions.
216− , swaggerOperationOperationId :: Maybe Text
216+ , _swaggerOperationOperationId :: Maybe Text
218 -- | A list of MIME types the operation can consume.
218 -- | A list of MIME types the operation can consume.
219 -- This overrides the @'swaggerConsumes'@.
219 -- This overrides the @'swaggerConsumes'@.
220 -- @Just []@ MAY be used to clear the global definition.
220 -- @Just []@ MAY be used to clear the global definition.
221− , swaggerOperationConsumes :: Maybe SwaggerMimeList
221+ , _swaggerOperationConsumes :: Maybe SwaggerMimeList
223 -- | A list of MIME types the operation can produce.
223 -- | A list of MIME types the operation can produce.
224 -- This overrides the @'swaggerProduces'@.
224 -- This overrides the @'swaggerProduces'@.
225 -- @Just []@ MAY be used to clear the global definition.
225 -- @Just []@ MAY be used to clear the global definition.
226− , swaggerOperationProduces :: Maybe SwaggerMimeList
226+ , _swaggerOperationProduces :: Maybe SwaggerMimeList
228 -- | A list of parameters that are applicable for this operation.
228 -- | A list of parameters that are applicable for this operation.
229 -- If a parameter is already defined at the @'SwaggerPathItem'@,
229 -- If a parameter is already defined at the @'SwaggerPathItem'@,
230 -- the new definition will override it, but can never remove it.
230 -- the new definition will override it, but can never remove it.
231 -- The list MUST NOT include duplicated parameters.
231 -- The list MUST NOT include duplicated parameters.
232 -- A unique parameter is defined by a combination of a name and location.
232 -- A unique parameter is defined by a combination of a name and location.
233− , swaggerOperationParameters :: [SwaggerReferenced SwaggerParameter]
233+ , _swaggerOperationParameters :: [SwaggerReferenced SwaggerParameter]
235 -- | The list of possible responses as they are returned from executing this operation.
235 -- | The list of possible responses as they are returned from executing this operation.
236− , swaggerOperationResponses :: SwaggerResponses
236+ , _swaggerOperationResponses :: SwaggerResponses
238 -- | The transfer protocol for the operation.
238 -- | The transfer protocol for the operation.
239 -- The value overrides @'swaggerSchemes'@.
239 -- The value overrides @'swaggerSchemes'@.
240− , swaggerOperationSchemes :: Maybe [SwaggerScheme]
240+ , _swaggerOperationSchemes :: Maybe [SwaggerScheme]
242 -- | Declares this operation to be deprecated.
242 -- | Declares this operation to be deprecated.
243 -- Usage of the declared operation should be refrained.
243 -- Usage of the declared operation should be refrained.
244 -- Default value is @False@.
244 -- Default value is @False@.
245− , swaggerOperationDeprecated :: Bool
245+ , _swaggerOperationDeprecated :: Bool
247 -- | A declaration of which security schemes are applied for this operation.
247 -- | A declaration of which security schemes are applied for this operation.
248 -- The list of values describes alternative security schemes that can be used
248 -- The list of values describes alternative security schemes that can be used
249 -- (that is, there is a logical OR between the security requirements).
249 -- (that is, there is a logical OR between the security requirements).
250 -- This definition overrides any declared top-level security.
250 -- This definition overrides any declared top-level security.
251 -- To remove a top-level security declaration, @Just []@ can be used.
251 -- To remove a top-level security declaration, @Just []@ can be used.
252− , swaggerOperationSecurity :: [SwaggerSecurityRequirement]
252+ , _swaggerOperationSecurity :: [SwaggerSecurityRequirement]
253 } deriving (Eq, Show, Generic)
253 } deriving (Eq, Show, Generic)
255newtype SwaggerMimeList = SwaggerMimeList { getSwaggerMimeList :: [MediaType] }
255newtype SwaggerMimeList = SwaggerMimeList { getSwaggerMimeList :: [MediaType] }
@@ -260,20 +260,20 @@ newtype SwaggerMimeList = SwaggerMimeList { getSwaggerMimeList :: [MediaType] }
260data SwaggerParameter = SwaggerParameter
260data SwaggerParameter = SwaggerParameter
261 { -- | The name of the parameter.
261 { -- | The name of the parameter.
262 -- Parameter names are case sensitive.
262 -- Parameter names are case sensitive.
263− swaggerParameterName :: Text
263+ _swaggerParameterName :: Text
265 -- | A brief description of the parameter.
265 -- | A brief description of the parameter.
266 -- This could contain examples of use.
266 -- This could contain examples of use.
267 -- GFM syntax can be used for rich text representation.
267 -- GFM syntax can be used for rich text representation.
268− , swaggerParameterDescription :: Maybe Text
268+ , _swaggerParameterDescription :: Maybe Text
270 -- | Determines whether this parameter is mandatory.
270 -- | Determines whether this parameter is mandatory.
271 -- If the parameter is in "path", this property is required and its value MUST be true.
271 -- If the parameter is in "path", this property is required and its value MUST be true.
272 -- Otherwise, the property MAY be included and its default value is @False@.
272 -- Otherwise, the property MAY be included and its default value is @False@.
273− , swaggerParameterRequired :: Bool
273+ , _swaggerParameterRequired :: Bool
275 -- | Parameter schema.
275 -- | Parameter schema.
276− , swaggerParameterSchema :: SwaggerParameterSchema
276+ , _swaggerParameterSchema :: SwaggerParameterSchema
277 } deriving (Eq, Show, Generic)
277 } deriving (Eq, Show, Generic)
279data SwaggerParameterSchema
279data SwaggerParameterSchema
@@ -283,7 +283,7 @@ data SwaggerParameterSchema
284data SwaggerParameterOtherSchema = SwaggerParameterOtherSchema
284data SwaggerParameterOtherSchema = SwaggerParameterOtherSchema
285 { -- | The location of the parameter.
285 { -- | The location of the parameter.
286− swaggerParameterOtherSchemaIn :: SwaggerParameterLocation
286+ _swaggerParameterOtherSchemaIn :: SwaggerParameterLocation
288 -- | The type of the parameter.
288 -- | The type of the parameter.
289 -- Since the parameter is not located at the request body,
289 -- Since the parameter is not located at the request body,
@@ -291,26 +291,26 @@ data SwaggerParameterOtherSchema = SwaggerParameterOtherSchema
291 -- If type is @'SwaggerParamFile'@, the @consumes@ MUST be either
291 -- If type is @'SwaggerParamFile'@, the @consumes@ MUST be either
292 -- "multipart/form-data" or " application/x-www-form-urlencoded"
292 -- "multipart/form-data" or " application/x-www-form-urlencoded"
293 -- and the parameter MUST be in @'SwaggerParameterFormData'@.
293 -- and the parameter MUST be in @'SwaggerParameterFormData'@.
294− , swaggerParameterOtherSchemaType :: SwaggerParameterType
294+ , _swaggerParameterOtherSchemaType :: SwaggerParameterType
296 -- | The extending format for the previously mentioned type.
296 -- | The extending format for the previously mentioned type.
297− , swaggerParameterOtherSchemaFormat :: Maybe SwaggerFormat
297+ , _swaggerParameterOtherSchemaFormat :: Maybe SwaggerFormat
299 -- | Sets the ability to pass empty-valued parameters.
299 -- | Sets the ability to pass empty-valued parameters.
300 -- This is valid only for either @'SwaggerParameterQuery'@ or @'SwaggerParameterFormData'@
300 -- This is valid only for either @'SwaggerParameterQuery'@ or @'SwaggerParameterFormData'@
301 -- and allows you to send a parameter with a name only or an empty value.
301 -- and allows you to send a parameter with a name only or an empty value.
302 -- Default value is @False@.
302 -- Default value is @False@.
303− , swaggerParameterOtherSchemaAllowEmptyValue :: Bool
303+ , _swaggerParameterOtherSchemaAllowEmptyValue :: Bool
305 -- | __Required if type is @'SwaggerParamArray'@__.
305 -- | __Required if type is @'SwaggerParamArray'@__.
306 -- Describes the type of items in the array.
306 -- Describes the type of items in the array.
307− , swaggerParameterOtherSchemaItems :: Maybe SwaggerItems
307+ , _swaggerParameterOtherSchemaItems :: Maybe SwaggerItems
309 -- | Determines the format of the array if @'SwaggerParamArray'@ is used.
309 -- | Determines the format of the array if @'SwaggerParamArray'@ is used.
310 -- Default value is csv.
310 -- Default value is csv.
311− , swaggerParameterOtherSchemaCollectionFormat :: Maybe SwaggerCollectionFormat
311+ , _swaggerParameterOtherSchemaCollectionFormat :: Maybe SwaggerCollectionFormat
313− , swaggerParameterOtherSchemaCommon :: SwaggerSchemaCommon
313+ , _swaggerParameterOtherSchemaCommon :: SwaggerSchemaCommon
314 } deriving (Eq, Show, Generic)
314 } deriving (Eq, Show, Generic)
316data SwaggerParameterType
316data SwaggerParameterType
@@ -384,27 +384,27 @@ data SwaggerItemsCollectionFormat
384type SwaggerParamName = Text
384type SwaggerParamName = Text
386data SwaggerSchema = SwaggerSchema
386data SwaggerSchema = SwaggerSchema
387− { swaggerSchemaType :: SwaggerSchemaType
387+ { _swaggerSchemaType :: SwaggerSchemaType
388− , swaggerSchemaFormat :: Maybe SwaggerFormat
388+ , _swaggerSchemaFormat :: Maybe SwaggerFormat
389− , swaggerSchemaTitle :: Maybe Text
389+ , _swaggerSchemaTitle :: Maybe Text
390− , swaggerSchemaDescription :: Maybe Text
390+ , _swaggerSchemaDescription :: Maybe Text
391− , swaggerSchemaRequired :: [SwaggerParamName]
391+ , _swaggerSchemaRequired :: [SwaggerParamName]
393− , swaggerSchemaItems :: Maybe SwaggerSchemaItems
393+ , _swaggerSchemaItems :: Maybe SwaggerSchemaItems
394− , swaggerSchemaAllOf :: Maybe [SwaggerSchema]
394+ , _swaggerSchemaAllOf :: Maybe [SwaggerSchema]
395− , swaggerSchemaProperties :: HashMap Text (SwaggerReferenced SwaggerSchema)
395+ , _swaggerSchemaProperties :: HashMap Text (SwaggerReferenced SwaggerSchema)
396− , swaggerSchemaAdditionalProperties :: Maybe SwaggerSchema
396+ , _swaggerSchemaAdditionalProperties :: Maybe SwaggerSchema
398− , swaggerSchemaDiscriminator :: Maybe Text
398+ , _swaggerSchemaDiscriminator :: Maybe Text
399− , swaggerSchemaReadOnly :: Maybe Bool
399+ , _swaggerSchemaReadOnly :: Maybe Bool
400− , swaggerSchemaXml :: Maybe SwaggerXml
400+ , _swaggerSchemaXml :: Maybe SwaggerXml
401− , swaggerSchemaExternalDocs :: Maybe SwaggerExternalDocs
401+ , _swaggerSchemaExternalDocs :: Maybe SwaggerExternalDocs
402− , swaggerSchemaExample :: Maybe Value
402+ , _swaggerSchemaExample :: Maybe Value
404− , swaggerSchemaMaxProperties :: Maybe Integer
404+ , _swaggerSchemaMaxProperties :: Maybe Integer
405− , swaggerSchemaMinProperties :: Maybe Integer
405+ , _swaggerSchemaMinProperties :: Maybe Integer
407− , swaggerSchemaCommon :: SwaggerSchemaCommon
407+ , _swaggerSchemaCommon :: SwaggerSchemaCommon
408 } deriving (Eq, Show, Generic)
408 } deriving (Eq, Show, Generic)
410data SwaggerSchemaItems
410data SwaggerSchemaItems
@@ -418,20 +418,20 @@ data SwaggerSchemaCommon = SwaggerSchemaCommon
418 -- if not supplied by the client in the request.
418 -- if not supplied by the client in the request.
419 -- (Note: "default" has no meaning for required parameters.)
419 -- (Note: "default" has no meaning for required parameters.)
420 -- Unlike JSON Schema this value MUST conform to the defined type for this parameter.
420 -- Unlike JSON Schema this value MUST conform to the defined type for this parameter.
421− swaggerSchemaDefault :: Maybe Value
421+ _swaggerSchemaDefault :: Maybe Value
423− , swaggerSchemaMaximum :: Maybe Integer
423+ , _swaggerSchemaMaximum :: Maybe Integer
424− , swaggerSchemaExclusiveMaximum :: Maybe Bool
424+ , _swaggerSchemaExclusiveMaximum :: Maybe Bool
425− , swaggerSchemaMinimum :: Maybe Integer
425+ , _swaggerSchemaMinimum :: Maybe Integer
426− , swaggerSchemaExclusiveMinimum :: Maybe Bool
426+ , _swaggerSchemaExclusiveMinimum :: Maybe Bool
427− , swaggerSchemaMaxLength :: Maybe Integer
427+ , _swaggerSchemaMaxLength :: Maybe Integer
428− , swaggerSchemaMinLength :: Maybe Integer
428+ , _swaggerSchemaMinLength :: Maybe Integer
429− , swaggerSchemaPattern :: Maybe Text
429+ , _swaggerSchemaPattern :: Maybe Text
430− , swaggerSchemaMaxItems :: Maybe Integer
430+ , _swaggerSchemaMaxItems :: Maybe Integer
431− , swaggerSchemaMinItems :: Maybe Integer
431+ , _swaggerSchemaMinItems :: Maybe Integer
432− , swaggerSchemaUniqueItems :: Maybe Bool
432+ , _swaggerSchemaUniqueItems :: Maybe Bool
433− , swaggerSchemaEnum :: Maybe [Value]
433+ , _swaggerSchemaEnum :: Maybe [Value]
434− , swaggerSchemaMultipleOf :: Maybe Integer
434+ , _swaggerSchemaMultipleOf :: Maybe Integer
435 } deriving (Eq, Show, Generic)
435 } deriving (Eq, Show, Generic)
437data SwaggerXml = SwaggerXml
437data SwaggerXml = SwaggerXml
@@ -440,18 +440,18 @@ data SwaggerXml = SwaggerXml
440 -- When defined alongside type being array (outside the items),
440 -- When defined alongside type being array (outside the items),
441 -- it will affect the wrapping element and only if wrapped is true.
441 -- it will affect the wrapping element and only if wrapped is true.
442 -- If wrapped is false, it will be ignored.
442 -- If wrapped is false, it will be ignored.
443− swaggerXmlName :: Maybe Text
443+ _swaggerXmlName :: Maybe Text
445 -- | The URL of the namespace definition.
445 -- | The URL of the namespace definition.
446 -- Value SHOULD be in the form of a URL.
446 -- Value SHOULD be in the form of a URL.
447− , swaggerXmlNamespace :: Maybe Text
447+ , _swaggerXmlNamespace :: Maybe Text
449 -- | The prefix to be used for the name.
449 -- | The prefix to be used for the name.
450− , swaggerXmlPrefix :: Maybe Text
450+ , _swaggerXmlPrefix :: Maybe Text
452 -- | Declares whether the property definition translates to an attribute instead of an element.
452 -- | Declares whether the property definition translates to an attribute instead of an element.
453 -- Default value is @False@.
453 -- Default value is @False@.
454− , swaggerXmlAttribute :: Bool
454+ , _swaggerXmlAttribute :: Bool
456 -- | MAY be used only for an array definition.
456 -- | MAY be used only for an array definition.
457 -- Signifies whether the array is wrapped
457 -- Signifies whether the array is wrapped
@@ -459,25 +459,25 @@ data SwaggerXml = SwaggerXml
459 -- or unwrapped (@\<book/\>\<book/\>@).
459 -- or unwrapped (@\<book/\>\<book/\>@).
460 -- Default value is @False@.
460 -- Default value is @False@.
461 -- The definition takes effect only when defined alongside type being array (outside the items).
461 -- The definition takes effect only when defined alongside type being array (outside the items).
462− , swaggerXmlWrapped :: Bool
462+ , _swaggerXmlWrapped :: Bool
463 } deriving (Eq, Show, Generic)
463 } deriving (Eq, Show, Generic)
465data SwaggerItems = SwaggerItems
465data SwaggerItems = SwaggerItems
466 { -- | The internal type of the array.
466 { -- | The internal type of the array.
467− swaggerItemsType :: SwaggerItemsType
467+ _swaggerItemsType :: SwaggerItemsType
469 -- | The extending format for the previously mentioned type.
469 -- | The extending format for the previously mentioned type.
470− , swaggerItemsFormat :: Maybe SwaggerFormat
470+ , _swaggerItemsFormat :: Maybe SwaggerFormat
472 -- | __Required if type is @'SwaggerItemsArray'@.__
472 -- | __Required if type is @'SwaggerItemsArray'@.__
473 -- Describes the type of items in the array.
473 -- Describes the type of items in the array.
474− , swaggerItemsItems :: Maybe SwaggerItems
474+ , _swaggerItemsItems :: Maybe SwaggerItems
476 -- | Determines the format of the array if type array is used.
476 -- | Determines the format of the array if type array is used.
477 -- Default value is @'SwaggerItemsCollectionCSV'@.
477 -- Default value is @'SwaggerItemsCollectionCSV'@.
478− , swaggerItemsCollectionFormat :: Maybe SwaggerItemsCollectionFormat
478+ , _swaggerItemsCollectionFormat :: Maybe SwaggerItemsCollectionFormat
480− , swaggerItemsCommon :: SwaggerSchemaCommon
480+ , _swaggerItemsCommon :: SwaggerSchemaCommon
481 } deriving (Eq, Show, Generic)
481 } deriving (Eq, Show, Generic)
483-- | A container for the expected responses of an operation.
483-- | A container for the expected responses of an operation.
@@ -488,11 +488,11 @@ data SwaggerItems = SwaggerItems
488data SwaggerResponses = SwaggerResponses
488data SwaggerResponses = SwaggerResponses
489 { -- | The documentation of responses other than the ones declared for specific HTTP response codes.
489 { -- | The documentation of responses other than the ones declared for specific HTTP response codes.
490 -- It can be used to cover undeclared responses.
490 -- It can be used to cover undeclared responses.
491− swaggerResponsesDefault :: Maybe (SwaggerReferenced SwaggerResponse)
491+ _swaggerResponsesDefault :: Maybe (SwaggerReferenced SwaggerResponse)
493 -- | Any HTTP status code can be used as the property name (one property per HTTP status code).
493 -- | Any HTTP status code can be used as the property name (one property per HTTP status code).
494 -- Describes the expected response for those HTTP status codes.
494 -- Describes the expected response for those HTTP status codes.
495− , swaggerResponsesResponses :: HashMap HttpStatusCode (SwaggerReferenced SwaggerResponse)
495+ , _swaggerResponsesResponses :: HashMap HttpStatusCode (SwaggerReferenced SwaggerResponse)
496 } deriving (Eq, Show, Generic)
496 } deriving (Eq, Show, Generic)
498type HttpStatusCode = Int
498type HttpStatusCode = Int
@@ -501,43 +501,43 @@ type HttpStatusCode = Int
501data SwaggerResponse = SwaggerResponse
501data SwaggerResponse = SwaggerResponse
502 { -- | A short description of the response.
502 { -- | A short description of the response.
503 -- GFM syntax can be used for rich text representation.
503 -- GFM syntax can be used for rich text representation.
504− swaggerResponseDescription :: Text
504+ _swaggerResponseDescription :: Text
506 -- | A definition of the response structure.
506 -- | A definition of the response structure.
507 -- It can be a primitive, an array or an object.
507 -- It can be a primitive, an array or an object.
508 -- If this field does not exist, it means no content is returned as part of the response.
508 -- If this field does not exist, it means no content is returned as part of the response.
509 -- As an extension to the Schema Object, its root type value may also be "file".
509 -- As an extension to the Schema Object, its root type value may also be "file".
510 -- This SHOULD be accompanied by a relevant produces mime-type.
510 -- This SHOULD be accompanied by a relevant produces mime-type.
511− , swaggerResponseSchema :: Maybe (SwaggerReferenced SwaggerSchema)
511+ , _swaggerResponseSchema :: Maybe (SwaggerReferenced SwaggerSchema)
513 -- | A list of headers that are sent with the response.
513 -- | A list of headers that are sent with the response.
514− , swaggerResponseHeaders :: HashMap HeaderName SwaggerHeader
514+ , _swaggerResponseHeaders :: HashMap HeaderName SwaggerHeader
516 -- | An example of the response message.
516 -- | An example of the response message.
517− , swaggerResponseExamples :: Maybe SwaggerExample
517+ , _swaggerResponseExamples :: Maybe SwaggerExample
518 } deriving (Eq, Show, Generic)
518 } deriving (Eq, Show, Generic)
520type HeaderName = Text
520type HeaderName = Text
522data SwaggerHeader = SwaggerHeader
522data SwaggerHeader = SwaggerHeader
523 { -- | A short description of the header.
523 { -- | A short description of the header.
524− swaggerHeaderDescription :: Maybe String
524+ _swaggerHeaderDescription :: Maybe Text
526 -- | The type of the object.
526 -- | The type of the object.
527− , swaggerHeaderType :: SwaggerItemsType
527+ , _swaggerHeaderType :: SwaggerItemsType
529 -- | The extending format for the previously mentioned type. See Data Type Formats for further details.
529 -- | The extending format for the previously mentioned type. See Data Type Formats for further details.
530− , swaggerHeaderFormat :: Maybe SwaggerFormat
530+ , _swaggerHeaderFormat :: Maybe SwaggerFormat
532 -- | __Required if type is @'SwaggerItemsArray'@__.
532 -- | __Required if type is @'SwaggerItemsArray'@__.
533 -- Describes the type of items in the array.
533 -- Describes the type of items in the array.
534− , swaggerHeaderItems :: Maybe SwaggerItems
534+ , _swaggerHeaderItems :: Maybe SwaggerItems
536 -- | Determines the format of the array if type array is used.
536 -- | Determines the format of the array if type array is used.
537 -- Default value is @'SwaggerItemsCollectionCSV'@.
537 -- Default value is @'SwaggerItemsCollectionCSV'@.
538− , swaggerHeaderCollectionFormat :: Maybe SwaggerItemsCollectionFormat
538+ , _swaggerHeaderCollectionFormat :: Maybe SwaggerItemsCollectionFormat
540− , swaggerHeaderCommon :: SwaggerSchemaCommon
540+ , _swaggerHeaderCommon :: SwaggerSchemaCommon
541 } deriving (Eq, Show, Generic)
541 } deriving (Eq, Show, Generic)
543data SwaggerExample = SwaggerExample { getSwaggerExample :: Map MediaType Value }
543data SwaggerExample = SwaggerExample { getSwaggerExample :: Map MediaType Value }
@@ -551,10 +551,10 @@ data SwaggerApiKeyLocation
552data SwaggerApiKeyParams = SwaggerApiKeyParams
552data SwaggerApiKeyParams = SwaggerApiKeyParams
553 { -- | The name of the header or query parameter to be used.
553 { -- | The name of the header or query parameter to be used.
554− swaggerApiKeyName :: Text
554+ _swaggerApiKeyName :: Text
556 -- | The location of the API key.
556 -- | The location of the API key.
557− , swaggerApiKeyIn :: SwaggerApiKeyLocation
557+ , _swaggerApiKeyIn :: SwaggerApiKeyLocation
558 } deriving (Eq, Show)
558 } deriving (Eq, Show)
560-- | The authorization URL to be used for OAuth2 flow. This SHOULD be in the form of a URL.
560-- | The authorization URL to be used for OAuth2 flow. This SHOULD be in the form of a URL.
@@ -572,10 +572,10 @@ data SwaggerOAuth2Flow
573data SwaggerOAuth2Params = SwaggerOAuth2Params
573data SwaggerOAuth2Params = SwaggerOAuth2Params
574 { -- | The flow used by the OAuth2 security scheme.
574 { -- | The flow used by the OAuth2 security scheme.
575− swaggerOAuth2Flow :: SwaggerOAuth2Flow
575+ _swaggerOAuth2Flow :: SwaggerOAuth2Flow
577 -- | The available scopes for the OAuth2 security scheme.
577 -- | The available scopes for the OAuth2 security scheme.
578− , swaggerOAuth2Scopes :: HashMap Text Text
578+ , _swaggerOAuth2Scopes :: HashMap Text Text
579 } deriving (Eq, Show, Generic)
579 } deriving (Eq, Show, Generic)
581data SwaggerSecuritySchemeType
581data SwaggerSecuritySchemeType
@@ -586,10 +586,10 @@ data SwaggerSecuritySchemeType
587data SwaggerSecurityScheme = SwaggerSecurityScheme
587data SwaggerSecurityScheme = SwaggerSecurityScheme
588 { -- | The type of the security scheme.
588 { -- | The type of the security scheme.
589− swaggerSecuritySchemeType :: SwaggerSecuritySchemeType
589+ _swaggerSecuritySchemeType :: SwaggerSecuritySchemeType
591 -- | A short description for security scheme.
591 -- | A short description for security scheme.
592− , swaggerSecuritySchemeDescription :: Maybe Text
592+ , _swaggerSecuritySchemeDescription :: Maybe Text
593 } deriving (Eq, Show, Generic)
593 } deriving (Eq, Show, Generic)
595-- | Lists the required security schemes to execute this operation.
595-- | Lists the required security schemes to execute this operation.
@@ -603,24 +603,24 @@ newtype SwaggerSecurityRequirement = SwaggerSecurityRequirement
603-- It is not mandatory to have a @SwaggerTag@ per tag used there.
603-- It is not mandatory to have a @SwaggerTag@ per tag used there.
604data SwaggerTag = SwaggerTag
604data SwaggerTag = SwaggerTag
605 { -- | The name of the tag.
605 { -- | The name of the tag.
606− swaggerTagName :: Text
606+ _swaggerTagName :: Text
608 -- | A short description for the tag.
608 -- | A short description for the tag.
609 -- GFM syntax can be used for rich text representation.
609 -- GFM syntax can be used for rich text representation.
610− , swaggerTagDescription :: Maybe Text
610+ , _swaggerTagDescription :: Maybe Text
612 -- | Additional external documentation for this tag.
612 -- | Additional external documentation for this tag.
613− , swaggerTagExternalDocs :: Maybe SwaggerExternalDocs
613+ , _swaggerTagExternalDocs :: Maybe SwaggerExternalDocs
614 } deriving (Eq, Show)
614 } deriving (Eq, Show)
616-- | Allows referencing an external resource for extended documentation.
616-- | Allows referencing an external resource for extended documentation.
617data SwaggerExternalDocs = SwaggerExternalDocs
617data SwaggerExternalDocs = SwaggerExternalDocs
618 { -- | A short description of the target documentation.
618 { -- | A short description of the target documentation.
619 -- GFM syntax can be used for rich text representation.
619 -- GFM syntax can be used for rich text representation.
620− swaggerExternalDocsDescription :: Maybe Text
620+ _swaggerExternalDocsDescription :: Maybe Text
622 -- | The URL for the target documentation.
622 -- | The URL for the target documentation.
623− , swaggerExternalDocsUrl :: URL
623+ , _swaggerExternalDocsUrl :: URL
624 } deriving (Eq, Show, Generic)
624 } deriving (Eq, Show, Generic)
626-- | A simple object to allow referencing other definitions in the specification.
626-- | A simple object to allow referencing other definitions in the specification.