There’s already a PR, https://github.com/stan-dev/stan/pull/2477 and associated discussion here Analysis API