Skip to content

Commit

Permalink
[FABCN-393] Fix broken links in documents (#168)
Browse files Browse the repository at this point in the history
This patch fixes broken links to the fabric documents.

Signed-off-by: Taku Shimosawa <taku.shimosawa@hal.hitachi.com>
  • Loading branch information
shimos authored Jun 23, 2020
1 parent 255325d commit 88c0a78
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions apis/fabric-contract-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Within Hyperledger Fabric, Smart Contracts can also be referred to as [Chaincode

The `fabric-shim` provides the *chaincode interface*, a lower level API for implementing "Smart Contracts". It also _currently_ provides the implementation to support communication with Hyperledger Fabric peers for Smart Contracts written using the `fabric-contract-api`. To confirm that this is the same as the `fabric-shim` in previous versions of Hyperledger Fabric.

Detailed explanation on the concept and programming model can be found here: [http://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html](http://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html).
Detailed explanation on the concept and programming model can be found here: [https://hyperledger-fabric.readthedocs.io/en/latest/smartcontract/smartcontract.html](https://hyperledger-fabric.readthedocs.io/en/latest/smartcontract/smartcontract.html).

## Contract Interface

Expand Down Expand Up @@ -89,7 +89,7 @@ npm install --save fabric-shim
```

### Usage
The [chaincode interface](https://fabric-shim.github.io/ChaincodeInterface.html) contains two methods to be implemented:
The [chaincode interface](https://hyperledger.github.io/fabric-chaincode-node/master/api/fabric-shim.ChaincodeInterface.html) contains two methods to be implemented:
```javascript
const shim = require('fabric-shim');

Expand Down Expand Up @@ -124,7 +124,7 @@ shim.start(new Chaincode());
```

### API Reference
Visit [fabric-shim.github.io](https://fabric-shim.github.io/) and click on "Classes" link in the navigation bar on the top to view the list of class APIs.
Visit [API Reference](https://hyperledger.github.io/fabric-chaincode-node/master/api/) and click on "Classes" link in the navigation bar on the top to view the list of class APIs.



Expand Down
2 changes: 1 addition & 1 deletion apis/fabric-contract-api/test/unit/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://fabric-shim.github.io/master/contract-schema.json",
"$schema": "https://hyperledger.github.io/fabric-chaincode-node/master/api/contract-schema.json",
"contracts": {
"ShippingContract": {
"name": "ShippingContract",
Expand Down
2 changes: 1 addition & 1 deletion apis/fabric-shim-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This `fabric-shim-api` library provides type definitions for the `fabric-shim` module. It is also a dependency of the `fabric-contract-api` As this is a pure interface module it allows the `fabric-contract-api` annotations to be used in client application without the need to pull in unneeded required dependencies.

Detailed explanation on the concepts and programming model can be found here: [http://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html](http://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html).
Detailed explanation on the concepts and programming model can be found here: [https://hyperledger-fabric.readthedocs.io/en/latest/smartcontract/smartcontract.html](https://hyperledger-fabric.readthedocs.io/en/latest/smartcontract/smartcontract.html).


## License
Expand Down
2 changes: 1 addition & 1 deletion docs/_jsdoc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ npm install --save fabric-shim
```

### Usage
The [chaincode interface](https://fabric-shim.github.io/ChaincodeInterface.html) contains two methods to be implemented:
The [chaincode interface](https://hyperledger.github.io/fabric-chaincode-node/master/api/fabric-shim.ChaincodeInterface.html) contains two methods to be implemented:
```javascript
const shim = require('fabric-shim');

Expand Down
6 changes: 3 additions & 3 deletions docs/_jsdoc/tutorials/annotated-contract-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ The Contract Metadata can be supplied either by the Contract developer or it can

## Metadata Schema

The metadata itself is in JSON, and there is a JSON-Schema definition that defines the contents; this schema is available online at http://fabric-shim.github.io/contract-schema.json
The metadata itself is in JSON, and there is a JSON-Schema definition that defines the contents; this schema is available online at https://hyperledger.github.io/fabric-chaincode-node/master/api/contract-schema.json

This is the latest ga copy of the schema. Specific version can be obtained using urls http://fabric-shim.github.io/{release}/contract-schema.json where releases matches the release name, for example
This is the latest ga copy of the schema. Specific version can be obtained using urls https://hyperledger.github.io/fabric-chaincode-node/{release}/api/contract-schema.json where releases matches the release name, for example
`master` `release-1.4`. Note that metadata was first introduced at v1.4.

A lot of the elements of this metadata are heavily inspired from the [OpenAPI v3.0 specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md) and [JSON Schema](http://json-schema.org/)
Expand All @@ -16,7 +16,7 @@ Adding a reference at the top of the metadata file to this schema, permits edito

```json
{
"$schema": "http://fabric-shim.github.io/contract-schema.json",
"$schema": "https://hyperledger.github.io/fabric-chaincode-node/master/api/contract-schema.json",

}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/_jsdoc/tutorials/deep-dive-contract-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ A correctly specified metadata file, at the top level has this structure

```json
{
"$schema" : "https://fabric-shim.github.io/master/contract-schema.json",
"$schema" : "https://hyperledger.github.io/fabric-chaincode-node/master/api/contract-schema.json",
"info" : {

},
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ in various programming languages. There are two other smart contract SDKs availa

## Documentation

Detailed explanation on the concepts and programming model for smart contracts can be found in the [Chaincode for developers tutorial in the Hyperledger Fabric documentation](https://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html).
Detailed explanation on the concepts and programming model for smart contracts can be found in the [Smart Contracts and Chaincode section in the Hyperledger Fabric documentation](https://hyperledger-fabric.readthedocs.io/en/latest/smartcontract/smartcontract.html).

API documentation is available for each release:

Expand Down
2 changes: 1 addition & 1 deletion libraries/fabric-shim-crypto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This `fabric-shim-crypto` library provides supporting encryption and decryption functions that might be useful for developers.

Detailed explanation on the concepts and programming model can be found here: [http://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html](http://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html).
Detailed explanation on the concepts and programming model can be found here: [https://hyperledger-fabric.readthedocs.io/en/latest/smartcontract/smartcontract.html](https://hyperledger-fabric.readthedocs.io/en/latest/smartcontract/smartcontract.html).


## License
Expand Down
6 changes: 3 additions & 3 deletions libraries/fabric-shim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

The `fabric-shim` provides the *chaincode interface*, a lower level API for implementing "Smart Contracts". To confirm that this is the same as the `fabric-shim` in previous versions of Hyperledger Fabric.

Detailed explanation on the concept and programming model can be found here: [http://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html](http://hyperledger-fabric.readthedocs.io/en/latest/chaincode.html).
Detailed explanation on the concept and programming model can be found here: [https://hyperledger-fabric.readthedocs.io/en/latest/smartcontract/smartcontract.html](https://hyperledger-fabric.readthedocs.io/en/latest/smartcontract/smartcontract.html).


## Chaincode Interface
Expand All @@ -18,7 +18,7 @@ npm install --save fabric-shim
```

### Usage
The [chaincode interface](https://fabric-shim.github.io/ChaincodeInterface.html) contains two methods to be implemented:
The [chaincode interface](https://hyperledger.github.io/fabric-chaincode-node/master/api/fabric-shim.ChaincodeInterface.html) contains two methods to be implemented:
```javascript
const shim = require('fabric-shim');

Expand Down Expand Up @@ -53,7 +53,7 @@ shim.start(new Chaincode());
```

### API Reference
Visit [fabric-shim.github.io](https://fabric-shim.github.io/) and click on "Classes" link in the navigation bar on the top to view the list of class APIs.
Visit [API Reference](https://hyperledger.github.io/fabric-chaincode-node/master/api/) and click on "Classes" link in the navigation bar on the top to view the list of class APIs.

## Support
Tested with node.js 8.9.0 (LTS).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class ChaincodeFromContract {
_augmentMetadataFromCode(metadata) {

if (!metadata.$schema) {
metadata.$schema = 'https://fabric-shim.github.io/master/contract-schema.json';
metadata.$schema = 'https://hyperledger.github.io/fabric-chaincode-node/master/api/contract-schema.json';
}

if (!metadata.contracts || Object.keys(metadata.contracts).length === 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ describe('chaincodefromcontract', () => {
const metadata = fakeCcfc._augmentMetadataFromCode(partialMetadata);

const correctData = {
'$schema': 'https://fabric-shim.github.io/master/contract-schema.json',
'$schema': 'https://hyperledger.github.io/fabric-chaincode-node/master/api/contract-schema.json',
'components': {
'schemas': {}
},
Expand Down Expand Up @@ -1344,7 +1344,7 @@ describe('chaincodefromcontract', () => {
metadata.components.should.deep.equal(metadataToSend.components);
metadata.contracts.should.deep.equal(metadataToSend.contracts);
metadata.info.should.deep.equal(metadataToSend.info);
metadata.$schema.should.deep.equal('https://fabric-shim.github.io/master/contract-schema.json');
metadata.$schema.should.deep.equal('https://hyperledger.github.io/fabric-chaincode-node/master/api/contract-schema.json');
});
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://fabric-shim.github.io/master/contract-schema.json",
"$schema": "https://hyperledger.github.io/fabric-chaincode-node/master/api/contract-schema.json",
"contracts": {
"TestContract": {
"name": "TestContract",
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/scenario.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const queryFunctions = async () => {

const metadata = JSON.parse(stdout);

const expectedMetadata = '{"$schema":"https://fabric-shim.github.io/master/contract-schema.json","contracts":{"UpdateValues":{"name":"UpdateValues","contractInstance":{"name":"UpdateValues","logBuffer":{"output":[]},"default":true},"transactions":[{"name":"setup","tags":["submitTx"]},{"name":"setNewAssetValue","tags":["submitTx"],"parameters":[{"name":"arg0","description":"Argument 0","schema":{"type":"string"}}]},{"name":"doubleAssetValue","tags":["submitTx"]}],"info":{"title":"","version":""}},"RemoveValues":{"name":"RemoveValues","contractInstance":{"name":"RemoveValues"},"transactions":[{"name":"quarterAssetValue","tags":["submitTx"]},{"name":"getAssetValue","tags":["submitTx"]}],"info":{"title":"","version":""}},"org.hyperledger.fabric":{"name":"org.hyperledger.fabric","contractInstance":{"name":"org.hyperledger.fabric"},"transactions":[{"name":"GetMetadata"}],"info":{"title":"","version":""}}},"info":{"version":"1.0.0","title":"chaincode"},"components":{"schemas":{}}}';
const expectedMetadata = '{"$schema":"https://hyperledger.github.io/fabric-chaincode-node/master/api/contract-schema.json","contracts":{"UpdateValues":{"name":"UpdateValues","contractInstance":{"name":"UpdateValues","logBuffer":{"output":[]},"default":true},"transactions":[{"name":"setup","tags":["submitTx"]},{"name":"setNewAssetValue","tags":["submitTx"],"parameters":[{"name":"arg0","description":"Argument 0","schema":{"type":"string"}}]},{"name":"doubleAssetValue","tags":["submitTx"]}],"info":{"title":"","version":""}},"RemoveValues":{"name":"RemoveValues","contractInstance":{"name":"RemoveValues"},"transactions":[{"name":"quarterAssetValue","tags":["submitTx"]},{"name":"getAssetValue","tags":["submitTx"]}],"info":{"title":"","version":""}},"org.hyperledger.fabric":{"name":"org.hyperledger.fabric","contractInstance":{"name":"org.hyperledger.fabric"},"transactions":[{"name":"GetMetadata"}],"info":{"title":"","version":""}}},"info":{"version":"1.0.0","title":"chaincode"},"components":{"schemas":{}}}';

const schema = fs.readFileSync(path.join(__dirname, '../../apis/fabric-contract-api/schema/contract-schema.json'));

Expand Down

0 comments on commit 88c0a78

Please sign in to comment.