Skip to content

Commit

Permalink
Merge pull request #94 from yetanalytics/correct-openapi-spec
Browse files Browse the repository at this point in the history
fixes error in /xapi/statements POST openapi spec
  • Loading branch information
invaliduser authored Jul 25, 2024
2 parents 0aaa60e + 490df3e commit 47f8da2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
org.clojure/core.async {:mvn/version "1.5.648"}
com.yetanalytics/xapi-schema {:mvn/version "1.3.0"
:exclusions [org.clojure/clojurescript]}
com.yetanalytics/gen-openapi {:mvn/version "0.0.4"}
com.yetanalytics/gen-openapi {:mvn/version "0.0.5"}
cheshire/cheshire {:mvn/version "5.10.1"}
io.pedestal/pedestal.service
{:mvn/version "0.5.10"
Expand Down
17 changes: 3 additions & 14 deletions src/main/com/yetanalytics/lrs/pedestal/openapi.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
[com.yetanalytics.gen-openapi.core :as gc]))

(def components
{:securitySchemes
{:bearerAuth {:type :http
:scheme :bearer
:bearerFormat :JWT}}
:responses
{:responses
{:error-400 (g/response "Bad Request" :r#Error)
:error-401 (g/response "Unauthorized" :r#Error)}
:schemas
Expand Down Expand Up @@ -52,9 +48,6 @@
:IRI {:type :string :format :iri}
:IRL :t#string
:MailToIRI {:type :string :format :email}
:KeyPair (gs/o {:api-key :t#string
:secret-key :t#string})

:Person {:type :object
:properties {:objectType {:type :string :pattern "Person"}
:name (gs/a :t#string)
Expand All @@ -63,10 +56,6 @@
:openid* (gs/a :r#URI)
:account* (gs/a :r#Account)}
:required [:objectType]}
:Scopes (gs/o {:scopes (gs/a :t#string)})
:ScopedKeyPair {:allOf [:r#KeyPair
:r#Scopes]}

:statementId {:type :string}
:Statement {:type :object :description "https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#20-statements"}

Expand Down Expand Up @@ -212,8 +201,8 @@
:responses {204 (gc/response "No content")}
:operationId :put-statement
:description ""}
:statements-post {:requestBody (gc/request {:oneOf [(gc/a :r#statementId)
:r#statementId]})
:statements-post {:requestBody (gc/request {:oneOf [(gc/a :r#Statement)
:r#Statement]})
:responses {200 (gc/response "Array of Statement id(s) (UUID) in the same order as the corresponding stored Statements."
(gc/a :r#statementId))}
:operationId :post-statement
Expand Down

0 comments on commit 47f8da2

Please sign in to comment.