Lune

OOPSLA2025Top-tier venue

RestPi: Path-Sensitive Type Inference for REST APIs

Mark W. Aldrich, Kyla Levin, Michael Coblenz, Jeffrey S. Foster

2025Year
1Citations

Abstract

JEFFREY S. FOSTER, Tufts University, USA REST APIs form the backbone of modern interconnected systems by providing a language-agnostic communication interface. REST API specifications should clearly describe all response types, but automatically generating specifications is difficult with existing tools.

We present REST ๐œ‹ , a type inference engine capable of automatically generating REST API specifications. The novel contribution of REST ๐œ‹ is our use of path-sensitive type inference, which encodes symbolic pathconstraints directly into a type system. This allows REST ๐œ‹ to enumerate all response types by considering each distinct execution path through an endpoint implementation. We implement path-sensitive type inference for Ruby, a popular language used for REST API servers. We evaluate REST ๐œ‹ by using it to infer types for 132 endpoints across 5 open-source REST API implementations without utilizing existing specifications or test suites. We find REST ๐œ‹ performs type inference efficiently and produces types that are more precise and complete than those obtained via an HTTP proxy. Our results suggest that path-sensitivity is a key technique to enumerate distinct response types for REST endpoints.

CCS Concepts: โ€ข Software and its engineering โ†’ Data types and structures; Documentation.

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext 6d6dd1e5-2d6f-4d36-a61f-05d2b39c99cd

Builds on3

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines