Ketuf Wtf
Ketuf Wtf

Reputation: 11

dart doc for libary, why is the main function not documented?

Hi i have build a blockchain and would like to document the api endpoints written in the main function now i have used dart doc to generate a documentation but it exludes the main function, does anyone know how to include it? https://github.com/ketuf/gladiato.rs

Upvotes: 1

Views: 144

Answers (1)

TarHalda
TarHalda

Reputation: 1141

See Github issue here: https://github.com/dart-lang/dartdoc/issues/3096. Currently, nothing in /lib/src can have documentation generated for it because it is considered a private library. You can export specific files to a library in /lib, which means documentation will be generated for those: https://dart.dev/guides/libraries/create-library-packages.

Directly under lib, the main library file, shelf.dart, exports API from several files in lib/src. To avoid exposing more API than intended—and to give developers an overview of the entire public API of the package—shelf.dart uses show to specify exactly which symbols to export:

    export 'src/cascade.dart' show Cascade;
    export 'src/handler.dart' show Handler;
    export 'src/hijack_exception.dart' show HijackException;
    export 'src/middleware.dart' show Middleware, createMiddleware;
    export 'src/middleware/add_chunked_encoding.dart' show addChunkedEncoding;
    export 'src/middleware/logger.dart' show logRequests;
    export 'src/middleware_extensions.dart' show MiddlewareExtensions;
    export 'src/pipeline.dart' show Pipeline;
    export 'src/request.dart' show Request;
    export 'src/response.dart' show Response;
    export 'src/server.dart' show Server;
    export 'src/server_handler.dart' show ServerHandler;

Upvotes: 0

Related Questions