Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>ViewPostNew to Visual Studio Code? Get it now.
ViewPost

ViewPost

diagraminder

|
3 installs
| (0) | Free
Draw classes and objects on a canvas and the graph becomes the JSON body you send. An API client where the model is the payload.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ViewPost

Draw the model. Send the request.

ViewPost in action

ViewPost is an API client for VS Code where the model is the payload. You draw classes and objects on a canvas and the graph becomes the JSON body — no hand-written braces, no twenty copies of the same shape to keep in sync.

Why

Testing an API that takes nested objects means writing JSON by hand. Forty lines of braces where one stray comma breaks everything, and the model is nowhere to be seen — what fields a customer has, what type each one is, how an order relates to its items. It is implicit, repeated in every request, and when the backend changes a field you go and edit twenty bodies by hand.

ViewPost turns that around. Define the shape once — classes, attributes, inheritance — then create objects by filling in a form the class generates for itself. Attributes that point at another class are not typed, they are connected with an arrow. The JSON is never stored: it is rebuilt by walking the graph.

Which gets you three things for free:

  • It cannot drift out of sync. There is only one source of truth.
  • Change the class and it propagates to every object of it, and of its subclasses.
  • The same object can sit in two different bodies. It is a node, not a copy.

And because the request runs in the extension host — Node, not a browser — there is no CORS. Nothing to install, nothing to proxy.

Getting started

  1. Right-click a folder in the Explorer → New ViewPost Diagram.
  2. + Class — give it a name and some attributes. A type is string, number, bool, date, or another class.
  3. + Object — pick its class. The form is generated from the class's attributes, including everything it inherits.
  4. + Fetch — method, URL, headers. Drag an arrow from the Fetch to the object: that object is the body, and the node shows the JSON it will send, live.
  5. Send.

Drag from the dots on the edge of a node to connect things. Double-click a node to edit it. The right mouse button pans; Ctrl/Cmd + wheel zooms. Ctrl/Cmd+C and Ctrl/Cmd+V copy and paste a selection — across diagrams and across windows.

The arrows carry the meaning

Arrow Between What it means
extends class → class Inheritance (child points at parent, UML direction)
has a class → class A reference attribute. The arrow is the attribute
value object → object The value of that attribute. The arrow is the value
element collection → object That object is in the collection
body fetch → object/collection That is the request body

Your diagram is a file

A diagram is a .viewpost.json in your workspace. It uses VS Code's native undo, Ctrl+S, and unsaved indicator, and it goes into git like any other file — readable in a diff, and the same for everyone who clones the repo.

Environments

Write {{baseUrl}}/orders in a Fetch instead of a hardcoded URL, pick the environment in the toolbar, and every request repoints at once.

Mark a variable as secret and its value moves to your OS keychain, per environment. The file keeps only the declaration — so the diagram goes into git and the token stays on your machine. Variables are resolved in the extension host, right before sending; the webview never sees a secret.

Settings

Setting Default
viewpost.request.timeout 30000 Milliseconds before a request is aborted
viewpost.request.maxResponseBytes 2000000 Bigger responses are truncated
viewpost.request.defaultHeaders {} Added to every request; a header on the node wins
viewpost.canvas.snapToGrid false Snap while dragging
viewpost.canvas.gridSize 20 The grid step

Known limits

  • A literal credential typed into a header is still stored in the file (the editor warns you). Use a secret variable instead — those never reach the file.
  • Collections serialize correctly for all four kinds, but only the list editor is built; a queue, stack or tree behaves like a list in the UI.
  • No burst sending, no response assertions, no request chaining, no OpenAPI import — yet.
  • Primitive arrays (string[]) are not supported; arrays of objects are.

Development

No build step and no dependencies — the extension ships the source it runs.

npm test        # 111 tests, plain node, no VS Code needed

Press F5 in VS Code to launch an Extension Development Host with ViewPost loaded.

npm run package produces a .vsix via npx @vscode/vsce.

License and credit

MIT. Use it, fork it, ship it in something commercial — all fine. The one binding condition is the usual MIT one: keep the copyright notice and the licence text with any copy or substantial portion of the code.

And one request on top of that. If you build something on this — a fork, a derived extension, a product that reuses parts of it — credit ViewPost as the original and link back to https://github.com/JuanseGZZ/viewpost somewhere a person will actually see it: your README, your about page, your Marketplace listing.

That is a request, not a licence term. It is not enforced and it takes nothing away from what MIT grants you. It is asked because attribution is how a small project gets found at all. See NOTICE.

Any product or company names anywhere in this repository belong to their owners and are used, where they appear at all, only to describe what this software does. ViewPost is not affiliated with, endorsed by or sponsored by any of them.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft