ugent-library / old-people-service

People service
Apache License 2.0
0 stars 0 forks source link

[OpenAPI] Setup an OpenAPI implementation for the RESTful API #19

Closed netsensei closed 1 year ago

netsensei commented 1 year ago

Story

I should be able to make API calls to an API endpoint available at api/v1 over https.

This story details how to set this up using the OpenAPI specification

Success criteria

Implementation suggestion

Initializing the API server:

// setup api
apiServer, err := api.NewServer(api.NewService(repo))
if err != nil {
    return err
}

Hooking the apiServer object in

// mount api
mux.Mount("/api/v1", http.StripPrefix("/api/v1", apiServer))

Documentation:

Automatic testing scenario

n/a/

Related issues