---
# System prepended metadata

title: API review from CRDs
tags: [api, v1]

---

a la _Young Frankenstein_, **How I Did It**

extracted swagger spec [here](https://drive.google.com/file/d/15q8u-nrQeLP5HeldIlJZGCGKOWlISv58/)

format is (context) _text_, for e.g. in my local clone of catalogd I might list as 
> (catd) `make foo`




1. (catd) `make install`
2. (terminal1) `k proxy --port=8081`
3. (terminal2) `curl localhost:8081/openapi/v2 > /tmp/k8s-swagger.json`
4. kill the `k proxy` command since we're finished with it
5. `yq -P /tmp/k8s-swagger.json > ~/devel/tmp/k8s-swagger-pretty.json` (nothing in this process cares about the format, just contents, but I find it convenient to have the results not all on the same line)
6. `docker run --rm --name swagger-ui -p 8082:8080 -e SWAGGER_JSON=/source/k8s-swagger-pretty.json -v $HOME/devel/tmp/:/source docker.io/swaggerapi/swagger-ui` (I used port 8082 since I still had another listener on 8081)
7. (desktop) point browser to http://localhost:8082/
8. profit? 

still looking to see if I can reduce the size of the output (3.3MB json-formatted text), including targeting the specific API
