Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ jobs:
echo .qlot/bin >> $GITHUB_PATH
if: steps.cache.outputs.cache-hit == 'true'

- uses: 40ants/setup-lisp@v2
- uses: 40ants/setup-lisp@v4
if: steps.cache.outputs.cache-hit != 'true'

- name: run
run: |
ros use sbcl
qlot install
LISP="ros run --" make tests 2> /dev/null
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.qlot/
6 changes: 4 additions & 2 deletions cl-openapi.asd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
:description "Open API Specification for Common Lisp."
:license "Unlicense"
:version "0.0.1"
:depends-on ()
:depends-on (#:cl-json)
:serial t
:components ((:file "package")))
:components ((:file "package")
(:file "types")
(:file "decode")))
577 changes: 577 additions & 0 deletions decode.lisp

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
description = "cl-openapi";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.11";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };

quicklisp = pkgs.fetchurl {
url = "https://beta.quicklisp.org/quicklisp.lisp";
sha256 = "4a7a5c2aebe0716417047854267397e24a44d0cce096127411e9ce9ccfeb2c17";
};
in
{
devShells.default = pkgs.mkShell {
packages = [
pkgs.sbcl
pkgs.roswell
pkgs.sbclPackages.qlot
pkgs.sbclPackages.qlot-cli
pkgs.git
];

shellHook = ''
export QUICKLISP_HOME=$PWD/.quicklisp

if [ ! -d "$QUICKLISP_HOME" ]; then
echo "Installing Quicklisp locally..."
sbcl --non-interactive \
--load ${quicklisp} \
--eval "(quicklisp-quickstart:install :path \"$QUICKLISP_HOME\")" \
--eval "(ql:add-to-init-file)" \
--quit
fi

echo "SBCL + Quicklisp ready"
echo "Run: sbcl"
'';
};
});
}
256 changes: 255 additions & 1 deletion package.lisp
Original file line number Diff line number Diff line change
@@ -1,5 +1,259 @@
(defpackage #:cl-openapi
(:use #:cl)
(:export))
(:export
;; Top-level entry point
#:parse

;; Document
#:openapi-document
#:openapi-version
#:openapi-info
#:openapi-servers
#:openapi-paths
#:openapi-components
#:openapi-security
#:openapi-tags
#:openapi-external-docs

;; Info
#:info
#:info-title
#:info-description
#:info-terms-of-service
#:info-contact
#:info-license
#:info-version

;; Contact
#:contact
#:contact-name
#:contact-url
#:contact-email

;; License
#:license
#:license-name
#:license-url

;; Server
#:server
#:server-url
#:server-description
#:server-variables

;; Server variable
#:server-variable
#:server-variable-enum
#:server-variable-default
#:server-variable-description

;; Components
#:components
#:components-schemas
#:components-responses
#:components-parameters
#:components-examples
#:components-request-bodies
#:components-headers
#:components-security-schemes
#:components-links
#:components-callbacks

;; Path item
#:path-item
#:path-item-ref
#:path-item-summary
#:path-item-description
#:path-item-get
#:path-item-put
#:path-item-post
#:path-item-delete
#:path-item-options
#:path-item-head
#:path-item-patch
#:path-item-trace
#:path-item-servers
#:path-item-parameters

;; Operation
#:operation
#:operation-tags
#:operation-summary
#:operation-description
#:operation-external-docs
#:operation-id
#:operation-parameters
#:operation-request-body
#:operation-responses
#:operation-callbacks
#:operation-deprecated
#:operation-security
#:operation-servers

;; External documentation
#:external-documentation
#:external-documentation-description
#:external-documentation-url

;; Parameter
#:parameter
#:parameter-name
#:parameter-in
#:parameter-description
#:parameter-required
#:parameter-deprecated
#:parameter-allow-empty-value
#:parameter-style
#:parameter-explode
#:parameter-allow-reserved
#:parameter-schema
#:parameter-example
#:parameter-examples
#:parameter-content

;; Request body
#:request-body
#:request-body-description
#:request-body-content
#:request-body-required

;; Media type
#:media-type
#:media-type-schema
#:media-type-example
#:media-type-examples
#:media-type-encoding

;; Encoding
#:encoding
#:encoding-content-type
#:encoding-headers
#:encoding-style
#:encoding-explode
#:encoding-allow-reserved

;; Response
#:response
#:response-description
#:response-headers
#:response-content
#:response-links

;; Example
#:example
#:example-summary
#:example-description
#:example-value
#:example-external-value

;; Link
#:link
#:link-operation-ref
#:link-operation-id
#:link-parameters
#:link-request-body
#:link-description
#:link-server

;; Header
#:header
#:header-description
#:header-required
#:header-deprecated
#:header-allow-empty-value
#:header-style
#:header-explode
#:header-allow-reserved
#:header-schema
#:header-example
#:header-examples
#:header-content

;; Tag
#:tag
#:tag-name
#:tag-description
#:tag-external-docs

;; Schema
#:schema
#:schema-ref
#:schema-title
#:schema-multiple-of
#:schema-maximum
#:schema-exclusive-maximum
#:schema-minimum
#:schema-exclusive-minimum
#:schema-max-length
#:schema-min-length
#:schema-pattern
#:schema-max-items
#:schema-min-items
#:schema-unique-items
#:schema-max-properties
#:schema-min-properties
#:schema-required
#:schema-enum
#:schema-type
#:schema-all-of
#:schema-one-of
#:schema-any-of
#:schema-not
#:schema-items
#:schema-properties
#:schema-additional-properties
#:schema-description
#:schema-format
#:schema-default
#:schema-nullable
#:schema-discriminator
#:schema-read-only
#:schema-write-only
#:schema-xml
#:schema-external-docs
#:schema-example
#:schema-deprecated

;; Discriminator
#:discriminator
#:discriminator-property-name
#:discriminator-mapping

;; XML
#:xml
#:xml-name
#:xml-namespace
#:xml-prefix
#:xml-attribute
#:xml-wrapped

;; Security scheme
#:security-scheme
#:security-scheme-type
#:security-scheme-description
#:security-scheme-name
#:security-scheme-in
#:security-scheme-scheme
#:security-scheme-bearer-format
#:security-scheme-flows
#:security-scheme-open-id-connect-url

;; OAuth flows
#:oauth-flows
#:oauth-flows-implicit
#:oauth-flows-password
#:oauth-flows-client-credentials
#:oauth-flows-authorization-code

;; OAuth flow
#:oauth-flow
#:oauth-flow-authorization-url
#:oauth-flow-token-url
#:oauth-flow-refresh-url
#:oauth-flow-scopes

;; Reference ($ref)
#:reference
#:reference-ref))

(in-package :cl-openapi)
2 changes: 2 additions & 0 deletions qlfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github cl-json cl-sdk/cl-json :branch main
github meta-definitions cl-sdk/meta-definitions :branch main
Loading
Loading