Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Specification Extensions #11 (rebase of #21) #28

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
189 changes: 95 additions & 94 deletions src/Data/OpenApi.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,127 +9,128 @@
-- These files can then be used by the Swagger-UI project to display the API
-- and Swagger-Codegen to generate clients in various languages.
-- Additional utilities can also take advantage of the resulting files, such as testing tools.
module Data.OpenApi (
-- * How to use this library
-- $howto
module Data.OpenApi
( -- * How to use this library
-- $howto

-- ** @'Monoid'@ instances
-- $monoids
-- ** @'Monoid'@ instances
-- $monoids

-- ** Lenses and prisms
-- $lens
-- ** Lenses and prisms
-- $lens

-- ** Schema specification
-- $schema
-- ** Schema specification
-- $schema

-- ** Manipulation
-- $manipulation
-- ** Manipulation
-- $manipulation

-- ** Validation
-- $validation
-- ** Validation
-- $validation

-- * Re-exports
module Data.OpenApi.Lens,
module Data.OpenApi.Optics,
module Data.OpenApi.Operation,
module Data.OpenApi.ParamSchema,
module Data.OpenApi.Schema,
module Data.OpenApi.Schema.Validation,
-- * Re-exports
module Data.OpenApi.Lens,
module Data.OpenApi.Optics,
module Data.OpenApi.Operation,
module Data.OpenApi.ParamSchema,
module Data.OpenApi.Schema,
module Data.OpenApi.Schema.Validation,

-- * Swagger specification
OpenApi(..),
Server(..),
ServerVariable(..),
Components(..),
-- * Swagger specification
OpenApi (..),
Server (..),
ServerVariable (..),
Components (..),

-- ** Info types
Info(..),
Contact(..),
License(..),
-- ** Info types
Info (..),
Contact (..),
License (..),

-- ** PathItem
PathItem(..),
-- ** PathItem
PathItem (..),

-- ** Operations
Operation(..),
Tag(..),
TagName,
-- ** Operations
Operation (..),
Tag (..),
TagName,

-- ** Types and formats
OpenApiType(..),
Format,
Definitions,
Style(..),
-- ** Types and formats
OpenApiType (..),
Format,
Definitions,
Style (..),

-- ** Parameters
Param(..),
ParamLocation(..),
ParamName,
Header(..),
HeaderName,
Example(..),
RequestBody(..),
MediaTypeObject(..),
Encoding(..),
-- ** Parameters
Param (..),
ParamLocation (..),
ParamName,
Header (..),
HeaderName,
Example (..),
RequestBody (..),
MediaTypeObject (..),
Encoding (..),

-- ** Schemas
Schema(..),
NamedSchema(..),
OpenApiItems(..),
Xml(..),
Pattern,
AdditionalProperties(..),
Discriminator(..),
-- ** Schemas
Schema (..),
NamedSchema (..),
OpenApiItems (..),
Xml (..),
Pattern,
AdditionalProperties (..),
Discriminator (..),

-- ** Responses
Responses(..),
Response(..),
HttpStatusCode,
Link(..),
Callback(..),
-- ** Responses
Responses (..),
Response (..),
HttpStatusCode,
Link (..),
Callback (..),

-- ** Security
SecurityScheme(..),
SecuritySchemeType(..),
HttpSchemeType(..),
SecurityDefinitions(..),
SecurityRequirement(..),
-- ** Security
SecurityScheme (..),
SecuritySchemeType (..),
HttpSchemeType (..),
SecurityDefinitions (..),
SecurityRequirement (..),

-- *** API key
ApiKeyParams(..),
ApiKeyLocation(..),
-- *** API key
ApiKeyParams (..),
ApiKeyLocation (..),

-- *** OAuth2
OAuth2Flows(..),
OAuth2Flow(..),
OAuth2ImplicitFlow(..),
OAuth2PasswordFlow(..),
OAuth2ClientCredentialsFlow(..),
OAuth2AuthorizationCodeFlow(..),
AuthorizationURL,
TokenURL,
-- *** OAuth2
OAuth2Flows (..),
OAuth2Flow (..),
OAuth2ImplicitFlow (..),
OAuth2PasswordFlow (..),
OAuth2ClientCredentialsFlow (..),
OAuth2AuthorizationCodeFlow (..),
AuthorizationURL,
TokenURL,

-- ** External documentation
ExternalDocs(..),
-- ** External documentation
ExternalDocs (..),

-- ** References
Reference(..),
Referenced(..),
-- ** References
Reference (..),
Referenced (..),

-- ** Miscellaneous
MimeList(..),
URL(..),
) where
-- ** Miscellaneous
MimeList (..),
URL (..),
SpecificationExtensions (..),
)
where

import Data.OpenApi.Internal
import Data.OpenApi.Lens
import Data.OpenApi.Optics ()
import Data.OpenApi.Operation
import Data.OpenApi.Optics ()
import Data.OpenApi.ParamSchema
import Data.OpenApi.Schema
import Data.OpenApi.Schema.Validation

import Data.OpenApi.Internal

-- $setup
-- >>> import Control.Lens
-- >>> import Data.Aeson
Expand Down
Loading