markvincze / sabledocs

Simple static documentation generator for Protobuf and gRPC contracts.
MIT License
58 stars 14 forks source link

Incorrect local links to nested messages #52

Closed CommanderPrS closed 9 months ago

CommanderPrS commented 10 months ago

It seems that stabledocs does not generate local links to nested message correctly. For example, in the Google SDK example there is a place where the Sum message is referenced as a type of one of the fields (inside the oneof thing):

https://markvincze.github.io/sabledocs/demo/google.datastore.v1.html#message-google.datastore.v1.AggregationQuery.Aggregation

The link to the Sum message is broken here because it goes to here:

https://markvincze.github.io/sabledocs/demo/google.datastore.v1.html#message-google.datastore.v1.AggregationQuery.Aggregation.Sum

The working link to the Sum message is given in the table of contents:

https://markvincze.github.io/sabledocs/demo/google.datastore.v1.html#message-google.datastore.v1.Aggregation.Sum

Notice that in the first link the outermost message (AggregationQuery) is specified, but the in the second link it is not.

As far as I understand this, it is the anchor for this section, which is wrong: AggregationQuery should really be there. The table of contents link should be changed correspondingly.

markvincze commented 9 months ago

@CommanderPrS Thanks for reporting this issue! It's supposed to be fixed in version 0.11.684, can you give it a try to see if it works correctly in your use case?

CommanderPrS commented 9 months ago

@markvincze

It's supposed to be fixed in version 0.11.684, can you give it a try to see if it works correctly in your use case?

I checked the demo docs for the Google SDK - it all works now. Thank you for fixing this!