facebook / facebook/hhvm

Shape fields doc comment reflection

Open
#8,411 0 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

Please allow reflection on shape field doc comment in order to be able to create
auto documented rest services.

example:

```
const type abc = shape(
/**
* field purpose
*/
'field1' => string
);
```

maybe something like this.

```
$ref = new \ReflectionTypeAlias('abc')->getField('field1')->getDocComment();
```

Contributor guide

Open the contributing guide

Research direction

The issue centers on Hack shape fields and the proposed ReflectionTypeAlias('abc')->getField('field1')->getDocComment() entry point. Start by locating the shape-field reflection and type-alias implementation; done means the doc comment for field1 can be retrieved for generating API documentation.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.